Se cambia para que multiempresa sea una variable de compilacion

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@493 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
roberto 2009-12-17 15:19:47 +00:00
parent fb65b1f505
commit 9ba0a9bbf4
4 changed files with 26 additions and 4 deletions

View File

@ -188,6 +188,7 @@ var
AppFactuGES : IAppFactuGES; AppFactuGES : IAppFactuGES;
implementation implementation
{$INCLUDE ..\FactuGES.inc}
uses uses
Windows, Dialogs, JSDialog, JSDialogs, uDialogUtils, cxControls, uUsuariosViewRegister, uDMBase, Windows, Dialogs, JSDialog, JSDialogs, uDialogUtils, cxControls, uUsuariosViewRegister, uDMBase,
@ -520,9 +521,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);

View File

@ -42,6 +42,7 @@ var
NavPaneController : TNavPaneController; NavPaneController : TNavPaneController;
implementation implementation
{$INCLUDE ..\FactuGES.inc}
uses uses
Dialogs, uModuleController, uAcercaDe, uNavPaneUtils, Dialogs, uModuleController, uAcercaDe, uNavPaneUtils,
@ -112,6 +113,7 @@ var
begin begin
AListaSecciones := TStringList.Create; AListaSecciones := TStringList.Create;
AListaSecciones.Duplicates := dupIgnore; AListaSecciones.Duplicates := dupIgnore;
AEmpresasCount := 0;
try try
// Guardar la lista de secciones (Ventas, Compras, etc...) // Guardar la lista de secciones (Ventas, Compras, etc...)
@ -128,10 +130,14 @@ 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
ASeccionPadre := NIL; {$ENDIF}
AIndex := -1;
// ASeccionPadre := NIL;
// AIndex := -1;
// Buscar la página si existe // Buscar la página si existe
AIndex := EncontrarPagina(FNavigationPane, AEmpresas.NOMBRE); AIndex := EncontrarPagina(FNavigationPane, AEmpresas.NOMBRE);
@ -166,15 +172,17 @@ 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;
end; end;
finally finally
AListaSecciones.Free; FreeAndNIL(AListaSecciones);
AListaSecciones := NIL;
end; end;
end; end;

View File

@ -150,6 +150,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,
@ -501,6 +502,13 @@ end;
constructor TfPantallaPrincipal.Create(AOwner: TComponent); 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

View File

@ -1,3 +1,4 @@
{$DEFINE MULTIEMPRESA}
{DEFINE ALMACEN} {DEFINE ALMACEN}
{DEFINE PEDIDOSPROVEEDOR} {DEFINE PEDIDOSPROVEEDOR}
{$DEFINE CONTABILIDAD} {$DEFINE CONTABILIDAD}