FactuGES2/Source/Modulos/Contabilidad/Views/uViewCuentas.pas
david df91c321ca - Actualización a DevExpress x.46
- Quitardos los componentes de traducción cxIntl6 y cxIntlPrintSys3 para utilizar el componente oficial cxLocalizer y la traducción completa ya hecha.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@450 f4e31baf-9722-1c47-927c-6f952f962d4b
2009-10-27 19:25:17 +00:00

80 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, 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, 1);
ADone := True;
end;
end.