Desactivar el acceso a la ficha de referencias cuando no hay ninguna empresa elegida.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@813 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
32b78b5fa8
commit
1a9ff7d514
@ -307,6 +307,12 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
||||
OnExecute = actMenuInformesExecute
|
||||
OnUpdate = actMenuComprasUpdate
|
||||
end
|
||||
object actInformacionEmpresa: TAction
|
||||
Category = 'Empresa'
|
||||
Caption = 'Informaci'#243'n de empresa'
|
||||
OnExecute = actInformacionEmpresaExecute
|
||||
OnUpdate = actMenuComprasUpdate
|
||||
end
|
||||
end
|
||||
object ModulesSmallImageList: TPngImageList
|
||||
PngImages = <
|
||||
@ -601,8 +607,7 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
||||
end
|
||||
object Informacindeempresa1: TMenuItem
|
||||
Tag = 10
|
||||
Caption = 'Informaci'#243'n de empresa'
|
||||
OnClick = Informacindeempresa1Click
|
||||
Action = actInformacionEmpresa
|
||||
end
|
||||
end
|
||||
object Datos1: TMenuItem
|
||||
|
||||
@ -91,6 +91,7 @@ type
|
||||
actMenuEmpresa: TAction;
|
||||
Informes1: TMenuItem;
|
||||
actMenuInformes: TAction;
|
||||
actInformacionEmpresa: TAction;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Salir1Click(Sender: TObject);
|
||||
procedure actSalirExecute(Sender: TObject);
|
||||
@ -110,13 +111,13 @@ type
|
||||
procedure actVerBarraEstadoUpdate(Sender: TObject);
|
||||
procedure actVerBarraEstadoExecute(Sender: TObject);
|
||||
procedure Acercade1Click(Sender: TObject);
|
||||
procedure Informacindeempresa1Click(Sender: TObject);
|
||||
procedure Usuarios1Click(Sender: TObject);
|
||||
procedure Perfiles1Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure actMenuInformesExecute(Sender: TObject);
|
||||
procedure Listadeempresas1_OLDClick(Sender: TObject);
|
||||
procedure actInformacionEmpresaExecute(Sender: TObject);
|
||||
private
|
||||
FContenido : TCustomEditor;
|
||||
procedure ShowEmbedded(AEditor : ICustomEditor);
|
||||
@ -321,12 +322,6 @@ begin
|
||||
Result := pnlMain;
|
||||
end;
|
||||
|
||||
procedure TfPantallaPrincipal.Informacindeempresa1Click(Sender: TObject);
|
||||
begin
|
||||
if Assigned(AppFactuGES.EmpresaActiva) then
|
||||
AppFactuGES.EmpresasController.Ver(AppFactuGES.EmpresaActiva);
|
||||
end;
|
||||
|
||||
procedure TfPantallaPrincipal.InicializarUI;
|
||||
var
|
||||
AListaEmpresas : IBizEmpresa;
|
||||
@ -612,4 +607,9 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TfPantallaPrincipal.actInformacionEmpresaExecute(Sender: TObject);
|
||||
begin
|
||||
AppFactuGES.EmpresasController.Ver(AppFactuGES.EmpresaActiva);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -26,6 +26,7 @@ object PluginReferencias: TPluginReferencias
|
||||
Caption = 'Referencias'
|
||||
ImageIndex = 0
|
||||
OnExecute = actReferenciasExecute
|
||||
OnUpdate = actReferenciasUpdate
|
||||
end
|
||||
end
|
||||
object MainMenu: TMainMenu
|
||||
|
||||
@ -22,6 +22,7 @@ type
|
||||
Referencias1: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
procedure actReferenciasExecute(Sender: TObject);
|
||||
procedure actReferenciasUpdate(Sender: TObject);
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -32,7 +33,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
Forms, Dialogs, SysUtils,
|
||||
Forms, Dialogs, SysUtils, uFactuGES_App,
|
||||
uReferenciasController, uBizReferencias, uReferenciasViewRegister;
|
||||
|
||||
function GetModule : TModuleController;
|
||||
@ -53,6 +54,11 @@ begin
|
||||
AReferenciasController.VerTodos(AReferencias);
|
||||
end;
|
||||
|
||||
procedure TPluginReferencias.actReferenciasUpdate(Sender: TObject);
|
||||
begin
|
||||
(Sender as TAction).Enabled := Assigned(AppFactuGES.EmpresaActiva);
|
||||
end;
|
||||
|
||||
constructor TPluginReferencias.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user