unit uEditorClientes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uEditorContactos, Menus, ImgList, PngImageList, StdActns,
  ActnList, TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar,
  JvExControls, JvComponent, JvNavigationPane, DB, uDADataTable,
  JvFormAutoSize, ComCtrls, uDAScriptingProvider, uDACDSDataTable, StdCtrls,
  JvAppStorage, JvAppRegistryStorage, JvFormPlacement, uCustomView,
  uViewBase, uViewBarraSeleccion, ExtCtrls, pngimage, JvComponentBase,

  uIEditorClientes, uViewGridBase, uViewGrid, uViewContactos, uViewClientes,
  TBXStatusBars, JvExComCtrls, JvStatusBar;

type
  TfEditorClientes = class(TfEditorContactos, IEditorClientes)
    frViewClientes1: TfrViewClientes;
  protected
    procedure EliminarInterno; override;
  public
    constructor Create(AOwner: TComponent); override;
    procedure PonerTitulos(const ATitulo: string = ''); override;
  end;
  
implementation

uses
  uDataModuleContactos, uDataModuleBase, uEditorGridBase, uBizContactos,
  uDBSelectionListUtils, uDataModuleUsuarios;

{$R *.dfm}


{
******************************* TfEditorClientes *******************************
}
constructor TfEditorClientes.Create(AOwner: TComponent);
begin
  inherited;
  ViewGrid := frViewClientes1; //CreateView(TfrViewClientes) as IViewContactos;
end;

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

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

end.
