109 lines
3.1 KiB
ObjectPascal
109 lines
3.1 KiB
ObjectPascal
|
|
unit uViewApunte;
|
||
|
|
|
||
|
|
interface
|
||
|
|
|
||
|
|
uses
|
||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||
|
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, Buttons, DB, uDADataTable,
|
||
|
|
DBCtrls, Grids, DBGrids, uBizApuntes, uApuntesController, Mask, ComCtrls, uCustomView,
|
||
|
|
JvComponent, JvFormAutoSize, cxControls, cxContainer, cxEdit, cxTextEdit,
|
||
|
|
cxDBEdit, dxLayoutControl, uDAInterfaces, cxGraphics, cxDropDownEdit,
|
||
|
|
cxImageComboBox, cxMaskEdit, cxCalendar, ImgList, PngImageList, ActnList,
|
||
|
|
cxCurrencyEdit;
|
||
|
|
|
||
|
|
type
|
||
|
|
IViewApunte = interface(IViewBase)
|
||
|
|
['{F44F8AEF-CB9C-44D5-93DA-53D6AB6A2D29}']
|
||
|
|
// function GetController : IApuntesController;
|
||
|
|
// procedure SetController (const Value : IApuntesController);
|
||
|
|
// property Controller : IApuntesController read GetController write SetController;
|
||
|
|
|
||
|
|
function GetApunte: IBizApunte;
|
||
|
|
procedure SetApunte(const Value: IBizApunte);
|
||
|
|
property Apunte: IBizApunte read GetApunte write SetApunte;
|
||
|
|
end;
|
||
|
|
|
||
|
|
TfrViewApunte = class(TfrViewBase, IViewApunte)
|
||
|
|
DADataSource: TDADataSource;
|
||
|
|
layoutApunteGroup_Root: TdxLayoutGroup;
|
||
|
|
layoutApunte: TdxLayoutControl;
|
||
|
|
layoutApunteGroup1: TdxLayoutGroup;
|
||
|
|
layoutApunteItem3: TdxLayoutItem;
|
||
|
|
eConcepto: TcxDBTextEdit;
|
||
|
|
layoutApunteItem1: TdxLayoutItem;
|
||
|
|
eDocumento: TcxDBTextEdit;
|
||
|
|
layoutApunteItem2: TdxLayoutItem;
|
||
|
|
eRefSubCuenta: TcxDBTextEdit;
|
||
|
|
layoutApunteItem4: TdxLayoutItem;
|
||
|
|
BitBtn3: TBitBtn;
|
||
|
|
png: TActionList;
|
||
|
|
actSubCuenta: TAction;
|
||
|
|
LargeImages: TPngImageList;
|
||
|
|
layoutApunteItem5: TdxLayoutItem;
|
||
|
|
eSubCuenta: TcxDBTextEdit;
|
||
|
|
layoutApunteGroup3: TdxLayoutGroup;
|
||
|
|
layoutApunteItem6: TdxLayoutItem;
|
||
|
|
eDebe: TcxDBCurrencyEdit;
|
||
|
|
layoutApunteItem7: TdxLayoutItem;
|
||
|
|
eHaber: TcxDBCurrencyEdit;
|
||
|
|
layoutApunteGroup2: TdxLayoutGroup;
|
||
|
|
procedure actSubCuentaExecute(Sender: TObject);
|
||
|
|
protected
|
||
|
|
FApunte: IBizApunte;
|
||
|
|
// FController : IApuntesController;
|
||
|
|
function GetApunte: IBizApunte;
|
||
|
|
procedure SetApunte(const Value: IBizApunte);
|
||
|
|
// function GetController : IApuntesController;
|
||
|
|
// procedure SetController (const Value : IApuntesController);
|
||
|
|
|
||
|
|
public
|
||
|
|
// property Controller : IApuntesController read GetController write SetController;
|
||
|
|
property Apunte: IBizApunte read GetApunte write SetApunte;
|
||
|
|
end;
|
||
|
|
|
||
|
|
implementation
|
||
|
|
{$R *.dfm}
|
||
|
|
|
||
|
|
{ TfrViewApuntes }
|
||
|
|
|
||
|
|
{
|
||
|
|
******************************* TfrViewApuntes ********************************
|
||
|
|
}
|
||
|
|
|
||
|
|
procedure TfrViewApunte.actSubCuentaExecute(Sender: TObject);
|
||
|
|
begin
|
||
|
|
inherited;
|
||
|
|
// Controller.ElegirCuenta(Apunte);
|
||
|
|
end;
|
||
|
|
|
||
|
|
{
|
||
|
|
function TfrViewApunte.GetController: IApuntesController;
|
||
|
|
begin
|
||
|
|
Result := FController;
|
||
|
|
end;
|
||
|
|
}
|
||
|
|
|
||
|
|
function TfrViewApunte.GetApunte: IBizApunte;
|
||
|
|
begin
|
||
|
|
Result := FApunte;
|
||
|
|
end;
|
||
|
|
|
||
|
|
{
|
||
|
|
procedure TfrViewApunte.SetController(const Value: IApuntesController);
|
||
|
|
begin
|
||
|
|
FController := Value;
|
||
|
|
end;
|
||
|
|
}
|
||
|
|
|
||
|
|
procedure TfrViewApunte.SetApunte(const Value: IBizApunte);
|
||
|
|
begin
|
||
|
|
FApunte := Value;
|
||
|
|
if Assigned(FApunte) then
|
||
|
|
DADataSource.DataTable := FApunte.DataTable
|
||
|
|
else
|
||
|
|
DADataSource.DataTable := NIL;
|
||
|
|
end;
|
||
|
|
|
||
|
|
end.
|
||
|
|
|