git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/tags/1.2.0@6 c93665c3-c93d-084d-9b98-7d5f4a9c3376
57 lines
1.5 KiB
ObjectPascal
57 lines
1.5 KiB
ObjectPascal
unit uViewCliente;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uViewContacto, DB, uDADataTable, DBCtrls,
|
|
StdCtrls, Mask, ExtCtrls, uCustomView, uAgentesController,
|
|
uViewBase, JvComponent, JvFormAutoSize, cxControls, uBizContactos,
|
|
cxContainer, cxEdit, cxTextEdit, cxDBEdit, dxLayoutLookAndFeels,
|
|
dxLayoutControl, cxMemo, cxHyperLinkEdit, ImgList, ActnList, Buttons,
|
|
PngSpeedButton, PngImageList, cxGraphics, cxMaskEdit, cxDropDownEdit,
|
|
cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox;
|
|
|
|
type
|
|
IViewCliente = interface(IViewContacto)
|
|
['{C06F4653-1745-4B7E-A3DC-102B2F23238E}']
|
|
end;
|
|
|
|
TfrViewCliente = class(TfrViewContacto, IViewCliente)
|
|
dxLayoutControlContactoItem19: TdxLayoutItem;
|
|
eAgente: TcxDBLookupComboBox;
|
|
dsAgentes: TDADataSource;
|
|
private
|
|
FAgentesController : IAgentesController;
|
|
protected
|
|
procedure SetContacto(const Value: IBizContacto); override;
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
end;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
{ TfrViewCliente }
|
|
|
|
constructor TfrViewCliente.Create(AOwner: TComponent);
|
|
begin
|
|
inherited;
|
|
FAgentesController := TAgentesController.Create;
|
|
end;
|
|
|
|
procedure TfrViewCliente.SetContacto(const Value: IBizContacto);
|
|
begin
|
|
inherited;
|
|
if Assigned(Contacto) then
|
|
begin
|
|
dsAgentes.DataTable := FAgentesController.BuscarTodos.DataTable;
|
|
dsAgentes.DataTable.Active := True;
|
|
end
|
|
else
|
|
dsAgentes.DataTable := NIL;
|
|
end;
|
|
|
|
end.
|