This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Noviseda_FactuGES2/Source/Modulos/Contactos/Views/uEditorDatoBancario.pas
2010-02-01 19:24:25 +00:00

103 lines
3.0 KiB
ObjectPascal

unit uEditorDatoBancario;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, Mask, DBCtrls, DB, uDAInterfaces, uDADataTable,
uBizContactosDatosBancarios, uIEditorDatoBancarioContacto, uDMBase,
uDatosBancariosContactoController, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, cxContainer, cxEdit, dxLayoutcxEditAdapters,
dxLayoutControl, cxTextEdit, cxDBEdit;
type
TfEditorDatoBancario = class(TForm, IEditorDatoBancarioContacto)
CancelBtn: TButton;
dsDatosBancarios: TDADataSource;
dxLayoutControl1: TdxLayoutControl;
eEntidad: TcxDBTextEdit;
eSucursal: TcxDBTextEdit;
eCuenta: TcxDBTextEdit;
eDC: TcxDBTextEdit;
eTitular: TcxDBTextEdit;
dxLayoutGroup1: TdxLayoutGroup;
dxLayoutControl1Group3: TdxLayoutGroup;
dxLayoutControl1Item5: TdxLayoutItem;
dxLayoutControl1Group2: TdxLayoutGroup;
dxLayoutGroup2: TdxLayoutGroup;
dxLayoutItem1: TdxLayoutItem;
dxLayoutControl1Item2: TdxLayoutItem;
dxLayoutControl1Group4: TdxLayoutGroup;
dxLayoutControl1Item4: TdxLayoutItem;
dxLayoutControl1Item3: TdxLayoutItem;
OKBtn: TButton;
procedure CalcularDC(Sender: TObject);
protected
FController : IDatosBancariosContactoController;
FDatosBanco : IBizContactosDatosBancarios;
function GetController : IDatosBancariosContactoController;
procedure SetController (const Value : IDatosBancariosContactoController);
function GetDatoBancario: IBizContactosDatosBancarios;
procedure SetDatoBancario(const Value: IBizContactosDatosBancarios);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Controller : IDatosBancariosContactoController read GetController
write SetController;
property DatoBancario: IBizContactosDatosBancarios read GetDatoBancario write SetDatoBancario;
end;
implementation
uses
Variants, uValidacionUtils;
{$R *.dfm}
{ TfEditorDireccion }
procedure TfEditorDatoBancario.CalcularDC(Sender: TObject);
begin
eDC.EditValue := DarDC(eEntidad.EditValue,eSucursal.EditValue,eCuenta.EditValue);
end;
constructor TfEditorDatoBancario.Create(AOwner: TComponent);
begin
inherited;
FController := NIL;
end;
destructor TfEditorDatoBancario.Destroy;
begin
FController := NIL;
inherited;
end;
function TfEditorDatoBancario.GetController: IDatosBancariosContactoController;
begin
Result := FController;
end;
function TfEditorDatoBancario.GetDatoBancario: IBizContactosDatosBancarios;
begin
Result := FDatosBanco;
end;
procedure TfEditorDatoBancario.SetController(
const Value: IDatosBancariosContactoController);
begin
FController := Value;
end;
procedure TfEditorDatoBancario.SetDatoBancario(
const Value: IBizContactosDatosBancarios);
begin
FDatosBanco := Value;
if Assigned(FDatosBanco) then
dsDatosBancarios.DataTable := FDatosBanco.DataTable
else
dsDatosBancarios.DataTable := NIL;
end;
end.