58 lines
1.4 KiB
ObjectPascal
58 lines
1.4 KiB
ObjectPascal
|
|
unit uEditorAgente;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
|
Dialogs, uEditorContacto, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
|
|||
|
|
JvFormPlacement, DB, uDADataTable, ImgList, PngImageList, StdActns, ActnList,
|
|||
|
|
ComCtrls, TBX, TB2Item, TB2Dock, TB2Toolbar, ExtCtrls, JvExControls,
|
|||
|
|
JvComponent, JvNavigationPane, uCustomView, uViewBase, uViewContacto,
|
|||
|
|
uViewAgente,
|
|||
|
|
uIEditorAgente, pngimage, TBXStatusBars, JvExComCtrls, JvStatusBar;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfEditorAgente = class(TfEditorContacto, IEditorAgente)
|
|||
|
|
frViewAgente1: TfrViewAgente;
|
|||
|
|
protected
|
|||
|
|
procedure EliminarInterno; override;
|
|||
|
|
public
|
|||
|
|
constructor Create(AOwner: TComponent); override;
|
|||
|
|
procedure PonerTitulos(const ATitulo: string = ''); override;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
|
|||
|
|
{ TfEditorAgente }
|
|||
|
|
|
|||
|
|
constructor TfEditorAgente.Create(AOwner: TComponent);
|
|||
|
|
begin
|
|||
|
|
inherited;
|
|||
|
|
ViewContacto := frViewAgente1;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfEditorAgente.EliminarInterno;
|
|||
|
|
begin
|
|||
|
|
if (Application.MessageBox('<27>Desea borrar este agente?', 'Atenci<63>n', MB_YESNO) = IDYES) then
|
|||
|
|
inherited;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfEditorAgente.PonerTitulos(const ATitulo: string);
|
|||
|
|
var
|
|||
|
|
FTitulo : String;
|
|||
|
|
begin
|
|||
|
|
if Assigned(Contacto) then
|
|||
|
|
begin
|
|||
|
|
if Contacto.EsNuevo then
|
|||
|
|
FTitulo := 'Nuevo agente'
|
|||
|
|
else
|
|||
|
|
FTitulo := 'Agente';
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
inherited PonerTitulos(FTitulo);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|