2010-08-11 10:53:06 +00:00
|
|
|
|
unit uViewClientes;
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
|
Dialogs, uViewContactos, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
|
|
|
|
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, uDADataTable,
|
|
|
|
|
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
|
|
|
|
|
cxClasses, cxControls, cxGridCustomView, cxGrid, JvComponent,
|
|
|
|
|
|
JvFormAutoSize, cxImage, PngImageList, ImgList, dxPSGlbl, dxPSUtl,
|
|
|
|
|
|
dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider,
|
|
|
|
|
|
dxPSFillPatterns, dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore,
|
|
|
|
|
|
dxPScxCommon, cxImageComboBox, cxGridCustomPopupMenu, cxGridPopupMenu,
|
|
|
|
|
|
dxPScxGrid6Lnk, ExtCtrls, JvComponentBase, JvBalloonHint, JvHint,
|
|
|
|
|
|
uViewFiltroBase, dxPgsDlg, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock,
|
|
|
|
|
|
uDAInterfaces, cxTextEdit, Menus, uCustomView, uViewBase;
|
|
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
IViewClientes = interface(IViewContactos)
|
|
|
|
|
|
['{7964E0AB-3075-43E7-94BC-513D80A1C116}']
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
TfrViewClientes = class(TfrViewContactos, IViewClientes)
|
|
|
|
|
|
cxGridViewNOMBRE_COMERCIAL: TcxGridDBColumn;
|
|
|
|
|
|
cxGridViewBLOQUEADO: TcxGridDBColumn;
|
|
|
|
|
|
cxGridViewTiendaWeb: TcxGridDBColumn;
|
|
|
|
|
|
cxGridViewFELICITACION: TcxGridDBColumn;
|
|
|
|
|
|
cxGridViewRAPEL: TcxGridDBColumn;
|
|
|
|
|
|
cxGridViewAGENTE: TcxGridDBColumn;
|
2010-10-06 10:32:34 +00:00
|
|
|
|
TBXSeparatorItem1: TTBXSeparatorItem;
|
|
|
|
|
|
TBXItem2: TTBXItem;
|
|
|
|
|
|
actAgentes: TAction;
|
2010-08-11 10:53:06 +00:00
|
|
|
|
procedure cxGridViewICONOGetCellHint(Sender: TcxCustomGridTableItem;
|
|
|
|
|
|
ARecord: TcxCustomGridRecord; ACellViewInfo: TcxGridTableDataCellViewInfo;
|
|
|
|
|
|
const AMousePos: TPoint; var AHintText: TCaption;
|
|
|
|
|
|
var AIsHintMultiLine: Boolean; var AHintTextRect: TRect);
|
|
|
|
|
|
procedure cxGridViewFELICITACIONGetCellHint(Sender: TcxCustomGridTableItem;
|
|
|
|
|
|
ARecord: TcxCustomGridRecord; ACellViewInfo: TcxGridTableDataCellViewInfo;
|
|
|
|
|
|
const AMousePos: TPoint; var AHintText: TCaption;
|
|
|
|
|
|
var AIsHintMultiLine: Boolean; var AHintTextRect: TRect);
|
2010-10-06 10:32:34 +00:00
|
|
|
|
procedure actAgentesExecute(Sender: TObject);
|
|
|
|
|
|
procedure actAgentesUpdate(Sender: TObject);
|
2010-08-11 10:53:06 +00:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
|
|
uses uViewGridBase;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-06 10:32:34 +00:00
|
|
|
|
procedure TfrViewClientes.actAgentesExecute(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if (cxGridViewAGENTE.GroupIndex < 0) then
|
|
|
|
|
|
begin
|
|
|
|
|
|
cxGridViewAGENTE.GroupIndex := cxGridView.GroupedColumnCount;
|
|
|
|
|
|
cxGridViewAGENTE.Visible := False;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
cxGridViewAGENTE.GroupIndex := -1;
|
|
|
|
|
|
cxGridViewAGENTE.Visible := True;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrViewClientes.actAgentesUpdate(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
inherited;
|
|
|
|
|
|
(Sender as TAction).Checked := not (cxGridViewAGENTE.GroupIndex < 0);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2010-08-11 10:53:06 +00:00
|
|
|
|
procedure TfrViewClientes.cxGridViewFELICITACIONGetCellHint(
|
|
|
|
|
|
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
|
|
|
|
|
ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint;
|
|
|
|
|
|
var AHintText: TCaption; var AIsHintMultiLine: Boolean;
|
|
|
|
|
|
var AHintTextRect: TRect);
|
|
|
|
|
|
begin
|
|
|
|
|
|
inherited;
|
|
|
|
|
|
if (cxGridView.DataController.DisplayTexts[ARecord.Index, cxGridViewFELICITACION.Index] = '1') then
|
|
|
|
|
|
AHintText := 'Enviar felicitaci<63>n navide<64>a';
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrViewClientes.cxGridViewICONOGetCellHint(
|
|
|
|
|
|
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
|
|
|
|
|
ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint;
|
|
|
|
|
|
var AHintText: TCaption; var AIsHintMultiLine: Boolean;
|
|
|
|
|
|
var AHintTextRect: TRect);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if (cxGridView.DataController.DisplayTexts[ARecord.Index, cxGridViewBLOQUEADO.Index] = '1') then
|
|
|
|
|
|
AHintText := 'Cliente bloqueado';
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end.
|