unit uViewRemesasCliente;

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, uBizRemesasCliente, ActnList, Menus,
  cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
  JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
  dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
  dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGridLnk,
  cxGridCustomPopupMenu, cxGridPopupMenu, cxCurrencyEdit, cxSpinEdit, cxCheckBox,
  cxCheckComboBox, cxImageComboBox, TB2Item, TBX, TB2Toolbar, TBXDkPanels,
  TB2Dock, uViewFiltroBase, dxPgsDlg;

type
  IViewRemesasCliente = interface(IViewGrid)
  ['{F18052A7-40A1-49F5-93A1-9544CB98DC0E}']
    function GetRemesasCliente: IBizRemesaCliente;
    procedure SetRemesasCliente(const Value: IBizRemesaCliente);
    property RemesasCliente: IBizRemesaCliente read GetRemesasCliente write SetRemesasCliente;
  end;

  TfrViewRemesasCliente = class(TfrViewGrid, IViewRemesasCliente)
    PngImageList: TPngImageList;
    cxGridViewRecID: TcxGridDBColumn;
    cxGridViewREFERENCIA: TcxGridDBColumn;
    cxGridViewFECHA_REMESA: TcxGridDBColumn;
    cxGridViewDESCRIPCION: TcxGridDBColumn;
    cxGridViewIMPORTE_TOTAL: TcxGridDBColumn;
    cxGridViewNOMBRE: TcxGridDBColumn;
    cxGridViewENTIDAD: TcxGridDBColumn;
    cxGridViewSUCURSAL: TcxGridDBColumn;
    cxGridViewDC: TcxGridDBColumn;
    cxGridViewCUENTA: TcxGridDBColumn;
    cxGridViewTIPO: TcxGridDBColumn;
    procedure cxGridViewIDCustomDrawCell(
      Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
      AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
  protected
    FRemesasCliente: IBizRemesaCliente;
    function GetRemesasCliente: IBizRemesaCliente; virtual;
    procedure SetRemesasCliente(const Value: IBizRemesaCliente); virtual;
  public
    property RemesasCliente: IBizRemesaCliente read GetRemesasCliente write SetRemesasCliente;
  end;

implementation

uses uDataModuleRemesasCliente;


{$R *.dfm}

{ TfrViewRemesasCliente }

{
******************************* TfrViewRemesasCliente *******************************
}
function TfrViewRemesasCliente.GetRemesasCliente: IBizRemesaCliente;
begin
  Result := FRemesasCliente;
end;

procedure TfrViewRemesasCliente.SetRemesasCliente(const Value: IBizRemesaCliente);
begin
  FRemesasCliente := Value;
  if Assigned(FRemesasCliente) then
    dsDataSource.DataTable := FRemesasCliente.DataTable;
end;


procedure TfrViewRemesasCliente.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.
