AbetoDesign_FactuGES2/Source/Modulos/Presupuestos de cliente/Views/uViewConfiguracionDocElectrodomestico.pas

95 lines
3.3 KiB
ObjectPascal
Raw Blame History

unit uViewConfiguracionDocElectrodomestico;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
cxGraphics, DB, uDAInterfaces, uDADataTable, cxMaskEdit, cxDropDownEdit,
cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uBizFormasPago;
type
TfrViewConfiguracionDocElectrodomestico = class(TfrViewConfiguracionBase)
eCondiciones: TcxRichEdit;
ePlazosEntrega: TMemo;
eObservaciones: TMemo;
Label2: TLabel;
Label4: TLabel;
bFormasPago: TButton;
cbFormaPago: TcxLookupComboBox;
Label5: TLabel;
dsFormaPago: TDADataSource;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public
class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override;
procedure CargarValores; override;
procedure GuardarValores; override;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
var
frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectrodomestico;
implementation
{$R *.dfm}
{ TfrViewConfiguracionDocELECTRODOMESTICO }
uses uFactuGES_App, uConfiguracionController, uPresupuestosClienteController;
procedure TfrViewConfiguracionDocElectrodomestico.CargarValores;
begin
inherited;
FFormasPago := FFormasPagoController.BuscarTodos;
dsFormaPago.DataTable := FFormasPago.DataTable;
dsFormaPago.DataTable.Active := True;
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ELECTRODOMESTICO);
ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO);
eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_ELECTRODOMESTICO);
eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_ELECTRODOMESTICO);
end;
constructor TfrViewConfiguracionDocElectrodomestico.Create(AOwner: TComponent);
begin
inherited;
FFormasPagoController := TFormasPagoController.Create;
end;
class function TfrViewConfiguracionDocElectrodomestico.DarEtiqueta: String;
begin
Result := 'Documentos electrodom<6F>stico';
end;
destructor TfrViewConfiguracionDocElectrodomestico.Destroy;
begin
FFormasPago := Nil;
FFormasPagoController := NIL;
inherited;
end;
class function TfrViewConfiguracionDocElectrodomestico.GetViewClass: TClass;
begin
Result := TfrViewConfiguracionDocELECTRODOMESTICO;
end;
procedure TfrViewConfiguracionDocElectrodomestico.GuardarValores;
begin
inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ELECTRODOMESTICO, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_ELECTRODOMESTICO, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_ELECTRODOMESTICO, eCondiciones.Text);
end;
end.