Se adapta el programa para que multiempresa sea una variable de compilacion
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@984 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
bdcec9068f
commit
48df643567
@ -150,6 +150,7 @@ var
|
||||
AppFactuGES : IAppFactuGES = nil;
|
||||
|
||||
implementation
|
||||
{$INCLUDE ..\FactuGES.inc}
|
||||
|
||||
uses
|
||||
Windows, Dialogs, JSDialog, JSDialogs, uDialogUtils, cxControls, uUsuariosViewRegister,
|
||||
@ -400,9 +401,13 @@ begin
|
||||
end;
|
||||
AEmpresas.DataTable.First;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
if JsDialog.Execute <> IDCANCEL then
|
||||
if JsDialog.CustomButtonResult > 0 then
|
||||
CambiarEmpresa(JsDialog.CustomButtonResult);
|
||||
{$ELSE}
|
||||
CambiarEmpresa(AEmpresas.ID);
|
||||
{$ENDIF}
|
||||
|
||||
finally
|
||||
FreeAndNIL(JsDialog);
|
||||
|
||||
@ -42,6 +42,7 @@ var
|
||||
NavPaneController : TNavPaneController;
|
||||
|
||||
implementation
|
||||
{$INCLUDE ..\FactuGES.inc}
|
||||
|
||||
uses
|
||||
Dialogs, uModuleController, uAcercaDe, uNavPaneUtils,
|
||||
@ -127,8 +128,11 @@ begin
|
||||
AEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
|
||||
try
|
||||
AEmpresas.DataTable.Active := True;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
while not AEmpresas.DataTable.EOF do
|
||||
begin
|
||||
{$ENDIF}
|
||||
|
||||
// Buscar la página si existe
|
||||
AIndex := EncontrarPagina(FNavigationPane, AEmpresas.NOMBRE);
|
||||
@ -163,8 +167,11 @@ begin
|
||||
ASeccion.Height := ASeccion.Height + ADivisor.Height;
|
||||
end;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
AEmpresas.DataTable.Next;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
AEmpresas.DataTable.Active := False;
|
||||
finally
|
||||
AEmpresas := NIL;
|
||||
|
||||
@ -142,6 +142,7 @@ var
|
||||
fPantallaPrincipal: TfPantallaPrincipal;
|
||||
|
||||
implementation
|
||||
{$INCLUDE ..\FactuGES.inc}
|
||||
|
||||
uses
|
||||
uSplash, uAcercaDe, UxTheme, Themes, uMenuUtils, uBizEmpresas,
|
||||
@ -477,6 +478,11 @@ constructor TfPantallaPrincipal.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
{$ELSE}
|
||||
Listadeempresas1_OLD.Destroy;
|
||||
{$ENDIF}
|
||||
|
||||
FContenido := NIL;
|
||||
|
||||
with AppFactuGES.ModuleManager do
|
||||
|
||||
1
Source/FactuGES.inc
Normal file
1
Source/FactuGES.inc
Normal file
@ -0,0 +1 @@
|
||||
{$DEFINE MULTIEMPRESA}
|
||||
Loading…
Reference in New Issue
Block a user