FactuGES2/Source/Modulos/Contabilidad/Views/uViewCuentas.pas
2007-12-27 20:41:02 +00:00

80 lines
2.6 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 uViewCuentas;
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, uBizCuentas, ActnList, Menus,
cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar,
cxImageComboBox, cxTextEdit;
type
IViewCuentas = interface(IViewGrid)
['{E6798DF7-011C-40EC-B368-160C48697445}']
function GetCuentas: IBizCuenta;
procedure SetCuentas(const Value: IBizCuenta);
property Cuentas: IBizCuenta read GetCuentas write SetCuentas;
end;
TfrViewCuentas = class(TfrViewGrid, IViewCuentas)
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewREF_CUENTA: TcxGridDBColumn;
cxGridViewID: TcxGridDBColumn;
PngImageList: TPngImageList;
cxGridViewEPIGRAFE: TcxGridDBColumn;
cxGridViewBALANCE: TcxGridDBColumn;
cxGridViewCUENTA_ESPECIAL: TcxGridDBColumn;
procedure cxGridViewIDCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
protected
FCuentas: IBizCuenta;
function GetCuentas: IBizCuenta; virtual;
procedure SetCuentas(const Value: IBizCuenta); virtual;
public
property Cuentas: IBizCuenta read GetCuentas write SetCuentas;
end;
implementation
{$R *.dfm}
{ TfrViewCuentas }
{
******************************* TfrViewCuentas *******************************
}
function TfrViewCuentas.GetCuentas: IBizCuenta;
begin
Result := FCuentas;
end;
procedure TfrViewCuentas.SetCuentas(const Value: IBizCuenta);
begin
FCuentas := Value;
if Assigned(FCuentas) then
dsDataSource.DataTable := FCuentas.DataTable;
end;
procedure TfrViewCuentas.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.