unit uViewHistorialCargasEDI; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewGridBase, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, dxPSCore, ActnList, uDADataTable, cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, uBizEDILog, cxCheckBox, uViewGrid, cxCalendar, cxTextEdit, uDataModuleFicherosEDI, uDAInterfaces; type IViewHistorialCargasEDI = interface(IViewGrid) ['{556EBF85-7F86-49CB-A8BF-EBF299AAF9E5}'] function GetEDILog: IBizEDILog; procedure SetEDILog(const Value: IBizEDILog); property EDILog: IBizEDILog read GetEDILog write SetEDILog; end; TfrViewHistorialCargasEDI = class(TfrViewGrid, IViewHistorialCargasEDI) cxGridViewFECHA: TcxGridDBColumn; cxGridViewOK: TcxGridDBColumn; cxGridViewERROR_MSG: TcxGridDBColumn; cxGridViewREPORT: TcxGridDBColumn; procedure cxGridViewFECHAGetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: String); protected FEDILog : IBizEDILog; function GetEDILog: IBizEDILog; procedure SetEDILog(const Value: IBizEDILog); public property EDILog: IBizEDILog read GetEDILog write SetEDILog; end; implementation uses DateUtils; {$R *.dfm} { TfrViewHistorialCargasEDI } function TfrViewHistorialCargasEDI.GetEDILog: IBizEDILog; begin Result := FEDILog; end; procedure TfrViewHistorialCargasEDI.SetEDILog(const Value: IBizEDILog); begin FEDILog := Value; dsDataSource.DataTable := FEDILog.DataTable; end; procedure TfrViewHistorialCargasEDI.cxGridViewFECHAGetDisplayText( Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: String); var ADate : TDateTime; begin inherited; { ADate := ARecord.Values[Sender.Index]; if DaysBetween(ADate, Now) = 0 then AText := FormatDateTime('hh:mm', ADate)} end; end.