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;
|
AppFactuGES : IAppFactuGES = nil;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
{$INCLUDE ..\FactuGES.inc}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Dialogs, JSDialog, JSDialogs, uDialogUtils, cxControls, uUsuariosViewRegister,
|
Windows, Dialogs, JSDialog, JSDialogs, uDialogUtils, cxControls, uUsuariosViewRegister,
|
||||||
@ -400,9 +401,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
AEmpresas.DataTable.First;
|
AEmpresas.DataTable.First;
|
||||||
|
|
||||||
|
{$IFDEF MULTIEMPRESA}
|
||||||
if JsDialog.Execute <> IDCANCEL then
|
if JsDialog.Execute <> IDCANCEL then
|
||||||
if JsDialog.CustomButtonResult > 0 then
|
if JsDialog.CustomButtonResult > 0 then
|
||||||
CambiarEmpresa(JsDialog.CustomButtonResult);
|
CambiarEmpresa(JsDialog.CustomButtonResult);
|
||||||
|
{$ELSE}
|
||||||
|
CambiarEmpresa(AEmpresas.ID);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FreeAndNIL(JsDialog);
|
FreeAndNIL(JsDialog);
|
||||||
|
|||||||
@ -42,6 +42,7 @@ var
|
|||||||
NavPaneController : TNavPaneController;
|
NavPaneController : TNavPaneController;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
{$INCLUDE ..\FactuGES.inc}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Dialogs, uModuleController, uAcercaDe, uNavPaneUtils,
|
Dialogs, uModuleController, uAcercaDe, uNavPaneUtils,
|
||||||
@ -127,8 +128,11 @@ begin
|
|||||||
AEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
|
AEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
|
||||||
try
|
try
|
||||||
AEmpresas.DataTable.Active := True;
|
AEmpresas.DataTable.Active := True;
|
||||||
|
|
||||||
|
{$IFDEF MULTIEMPRESA}
|
||||||
while not AEmpresas.DataTable.EOF do
|
while not AEmpresas.DataTable.EOF do
|
||||||
begin
|
begin
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
// Buscar la página si existe
|
// Buscar la página si existe
|
||||||
AIndex := EncontrarPagina(FNavigationPane, AEmpresas.NOMBRE);
|
AIndex := EncontrarPagina(FNavigationPane, AEmpresas.NOMBRE);
|
||||||
@ -163,8 +167,11 @@ begin
|
|||||||
ASeccion.Height := ASeccion.Height + ADivisor.Height;
|
ASeccion.Height := ASeccion.Height + ADivisor.Height;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF MULTIEMPRESA}
|
||||||
AEmpresas.DataTable.Next;
|
AEmpresas.DataTable.Next;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
AEmpresas.DataTable.Active := False;
|
AEmpresas.DataTable.Active := False;
|
||||||
finally
|
finally
|
||||||
AEmpresas := NIL;
|
AEmpresas := NIL;
|
||||||
|
|||||||
@ -142,6 +142,7 @@ var
|
|||||||
fPantallaPrincipal: TfPantallaPrincipal;
|
fPantallaPrincipal: TfPantallaPrincipal;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
{$INCLUDE ..\FactuGES.inc}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uSplash, uAcercaDe, UxTheme, Themes, uMenuUtils, uBizEmpresas,
|
uSplash, uAcercaDe, UxTheme, Themes, uMenuUtils, uBizEmpresas,
|
||||||
@ -477,6 +478,11 @@ constructor TfPantallaPrincipal.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
|
{$IFDEF MULTIEMPRESA}
|
||||||
|
{$ELSE}
|
||||||
|
Listadeempresas1_OLD.Destroy;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
FContenido := NIL;
|
FContenido := NIL;
|
||||||
|
|
||||||
with AppFactuGES.ModuleManager do
|
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