uFactuGES_App.pas -> Limpieza de código

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@298 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2008-07-29 15:54:03 +00:00
parent da135bbbc2
commit bc9ba0bcf4

View File

@ -75,23 +75,12 @@ type
property Terminated : Boolean read GetTerminated; property Terminated : Boolean read GetTerminated;
property Configuracion : IConfiguracionController read GetConfiguracionController; property Configuracion : IConfiguracionController read GetConfiguracionController;
{ function getVAR_IDTIENDA : Integer;
procedure setVAR_IDTIENDA (AValue : Integer);
function getVAR_TIENDA : String;
procedure setVAR_TIENDA (AValue : String);
property VAR_IDTIENDA: Integer read getVAR_IDTIENDA write SetVAR_IDTIENDA;
property VAR_TIENDA: String read getVAR_TIENDA write setVAR_TIENDA;}
procedure ShowCapado; procedure ShowCapado;
end; end;
TAppFactuGES = class(TInterfacedObject, IAppFactuGES) TAppFactuGES = class(TInterfacedObject, IAppFactuGES)
private private
FVAR_IDTIENDA: Integer;
FVAR_TIENDA: String;
FEmpresasController : IEmpresasController; FEmpresasController : IEmpresasController;
FUsuariosController: IUsuariosController; FUsuariosController: IUsuariosController;
FEmpresaActiva: IBizEmpresa; FEmpresaActiva: IBizEmpresa;
@ -141,7 +130,6 @@ type
procedure UpdateSplashForm; procedure UpdateSplashForm;
public public
constructor Create; virtual; constructor Create; virtual;
destructor Destroy; override; destructor Destroy; override;
@ -171,14 +159,6 @@ type
property Terminated : Boolean read GetTerminated; property Terminated : Boolean read GetTerminated;
property Configuracion : IConfiguracionController read GetConfiguracionController; property Configuracion : IConfiguracionController read GetConfiguracionController;
function getVAR_IDTIENDA : Integer;
procedure setVAR_IDTIENDA (AValue : Integer);
function getVAR_TIENDA : String;
procedure setVAR_TIENDA (AValue : String);
property VAR_IDTIENDA: Integer read getVAR_IDTIENDA write setVAR_IDTIENDA;
property VAR_TIENDA: String read getVAR_TIENDA write setVAR_TIENDA;
procedure ShowCapado; procedure ShowCapado;
end; end;
@ -257,14 +237,16 @@ begin
end; end;
procedure TAppFactuGES.BuscarTiendaPorDefecto; procedure TAppFactuGES.BuscarTiendaPorDefecto;
var
AIDTienda : IBizEmpresaTienda;
begin begin
//Nos devuelve el id de la tienda a la que pertenece el vendedor que tiene asignado //Nos devuelve el id de la tienda a la que pertenece el vendedor que tiene asignado
//el usuario con el que ha accedido a la aplicación. //el usuario con el que ha accedido a la aplicación.
//Esto funciona mientras la relación sea 1 a 1, cuando sea 1 a n (un usuario pertenece a varios vendedores deja de funcionar) //Esto funciona mientras la relación sea 1 a 1, cuando sea 1 a n (un usuario pertenece a varios vendedores deja de funcionar)
FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID); FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID);
FTiendaActiva.DataTable.Open;
Assert(Assigned(FTiendaActiva));
if Assigned(FTiendaActiva) then
FTiendaActiva.DataTable.Open;
end; end;
constructor TAppFactuGES.Create; constructor TAppFactuGES.Create;
@ -298,7 +280,10 @@ begin
FConfiguracionController := NIL; FConfiguracionController := NIL;
FTiendaActiva := NIL;
FEjercicioActivo := NIL;
FEmpresaActiva := NIL; FEmpresaActiva := NIL;
FUsuariosController := NIL; FUsuariosController := NIL;
FEmpresasController := NIL; FEmpresasController := NIL;
@ -399,16 +384,6 @@ begin
Result := FUsuariosController; Result := FUsuariosController;
end; end;
function TAppFactuGES.getVAR_IDTIENDA: Integer;
begin
Result := FVAR_IDTIENDA;
end;
function TAppFactuGES.getVAR_TIENDA: String;
begin
Result := FVAR_TIENDA;
end;
procedure TAppFactuGES.HideSplashForm; procedure TAppFactuGES.HideSplashForm;
begin begin
if Assigned(FAppSplashForm) then if Assigned(FAppSplashForm) then
@ -463,7 +438,7 @@ begin
FDoLoadModulesEvent := ALoadModulesEvent; FDoLoadModulesEvent := ALoadModulesEvent;
end; end;
procedure TAppFactuGES.setVAR_IDTIENDA(AValue: Integer); {procedure TAppFactuGES.setVAR_IDTIENDA(AValue: Integer);
begin begin
FVAR_IDTIENDA := Avalue; FVAR_IDTIENDA := Avalue;
end; end;
@ -471,7 +446,7 @@ end;
procedure TAppFactuGES.setVAR_TIENDA(AValue: String); procedure TAppFactuGES.setVAR_TIENDA(AValue: String);
begin begin
FVAR_TIENDA := Avalue; FVAR_TIENDA := Avalue;
end; end;}
procedure TAppFactuGES.ShowCapado; procedure TAppFactuGES.ShowCapado;
begin begin