This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Cuentas/Cliente/uViewCuentas.pas
2007-06-21 16:02:50 +00:00

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.