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

77 lines
2.5 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 uViewEpigrafes;
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, uBizEpigrafes, 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
IViewEpigrafes = interface(IViewGrid)
['{E6798DF7-011C-40EC-B368-160C48697445}']
function GetEpigrafes: IBizEpigrafe;
procedure SetEpigrafes(const Value: IBizEpigrafe);
property Epigrafes: IBizEpigrafe read GetEpigrafes write SetEpigrafes;
end;
TfrViewEpigrafes = class(TfrViewGrid, IViewEpigrafes)
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewREF_EPIGRAFE: TcxGridDBColumn;
cxGridViewID: TcxGridDBColumn;
PngImageList: TPngImageList;
procedure cxGridViewIDCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
protected
FEpigrafes: IBizEpigrafe;
function GetEpigrafes: IBizEpigrafe; virtual;
procedure SetEpigrafes(const Value: IBizEpigrafe); virtual;
public
property Epigrafes: IBizEpigrafe read GetEpigrafes write SetEpigrafes;
end;
implementation
{$R *.dfm}
{ TfrViewEpigrafes }
{
******************************* TfrViewEpigrafes *******************************
}
function TfrViewEpigrafes.GetEpigrafes: IBizEpigrafe;
begin
Result := FEpigrafes;
end;
procedure TfrViewEpigrafes.SetEpigrafes(const Value: IBizEpigrafe);
begin
FEpigrafes := Value;
if Assigned(FEpigrafes) then
dsDataSource.DataTable := FEpigrafes.DataTable;
end;
procedure TfrViewEpigrafes.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.