unit uEditorVendedores;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, 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, uViewVendedores, uIEditorVendedores, pngimage, TBXStatusBars,
  JvExComCtrls, JvStatusBar;

type
  TfEditorVendedores = class(TfEditorContactos, IEditorVendedores)
    frViewVendedores1: TfrViewVendedores;
  protected
    procedure EliminarInterno; override;
  public
    constructor Create(AOwner: TComponent); override;
    procedure PonerTitulos(const ATitulo: string = ''); override;
  end;

var
  fEditorVendedores: TfEditorVendedores;

implementation

uses
  uEditorGridBase, uDataModuleUsuarios;

{$R *.dfm}

constructor TfEditorVendedores.Create(AOwner: TComponent);
begin
  inherited;
  ViewGrid := frViewVendedores1;
end;

procedure TfEditorVendedores.EliminarInterno;
begin
  if (Application.MessageBox('¿Desea borrar este vendedor?', 'Atención', MB_YESNO) = IDYES) then
    inherited;
end;

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

end.
