AlonsoYSal_FactuGES2/Source/Modulos/Contabilidad/Views/uViewBalances.pas
2019-11-18 10:36:42 +00:00

83 lines
2.7 KiB
ObjectPascal
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

unit uViewBalances;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewGrid, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, uDADataTable, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, uBizBalances, ActnList, Menus,
cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar,
cxImageComboBox, cxTextEdit;
type
IViewBalances = interface(IViewGrid)
['{E1960F7E-97F6-4BF6-82AA-82E60C220B33}']
function GetBalances: IBizBalance;
procedure SetBalances(const Value: IBizBalance);
property Balances: IBizBalance read GetBalances write SetBalances;
end;
TfrViewBalances = class(TfrViewGrid, IViewBalances)
cxGridViewDESCRIPCION1: TcxGridDBColumn;
cxGridViewNATURALEZA: TcxGridDBColumn;
cxGridViewID: TcxGridDBColumn;
PngImageList: TPngImageList;
cxGridViewREF_BALANCE: TcxGridDBColumn;
cxGridViewNIVEL1: TcxGridDBColumn;
cxGridViewNIVEL2: TcxGridDBColumn;
cxGridViewDESCRIPCION2: TcxGridDBColumn;
cxGridViewNIVEL3: TcxGridDBColumn;
cxGridViewDESCRIPCION3: TcxGridDBColumn;
procedure cxGridViewIDCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
protected
FBalances: IBizBalance;
function GetBalances: IBizBalance; virtual;
procedure SetBalances(const Value: IBizBalance); virtual;
public
property Balances: IBizBalance read GetBalances write SetBalances;
end;
implementation
{$R *.dfm}
{ TfrViewBalances }
{
******************************* TfrViewBalances *******************************
}
function TfrViewBalances.GetBalances: IBizBalance;
begin
Result := FBalances;
end;
procedure TfrViewBalances.SetBalances(const Value: IBizBalance);
begin
FBalances := Value;
if Assigned(FBalances) then
dsDataSource.DataTable := FBalances.DataTable;
end;
procedure TfrViewBalances.cxGridViewIDCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var
R : TRect;
begin
inherited;
R := AViewInfo.ContentBounds;
ACanvas.FillRect(R);
ACanvas.DrawImage(PngImageList, R.Left, R.Top, 0);
ADone := True;
end;
end.