unit uEditorDatosBancariosEmpresa; interface uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable, PngSpeedButton, cxControls, cxContainer, cxEdit, cxTextEdit, cxHyperLinkEdit, cxDBEdit, uIEditorDatosBancarioEmpresa, uDatosBancariosEmpresaController, uBizEmpresasDatosBancarios, cxCurrencyEdit, uDAInterfaces, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, dxLayoutcxEditAdapters, dxLayoutControl; type TfEditorDatosBancariosEmpresa = class(TForm, IEditorDatosBancariosEmpresa) OKBtn: TButton; CancelBtn: TButton; dsDatosBancarios: TDADataSource; GroupBox1: TGroupBox; GroupBox2: TGroupBox; Label7: TLabel; eNorma19: TDBEdit; Label1: TLabel; eNorma58: TDBEdit; eIBAN: TDBEdit; Label8: TLabel; eSWIFT: TDBEdit; Label9: TLabel; dxLayoutControl1: TdxLayoutControl; eEntidad: TcxDBTextEdit; eSucursal: TcxDBTextEdit; eCuenta: TcxDBTextEdit; eDC: TcxDBTextEdit; eNombre: TcxDBTextEdit; dxLayoutGroup1: TdxLayoutGroup; dxLayoutControl1Group3: TdxLayoutGroup; dxLayoutControl1Item5: TdxLayoutItem; dxLayoutControl1Group2: TdxLayoutGroup; dxLayoutGroup2: TdxLayoutGroup; dxLayoutItem1: TdxLayoutItem; dxLayoutControl1Item2: TdxLayoutItem; dxLayoutControl1Group4: TdxLayoutGroup; dxLayoutControl1Item4: TdxLayoutItem; dxLayoutControl1Item3: TdxLayoutItem; procedure CalcularDC(Sender: TObject); protected FController : IDatosBancariosEmpresaController; FDatosBancarios: IBizEmpresasDatosBancarios; function GetController : IDatosBancariosEmpresaController; procedure SetController (const Value : IDatosBancariosEmpresaController); function GetDatosBancarios: IBizEmpresasDatosBancarios; procedure SetDatosBancarios(const Value: IBizEmpresasDatosBancarios); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; property DatosBancarios: IBizEmpresasDatosBancarios read GetDatosBancarios write SetDatosBancarios; property Controller : IDatosBancariosEmpresaController read GetController write SetController; end; implementation {$R *.dfm} uses Variants, uValidacionUtils; { TfEditorDireccion } procedure TfEditorDatosBancariosEmpresa.CalcularDC(Sender: TObject); begin eDC.EditValue := DarDC(eEntidad.EditValue,eSucursal.EditValue,eCuenta.EditValue); end; constructor TfEditorDatosBancariosEmpresa.Create(AOwner: TComponent); begin inherited; FController := NIL; end; destructor TfEditorDatosBancariosEmpresa.Destroy; begin FController := NIL; inherited; end; function TfEditorDatosBancariosEmpresa.GetController: IDatosBancariosEmpresaController; begin Result := FController; end; function TfEditorDatosBancariosEmpresa.GetDatosBancarios: IBizEmpresasDatosBancarios; begin Result := FDatosBancarios; end; procedure TfEditorDatosBancariosEmpresa.SetController( const Value: IDatosBancariosEmpresaController); begin FController := Value; end; procedure TfEditorDatosBancariosEmpresa.SetDatosBancarios( const Value: IBizEmpresasDatosBancarios); begin FDatosBancarios := Value; if Assigned(FDatosBancarios) then dsDatosBancarios.DataTable := FDatosBancarios.DataTable else dsDatosBancarios.DataTable := NIL; end; end.