unit uEditorAgentes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  uEditorContactos, Menus, DB, uDADataTable, JvAppStorage,
  JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList,
  StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
  TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, ExtCtrls,
  JvExControls, JvComponent, JvNavigationPane, uViewGridBase, uViewGrid,
  uViewContactos, uViewAgentes, uIEditorAgentes, pngimage, TBXStatusBars,
  JvExComCtrls, JvStatusBar;

type
  TfEditorAgentes = class(TfEditorContactos, IEditorAgentes)
    frViewAgentes1: TfrViewAgentes;
  protected
    procedure EliminarInterno; override;
  public
    constructor Create(AOwner: TComponent); override;
    procedure PonerTitulos(const ATitulo: string = ''); override;
  end;

implementation

uses
  uEditorGridBase, uDataModuleUsuarios, uDialogUtils;

{$R *.dfm}

constructor TfEditorAgentes.Create(AOwner: TComponent);
begin
  inherited;
  ViewGrid := frViewAgentes1;
end;

procedure TfEditorAgentes.EliminarInterno;
begin
  if (ShowConfirmMessage('¿Desea borrar este agente?', '') = IDYES) then
    inherited;
end;

procedure TfEditorAgentes.PonerTitulos(const ATitulo: string);
var
  FTitulo : String;
begin
  FTitulo := 'Lista de agentes - ' + dmUsuarios.EmpresaActual.NOMBRE;
  inherited PonerTitulos(FTitulo);
end;

end.
