FactuGES2/Source/Modulos/Contactos/Views/uEditorEmpleado.pas
david 9f3343c14e Contactos:
- Repaso general
- Cambiar 'empleados' por 'vendedores'
- Mover vendedores al menú de empresa. 
- Ocultar pestañas de formación y experiencia de un empleado.




git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@140 f4e31baf-9722-1c47-927c-6f952f962d4b
2008-02-24 15:24:06 +00:00

107 lines
3.1 KiB
ObjectPascal

unit uEditorEmpleado;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
uEditorContacto, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
JvFormPlacement, DB, uDADataTable, ImgList, PngImageList, StdActns, ActnList,
ComCtrls, TBX, TB2Item, TB2Dock, TB2Toolbar, ExtCtrls, JvExControls,
JvComponent, JvNavigationPane, uCustomView, uViewBase, uViewContacto,
uViewEmpleado, uBizContactos,
uIEditorEmpleado, pngimage, TBXStatusBars, JvExComCtrls, JvStatusBar,
uViewDetallesGenerico, uViewContactoDatosBancarios, dxLayoutLookAndFeels,
dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMemo, cxDBEdit, cxControls,
uDAInterfaces;
type
TfEditorEmpleado = class(TfEditorContacto, IEditorEmpleado)
frViewEmpleado1: TfrViewEmpleado;
pagFormacion: TTabSheet;
pagExperiencia: TTabSheet;
dxLayoutControl1Group_Root: TdxLayoutGroup;
dxLayoutControl1: TdxLayoutControl;
dxLayoutControl1Item1: TdxLayoutItem;
eFormacionBasica: TcxDBMemo;
dxLayoutControl1Group1: TdxLayoutGroup;
dxLayoutControl1Item2: TdxLayoutItem;
eFormacionComplementaria: TcxDBMemo;
dxLayoutControl1Group2: TdxLayoutGroup;
dxLayoutControl1Item3: TdxLayoutItem;
eFormacionRecibida: TcxDBMemo;
dxLayoutControl1Group3: TdxLayoutGroup;
dxLayoutControl2: TdxLayoutControl;
eExperiencia: TcxDBMemo;
dxLayoutGroup1: TdxLayoutGroup;
dxLayoutGroup3: TdxLayoutGroup;
dxLayoutItem1: TdxLayoutItem;
actGruposEmpleado: TAction;
procedure actGruposEmpleadoExecute(Sender: TObject);
protected
procedure EliminarInterno; override;
procedure SetContacto(const Value: IBizContacto); override;
public
constructor Create(AOwner: TComponent); override;
procedure PonerTitulos(const ATitulo: string = ''); override;
end;
implementation
uses
uEditorDBItem, uDialogUtils, uGruposEmpleadoController, uBizGruposEmpleado;
{$R *.dfm}
{ TfEditorEmpleado }
procedure TfEditorEmpleado.actGruposEmpleadoExecute(Sender: TObject);
var
AGruposController : IGruposEmpleadoController;
AGrupos : IBizGrupoEmpleado;
begin
AGruposController := TGruposEmpleadoController.Create;
try
AGrupos := (AGruposController.BuscarTodos as IBizGrupoEmpleado);
AGruposController.VerTodos(AGrupos);
finally
AGrupos := NIL;
AGruposController := NIL;
end;
end;
constructor TfEditorEmpleado.Create(AOwner: TComponent);
begin
inherited;
ViewContacto := frViewEmpleado1;
pagFormacion.TabVisible := False;
pagExperiencia.TabVisible := False;
end;
procedure TfEditorEmpleado.EliminarInterno;
begin
if (ShowConfirmMessage('¿Desea borrar este vendedor?', '') = IDYES) then
inherited;
end;
procedure TfEditorEmpleado.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
if Assigned(Contacto) then
begin
if Contacto.EsNuevo then
FTitulo := 'Nuevo vendedor'
else
FTitulo := 'Vendedor';
end;
inherited PonerTitulos(FTitulo);
end;
procedure TfEditorEmpleado.SetContacto(const Value: IBizContacto);
begin
inherited;
end;
end.