git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES2/trunk@6 40301925-124e-1c4e-b97d-170ad7a8785b
124 lines
3.7 KiB
ObjectPascal
124 lines
3.7 KiB
ObjectPascal
unit uViewCuenta;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, Buttons, DB, uDADataTable,
|
|
DBCtrls, Grids, DBGrids, uBizCuentas, uCuentasController, Mask, ComCtrls, uCustomView,
|
|
JvComponent, JvFormAutoSize, cxControls, cxContainer, cxEdit, cxTextEdit,
|
|
cxDBEdit, dxLayoutControl, uDAInterfaces, cxGraphics, cxDropDownEdit,
|
|
cxImageComboBox, cxMaskEdit, cxCalendar, ActnList, ImgList, PngImageList;
|
|
|
|
type
|
|
IViewCuenta = interface(IViewBase)
|
|
['{F44F8AEF-CB9C-44D5-93DA-53D6AB6A2D29}']
|
|
function GetController : ICuentasController;
|
|
procedure SetController (const Value : ICuentasController);
|
|
property Controller : ICuentasController read GetController write SetController;
|
|
|
|
function GetCuenta: IBizCuenta;
|
|
procedure SetCuenta(const Value: IBizCuenta);
|
|
property Cuenta: IBizCuenta read GetCuenta write SetCuenta;
|
|
end;
|
|
|
|
TfrViewCuenta = class(TfrViewBase, IViewCuenta)
|
|
DADataSource: TDADataSource;
|
|
dxLayoutControlCuentaGroup_Root: TdxLayoutGroup;
|
|
dxLayoutControlCuenta: TdxLayoutControl;
|
|
dxLayoutControlCuentaItem3: TdxLayoutItem;
|
|
eReferencia: TcxDBTextEdit;
|
|
dxLayoutControlCuentaItem1: TdxLayoutItem;
|
|
eDescripcion: TcxDBTextEdit;
|
|
dxLayoutControlCuentaItem2: TdxLayoutItem;
|
|
eCuentaEspecial: TcxDBTextEdit;
|
|
dxLayoutControlCuentaItem4: TdxLayoutItem;
|
|
eBalance: TcxDBTextEdit;
|
|
dxLayoutControlCuentaItem5: TdxLayoutItem;
|
|
eEpigrafe: TcxDBTextEdit;
|
|
png: TActionList;
|
|
actElegirEpigrafe: TAction;
|
|
BitBtn1: TBitBtn;
|
|
dxLayoutControlCuentaItem6: TdxLayoutItem;
|
|
dxLayoutControlCuentaGroup2: TdxLayoutGroup;
|
|
dxLayoutControlCuentaItem7: TdxLayoutItem;
|
|
BitBtn2: TBitBtn;
|
|
dxLayoutControlCuentaGroup3: TdxLayoutGroup;
|
|
dxLayoutControlCuentaItem8: TdxLayoutItem;
|
|
BitBtn3: TBitBtn;
|
|
dxLayoutControlCuentaGroup4: TdxLayoutGroup;
|
|
actBalance: TAction;
|
|
actCuentaEspecial: TAction;
|
|
SmallImages: TPngImageList;
|
|
procedure actElegirEpigrafeExecute(Sender: TObject);
|
|
procedure actBalanceExecute(Sender: TObject);
|
|
procedure actCuentaEspecialExecute(Sender: TObject);
|
|
protected
|
|
FCuenta: IBizCuenta;
|
|
FController : ICuentasController;
|
|
function GetCuenta: IBizCuenta;
|
|
procedure SetCuenta(const Value: IBizCuenta);
|
|
function GetController : ICuentasController;
|
|
procedure SetController (const Value : ICuentasController);
|
|
|
|
public
|
|
property Controller : ICuentasController read GetController write SetController;
|
|
property Cuenta: IBizCuenta read GetCuenta write SetCuenta;
|
|
end;
|
|
|
|
implementation
|
|
{$R *.dfm}
|
|
|
|
uses uBizEpigrafes;
|
|
|
|
{ TfrViewCuenta }
|
|
|
|
{
|
|
******************************* TfrViewCuenta ********************************
|
|
}
|
|
|
|
procedure TfrViewCuenta.actBalanceExecute(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
Controller.ElegirBalance(Cuenta);
|
|
end;
|
|
|
|
procedure TfrViewCuenta.actCuentaEspecialExecute(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
Controller.ElegirCuentaEspecial(Cuenta);
|
|
end;
|
|
|
|
procedure TfrViewCuenta.actElegirEpigrafeExecute(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
Controller.ElegirEpigrafe(Cuenta);
|
|
end;
|
|
|
|
function TfrViewCuenta.GetController: ICuentasController;
|
|
begin
|
|
Result := FController;
|
|
end;
|
|
|
|
function TfrViewCuenta.GetCuenta: IBizCuenta;
|
|
begin
|
|
Result := FCuenta;
|
|
end;
|
|
|
|
procedure TfrViewCuenta.SetController(const Value: ICuentasController);
|
|
begin
|
|
FController := Value;
|
|
end;
|
|
|
|
procedure TfrViewCuenta.SetCuenta(const Value: IBizCuenta);
|
|
begin
|
|
FCuenta := Value;
|
|
if Assigned(FCuenta) then
|
|
DADataSource.DataTable := FCuenta.DataTable
|
|
else
|
|
DADataSource.DataTable := NIL;
|
|
end;
|
|
|
|
end.
|
|
|