git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@5 9a1d36f3-7752-2d40-8ccb-50eb49674c68
88 lines
2.6 KiB
ObjectPascal
88 lines
2.6 KiB
ObjectPascal
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, dxPScxGridLnk,
|
|
uViewFiltroBase;
|
|
|
|
type
|
|
IViewCuentas = interface(IViewGrid)
|
|
['{14CA2FE9-4B42-47EE-AEF0-60F759C1755A}']
|
|
function GetCuentas: IBizCuenta;
|
|
procedure SetCuentas(const Value: IBizCuenta);
|
|
property Cuentas: IBizCuenta read GetCuentas write SetCuentas;
|
|
end;
|
|
|
|
TfrViewCuentas = class(TfrViewGrid, IViewCuentas)
|
|
PngImageList: TPngImageList;
|
|
cxGridViewRecID: TcxGridDBColumn;
|
|
cxGridViewCODIGOEMPRESA: TcxGridDBColumn;
|
|
cxGridViewCODIGO: TcxGridDBColumn;
|
|
cxGridViewFECHAALTA: TcxGridDBColumn;
|
|
cxGridViewUSUARIO: TcxGridDBColumn;
|
|
cxGridViewNOMBRE: TcxGridDBColumn;
|
|
cxGridViewOTROSDATOS: TcxGridDBColumn;
|
|
cxGridViewICONO: TcxGridDBColumn;
|
|
procedure cxGridViewICONOCustomDrawCell(
|
|
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
|
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
protected
|
|
FCuentas: IBizCuenta;
|
|
function GetCuentas: IBizCuenta; virtual;
|
|
procedure SetCuentas(const Value: IBizCuenta); virtual;
|
|
public
|
|
property DataSet: IBizCuenta read GetCuentas write SetCuentas;
|
|
end;
|
|
|
|
var
|
|
frViewCuentas: TfrViewCuentas;
|
|
|
|
implementation
|
|
|
|
uses uDataModuleCuentas;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
{ TfrViewClientes }
|
|
|
|
{
|
|
******************************* TfrViewCuentas *******************************
|
|
}
|
|
function TfrViewCuentas.GetCuentas: IBizCuenta;
|
|
begin
|
|
Result := FCuentas;
|
|
end;
|
|
|
|
procedure TfrViewCuentas.SetCuentas(const Value: IBizCuenta);
|
|
begin
|
|
FCuentas := Value;
|
|
if Assigned(FCuentas) then
|
|
DADataSource.DataTable := FCuentas.DataTable;
|
|
end;
|
|
|
|
|
|
procedure TfrViewCuentas.cxGridViewICONOCustomDrawCell(
|
|
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.
|