Adaptación a multiempresa (en proceso).
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@287 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
a7b3426126
commit
3d3d407d7a
@ -65,8 +65,6 @@ contains
|
|||||||
uEditorEmpresa in 'Empresas\Views\uEditorEmpresa.pas' {fEditorEmpresa: TCustomEditor},
|
uEditorEmpresa in 'Empresas\Views\uEditorEmpresa.pas' {fEditorEmpresa: TCustomEditor},
|
||||||
uEmpresasViewRegister in 'Empresas\Views\uEmpresasViewRegister.pas',
|
uEmpresasViewRegister in 'Empresas\Views\uEmpresasViewRegister.pas',
|
||||||
uViewDatosBancarios in 'Empresas\Views\uViewDatosBancarios.pas' {frViewDatosBancarios: TCustomView},
|
uViewDatosBancarios in 'Empresas\Views\uViewDatosBancarios.pas' {frViewDatosBancarios: TCustomView},
|
||||||
schUsuariosServer_Intf in 'Usuarios\Model\schUsuariosServer_Intf.pas',
|
|
||||||
schUsuariosClient_Intf in 'Usuarios\Model\schUsuariosClient_Intf.pas',
|
|
||||||
uIEditorLogin in 'Usuarios\Controller\View\uIEditorLogin.pas',
|
uIEditorLogin in 'Usuarios\Controller\View\uIEditorLogin.pas',
|
||||||
uEditorLogin in 'Usuarios\Views\uEditorLogin.pas' {fEditorLogin: TCustomEditor},
|
uEditorLogin in 'Usuarios\Views\uEditorLogin.pas' {fEditorLogin: TCustomEditor},
|
||||||
uUsuariosViewRegister in 'Usuarios\Views\uUsuariosViewRegister.pas',
|
uUsuariosViewRegister in 'Usuarios\Views\uUsuariosViewRegister.pas',
|
||||||
@ -109,6 +107,8 @@ contains
|
|||||||
uViewConfiguracionBase in 'Configuracion\Views\uViewConfiguracionBase.pas' {frViewConfiguracionBase: TCustomView},
|
uViewConfiguracionBase in 'Configuracion\Views\uViewConfiguracionBase.pas' {frViewConfiguracionBase: TCustomView},
|
||||||
uEditorConfiguracion in 'Configuracion\Views\uEditorConfiguracion.pas' {fConfiguracionEditor},
|
uEditorConfiguracion in 'Configuracion\Views\uEditorConfiguracion.pas' {fConfiguracionEditor},
|
||||||
uViewConfiguracionGeneral in 'Configuracion\Views\uViewConfiguracionGeneral.pas' {frViewConfiguracionGeneral: TFrame},
|
uViewConfiguracionGeneral in 'Configuracion\Views\uViewConfiguracionGeneral.pas' {frViewConfiguracionGeneral: TFrame},
|
||||||
uIViewConfiguracionBase in 'Configuracion\Controller\Views\uIViewConfiguracionBase.pas';
|
uIViewConfiguracionBase in 'Configuracion\Controller\Views\uIViewConfiguracionBase.pas',
|
||||||
|
schUsuariosClient_Intf in 'Usuarios\Model\schUsuariosClient_Intf.pas',
|
||||||
|
schUsuariosServer_Intf in 'Usuarios\Model\schUsuariosServer_Intf.pas';
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -46,15 +46,6 @@
|
|||||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||||
<BorlandProject>
|
<BorlandProject>
|
||||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\DataAbstract_SQLiteDriver_D11.bpl">RemObjects Data Abstract - SQLite Driver</Excluded_Packages>
|
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\DataAbstract_SQLiteDriver_D11.bpl">RemObjects Data Abstract - SQLite Driver</Excluded_Packages>
|
||||||
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
@ -65,22 +56,6 @@
|
|||||||
<DelphiCompile Include="ApplicationBase.dpk">
|
<DelphiCompile Include="ApplicationBase.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\Cliente\adortl.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\Base.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\cxLibraryD11.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\DataAbstract_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\dbrtl.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\dsnap.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\dxGDIPlusD11.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\dxNavBarD11.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\dxThemeD11.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\GUIBase.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\JvJansD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\RemObjects_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\rtl.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\vcl.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\vcldb.dcp" />
|
|
||||||
<DCCReference Include="..\Cliente\vcljpg.dcp" />
|
|
||||||
<DCCReference Include="Configuracion\Controller\uConfiguracionController.pas" />
|
<DCCReference Include="Configuracion\Controller\uConfiguracionController.pas" />
|
||||||
<DCCReference Include="Configuracion\Controller\Views\uIViewConfiguracionBase.pas" />
|
<DCCReference Include="Configuracion\Controller\Views\uIViewConfiguracionBase.pas" />
|
||||||
<DCCReference Include="Configuracion\Views\uEditorConfiguracion.pas">
|
<DCCReference Include="Configuracion\Views\uEditorConfiguracion.pas">
|
||||||
@ -179,10 +154,26 @@
|
|||||||
<Form>DataModuleUsuarios</Form>
|
<Form>DataModuleUsuarios</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
<DCCReference Include="Usuarios\Data\uUCROConn.pas" />
|
<DCCReference Include="Usuarios\Data\uUCROConn.pas" />
|
||||||
|
<DCCReference Include="Usuarios\Model\adortl.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\Base.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\cxLibraryD11.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\DataAbstract_Core_D11.dcp" />
|
||||||
<DCCReference Include="Usuarios\Model\Data\uIDataModuleUsuarios.pas" />
|
<DCCReference Include="Usuarios\Model\Data\uIDataModuleUsuarios.pas" />
|
||||||
|
<DCCReference Include="Usuarios\Model\dbrtl.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\dsnap.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\dxGDIPlusD11.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\dxNavBarD11.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\dxThemeD11.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\GUIBase.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\JvJansD11R.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\RemObjects_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\rtl.dcp" />
|
||||||
<DCCReference Include="Usuarios\Model\schUsuariosClient_Intf.pas" />
|
<DCCReference Include="Usuarios\Model\schUsuariosClient_Intf.pas" />
|
||||||
<DCCReference Include="Usuarios\Model\schUsuariosServer_Intf.pas" />
|
<DCCReference Include="Usuarios\Model\schUsuariosServer_Intf.pas" />
|
||||||
<DCCReference Include="Usuarios\Model\uBizUsuarios.pas" />
|
<DCCReference Include="Usuarios\Model\uBizUsuarios.pas" />
|
||||||
|
<DCCReference Include="Usuarios\Model\vcl.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\vcldb.dcp" />
|
||||||
|
<DCCReference Include="Usuarios\Model\vcljpg.dcp" />
|
||||||
<DCCReference Include="Usuarios\Views\uEditorCambiarPassword.pas">
|
<DCCReference Include="Usuarios\Views\uEditorCambiarPassword.pas">
|
||||||
<Form>fEditorCambiarPassword</Form>
|
<Form>fEditorCambiarPassword</Form>
|
||||||
<DesignClass>TCustomEditor</DesignClass>
|
<DesignClass>TCustomEditor</DesignClass>
|
||||||
|
|||||||
@ -13,9 +13,9 @@ type
|
|||||||
procedure SetController (const Value : ITiendasEmpresaController);
|
procedure SetController (const Value : ITiendasEmpresaController);
|
||||||
property Controller : ITiendasEmpresaController read GetController write SetController;
|
property Controller : ITiendasEmpresaController read GetController write SetController;
|
||||||
|
|
||||||
function GetTienda: IBizEmpresasTiendas;
|
function GetTienda: IBizEmpresaTienda;
|
||||||
procedure SetTienda(const Value: IBizEmpresasTiendas);
|
procedure SetTienda(const Value: IBizEmpresaTienda);
|
||||||
property Tienda: IBizEmpresasTiendas read GetTienda write SetTienda;
|
property Tienda: IBizEmpresaTienda read GetTienda write SetTienda;
|
||||||
|
|
||||||
function ShowModal : Integer;
|
function ShowModal : Integer;
|
||||||
procedure Release;
|
procedure Release;
|
||||||
|
|||||||
@ -5,7 +5,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Forms, Classes, Controls, Contnrs, SysUtils,
|
Windows, Forms, Classes, Controls, Contnrs, SysUtils,
|
||||||
uBizEmpresas, uIDataModuleEmpresas, uDADataTable, uControllerBase;
|
uBizEmpresas, uIDataModuleEmpresas, uDADataTable, uControllerBase,
|
||||||
|
uBizEmpresasTiendas, uTiendasEmpresaController;
|
||||||
|
|
||||||
type
|
type
|
||||||
IEmpresasController = interface(IControllerBase)
|
IEmpresasController = interface(IControllerBase)
|
||||||
@ -24,12 +25,18 @@ type
|
|||||||
function ToStringList(AEmpresa : IBizEmpresa) : TStringList;
|
function ToStringList(AEmpresa : IBizEmpresa) : TStringList;
|
||||||
|
|
||||||
function DarListaTiendas(AEmpresa : IBizEmpresa): TStringList;
|
function DarListaTiendas(AEmpresa : IBizEmpresa): TStringList;
|
||||||
|
function DarTiendaUsuario(AEmpresa: IBizEmpresa; const ID_USUARIO: Integer): IBizEmpresaTienda;
|
||||||
|
|
||||||
|
function GetTiendasController : ITiendasEmpresaController;
|
||||||
|
property TiendasController : ITiendasEmpresaController read GetTiendasController;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TEmpresasController = class(TControllerBase, IEmpresasController)
|
TEmpresasController = class(TControllerBase, IEmpresasController)
|
||||||
protected
|
protected
|
||||||
FDataModule : IDataModuleEmpresas;
|
FDataModule : IDataModuleEmpresas;
|
||||||
|
FTiendasController : ITiendasEmpresaController;
|
||||||
function ValidarEmpresa(AEmpresa : IBizEmpresa): Boolean; virtual;
|
function ValidarEmpresa(AEmpresa : IBizEmpresa): Boolean; virtual;
|
||||||
|
function GetTiendasController : ITiendasEmpresaController;
|
||||||
public
|
public
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -49,13 +56,16 @@ type
|
|||||||
function ToStringList(AEmpresa : IBizEmpresa) : TStringList; virtual;
|
function ToStringList(AEmpresa : IBizEmpresa) : TStringList; virtual;
|
||||||
|
|
||||||
function DarListaTiendas(AEmpresa : IBizEmpresa): TStringList;
|
function DarListaTiendas(AEmpresa : IBizEmpresa): TStringList;
|
||||||
|
function DarTiendaUsuario(AEmpresa: IBizEmpresa; const ID_USUARIO: Integer): IBizEmpresaTienda;
|
||||||
|
|
||||||
|
property TiendasController : ITiendasEmpresaController read GetTiendasController;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uEditorRegistryUtils, cxControls, DB, uFactuGES_App,
|
uEditorRegistryUtils, cxControls, DB, uFactuGES_App,
|
||||||
uDataModuleEmpresas, uIEditorEmpresa, uBizEmpresasTiendas;
|
uDataModuleEmpresas, uIEditorEmpresa;
|
||||||
|
|
||||||
{ TEmpresasController }
|
{ TEmpresasController }
|
||||||
|
|
||||||
@ -78,12 +88,13 @@ constructor TEmpresasController.Create;
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
FDataModule := TDataModuleEmpresas.Create(Nil);
|
FDataModule := TDataModuleEmpresas.Create(Nil);
|
||||||
|
FTiendasController := TTiendasEmpresaController.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasController.DarListaTiendas(
|
function TEmpresasController.DarListaTiendas(
|
||||||
AEmpresa: IBizEmpresa): TStringList;
|
AEmpresa: IBizEmpresa): TStringList;
|
||||||
var
|
var
|
||||||
ATiendas: IBizEmpresasTiendas;
|
ATiendas: IBizEmpresaTienda;
|
||||||
begin
|
begin
|
||||||
if not Assigned(AEmpresa) then
|
if not Assigned(AEmpresa) then
|
||||||
raise Exception.Create ('Empresa no asignada (DarListaTiendas)');
|
raise Exception.Create ('Empresa no asignada (DarListaTiendas)');
|
||||||
@ -109,6 +120,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TEmpresasController.DarTiendaUsuario(AEmpresa: IBizEmpresa; const ID_USUARIO: Integer): IBizEmpresaTienda;
|
||||||
|
var
|
||||||
|
AIDTienda : Integer;
|
||||||
|
begin
|
||||||
|
AIDTienda := FDataModule.DarTiendaUsuario(AEmpresa.ID, ID_USUARIO);
|
||||||
|
Result := FTiendasController.Buscar(AIDTienda);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TEmpresasController.DescartarCambios(AEmpresa: IBizEmpresa);
|
procedure TEmpresasController.DescartarCambios(AEmpresa: IBizEmpresa);
|
||||||
begin
|
begin
|
||||||
if not Assigned(AEmpresa) then
|
if not Assigned(AEmpresa) then
|
||||||
@ -128,6 +147,7 @@ end;
|
|||||||
destructor TEmpresasController.Destroy;
|
destructor TEmpresasController.Destroy;
|
||||||
begin
|
begin
|
||||||
FDataModule := NIL;
|
FDataModule := NIL;
|
||||||
|
FTiendasController := NIL;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -175,6 +195,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TEmpresasController.GetTiendasController: ITiendasEmpresaController;
|
||||||
|
begin
|
||||||
|
Result := FTiendasController;
|
||||||
|
end;
|
||||||
|
|
||||||
function TEmpresasController.Guardar(AEmpresa: IBizEmpresa): Boolean;
|
function TEmpresasController.Guardar(AEmpresa: IBizEmpresa): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -256,11 +281,10 @@ procedure TEmpresasController.VerTodos(AEmpresas: IBizEmpresa);
|
|||||||
{var
|
{var
|
||||||
AEditor : IEditorEmpresas;}
|
AEditor : IEditorEmpresas;}
|
||||||
begin
|
begin
|
||||||
{
|
{ AEditor := NIL;
|
||||||
AEditor := NIL;
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
CreateEditor('EditorEmpresas', IEditorClientes, AEditor);
|
CreateEditor('EditorEmpresas', IEditorEmpresas, AEditor);
|
||||||
if Assigned(AEditor) then
|
if Assigned(AEditor) then
|
||||||
with AEditor do
|
with AEditor do
|
||||||
begin
|
begin
|
||||||
@ -271,8 +295,7 @@ begin
|
|||||||
finally
|
finally
|
||||||
AEditor := NIL;
|
AEditor := NIL;
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;}
|
||||||
}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -9,18 +9,22 @@ uses
|
|||||||
type
|
type
|
||||||
ITiendasEmpresaController = interface(IControllerBase)
|
ITiendasEmpresaController = interface(IControllerBase)
|
||||||
['{5DCF4163-7FA0-4560-9E5E-FA2A99EA4F59}']
|
['{5DCF4163-7FA0-4560-9E5E-FA2A99EA4F59}']
|
||||||
procedure VerTienda(ATienda : IBizEmpresasTiendas);
|
function Buscar(const ID: Integer): IBizEmpresaTienda;
|
||||||
function DarListaTiendas: TStringList;
|
function BuscarTodas: IBizEmpresaTienda;
|
||||||
|
procedure Ver(ATienda : IBizEmpresaTienda);
|
||||||
|
function Nueva : IBizEmpresaTienda;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TTiendasEmpresaController = class(TControllerBase, ITiendasEmpresaController)
|
TTiendasEmpresaController = class(TControllerBase, ITiendasEmpresaController)
|
||||||
private
|
private
|
||||||
FDataModule : IDataModuleEmpresas;
|
FDataModule : IDataModuleEmpresas;
|
||||||
public
|
public
|
||||||
procedure VerTienda(ATienda : IBizEmpresasTiendas);
|
|
||||||
function DarListaTiendas: TStringList;
|
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
function Buscar(const ID: Integer): IBizEmpresaTienda;
|
||||||
|
function BuscarTodas: IBizEmpresaTienda;
|
||||||
|
procedure Ver(ATienda : IBizEmpresaTienda);
|
||||||
|
function Nueva : IBizEmpresaTienda;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -31,44 +35,34 @@ uses
|
|||||||
uDataModuleEmpresas, schEmpresasClient_Intf, uIEditorTiendaEmpresa,
|
uDataModuleEmpresas, schEmpresasClient_Intf, uIEditorTiendaEmpresa,
|
||||||
uEditorRegistryUtils, cxControls, uFactuGES_App;
|
uEditorRegistryUtils, cxControls, uFactuGES_App;
|
||||||
|
|
||||||
|
function TTiendasEmpresaController.Buscar(const ID: Integer): IBizEmpresaTienda;
|
||||||
|
begin
|
||||||
|
Result := FDataModule.GetTienda(ID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TTiendasEmpresaController.BuscarTodas: IBizEmpresaTienda;
|
||||||
|
begin
|
||||||
|
Result := FDataModule.GetTiendas;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TTiendasEmpresaController.Create;
|
constructor TTiendasEmpresaController.Create;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
FDataModule := TDataModuleEmpresas.Create(Nil);
|
FDataModule := TDataModuleEmpresas.Create(Nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TTiendasEmpresaController.DarListaTiendas: TStringList;
|
|
||||||
var
|
|
||||||
ATiendas: IBizEmpresasTiendas;
|
|
||||||
begin
|
|
||||||
ATiendas := AppFactuGES.EmpresaActiva.Tiendas;
|
|
||||||
ATiendas.DataTable.Active := True;
|
|
||||||
|
|
||||||
Result := TStringList.Create;
|
|
||||||
try
|
|
||||||
with Result do
|
|
||||||
begin
|
|
||||||
Add(Format('%s=%d', [CTE_TODAS, CTE_ID_TODAS]));
|
|
||||||
|
|
||||||
ATiendas.DataTable.First;
|
|
||||||
while not ATiendas.DataTable.EOF do
|
|
||||||
begin
|
|
||||||
Add(Format('%s=%d', [ATiendas.NOMBRE, ATiendas.ID]));
|
|
||||||
ATiendas.DataTable.Next;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
ATiendas := NIL;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
destructor TTiendasEmpresaController.Destroy;
|
destructor TTiendasEmpresaController.Destroy;
|
||||||
begin
|
begin
|
||||||
FDataModule := Nil;
|
FDataModule := Nil;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTiendasEmpresaController.VerTienda(ATienda: IBizEmpresasTiendas);
|
function TTiendasEmpresaController.Nueva: IBizEmpresaTienda;
|
||||||
|
begin
|
||||||
|
Result := FDataModule.NewTienda;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTiendasEmpresaController.Ver(ATienda: IBizEmpresaTienda);
|
||||||
var
|
var
|
||||||
AEditor : IEditorTiendaEmpresa;
|
AEditor : IEditorTiendaEmpresa;
|
||||||
begin
|
begin
|
||||||
|
|||||||
@ -25,11 +25,15 @@ type
|
|||||||
procedure DAClientDataModuleCreate(Sender: TObject);
|
procedure DAClientDataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
function _GetDatosBancarios : IBizEmpresasDatosBancarios;
|
function _GetDatosBancarios : IBizEmpresasDatosBancarios;
|
||||||
function _GetTiendas : IBizEmpresasTiendas;
|
|
||||||
public
|
public
|
||||||
function GetItem(const ID : Integer) : IBizEmpresa;
|
function GetItem(const ID : Integer) : IBizEmpresa;
|
||||||
function NewItem : IBizEmpresa;
|
function NewItem : IBizEmpresa;
|
||||||
function GetItems : IBizEmpresa;
|
function GetItems : IBizEmpresa;
|
||||||
|
function DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer;
|
||||||
|
|
||||||
|
function NewTienda : IBizEmpresaTienda;
|
||||||
|
function GetTiendas : IBizEmpresaTienda;
|
||||||
|
function GetTienda(const ID : Integer) : IBizEmpresaTienda;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -46,6 +50,12 @@ begin
|
|||||||
RORemoteService.Message := dmConexion.Message;
|
RORemoteService.Message := dmConexion.Message;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataModuleEmpresas.DarTiendaUsuario(const ID_EMPRESA,
|
||||||
|
ID_USUARIO: Integer): Integer;
|
||||||
|
begin
|
||||||
|
Result := (RORemoteService as IsrvEmpresas).DarTiendaUsuario(ID_EMPRESA, ID_USUARIO)
|
||||||
|
end;
|
||||||
|
|
||||||
function TDataModuleEmpresas.GetItem(const ID: Integer): IBizEmpresa;
|
function TDataModuleEmpresas.GetItem(const ID: Integer): IBizEmpresa;
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -75,7 +85,7 @@ begin
|
|||||||
with TBizEmpresa(AEmpresa.BusinessEventsObj) do
|
with TBizEmpresa(AEmpresa.BusinessEventsObj) do
|
||||||
begin
|
begin
|
||||||
DatosBancarios := _GetDatosBancarios;
|
DatosBancarios := _GetDatosBancarios;
|
||||||
Tiendas := _GetTiendas;
|
Tiendas := GetTiendas;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := (AEmpresa as IBizEmpresa);
|
Result := (AEmpresa as IBizEmpresa);
|
||||||
@ -89,6 +99,11 @@ begin
|
|||||||
Result := GetItem(ID_NULO)
|
Result := GetItem(ID_NULO)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataModuleEmpresas.NewTienda: IBizEmpresaTienda;
|
||||||
|
begin
|
||||||
|
Result := GetTienda(ID_NULO);
|
||||||
|
end;
|
||||||
|
|
||||||
function TDataModuleEmpresas._GetDatosBancarios: IBizEmpresasDatosBancarios;
|
function TDataModuleEmpresas._GetDatosBancarios: IBizEmpresasDatosBancarios;
|
||||||
var
|
var
|
||||||
ADatosBancarios : TDAMemDataTable;
|
ADatosBancarios : TDAMemDataTable;
|
||||||
@ -108,7 +123,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDataModuleEmpresas._GetTiendas: IBizEmpresasTiendas;
|
function TDataModuleEmpresas.GetTienda(const ID: Integer): IBizEmpresaTienda;
|
||||||
|
begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
Result := Self.GetTiendas;
|
||||||
|
|
||||||
|
with Result.DataTable.DynamicWhere do
|
||||||
|
begin
|
||||||
|
Clear;
|
||||||
|
// (ID = :ID)
|
||||||
|
Expression := NewBinaryExpression(NewField('', fld_EmpresasTiendasID), NewConstant(ID, datInteger), dboEqual);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDataModuleEmpresas.GetTiendas: IBizEmpresaTienda;
|
||||||
var
|
var
|
||||||
ATiendas : TDAMemDataTable;
|
ATiendas : TDAMemDataTable;
|
||||||
begin
|
begin
|
||||||
@ -121,7 +153,7 @@ begin
|
|||||||
DetailOptions := DetailOptions -
|
DetailOptions := DetailOptions -
|
||||||
[dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates];
|
[dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates];
|
||||||
end;
|
end;
|
||||||
Result := (ATiendas as IBizEmpresasTiendas);
|
Result := (ATiendas as IBizEmpresaTienda);
|
||||||
finally
|
finally
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -3,8 +3,7 @@ unit uIDataModuleEmpresas;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes,
|
SysUtils, Classes, uBizEmpresas, uBizEmpresasTiendas;
|
||||||
uBizEmpresas;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
IDataModuleEmpresas = interface
|
IDataModuleEmpresas = interface
|
||||||
@ -12,6 +11,12 @@ type
|
|||||||
function GetItem(const ID : Integer) : IBizEmpresa;
|
function GetItem(const ID : Integer) : IBizEmpresa;
|
||||||
function NewItem : IBizEmpresa;
|
function NewItem : IBizEmpresa;
|
||||||
function GetItems : IBizEmpresa;
|
function GetItems : IBizEmpresa;
|
||||||
|
|
||||||
|
function NewTienda : IBizEmpresaTienda;
|
||||||
|
function GetTienda(const ID : Integer) : IBizEmpresaTienda;
|
||||||
|
function GetTiendas : IBizEmpresaTienda;
|
||||||
|
|
||||||
|
function DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
Binary file not shown.
@ -7,17 +7,17 @@ uses
|
|||||||
schEmpresasClient_Intf;
|
schEmpresasClient_Intf;
|
||||||
|
|
||||||
const
|
const
|
||||||
BIZ_CLIENT_EMPRESAS_TIENDAS = 'Client.EmpresasTiendas';
|
BIZ_CLIENT_EMPRESAS_TIENDAS = 'Client.EmpresaTienda';
|
||||||
CTE_ID_TODAS = 0;
|
CTE_ID_TODAS = 0;
|
||||||
CTE_TODAS = 'Todas';
|
CTE_TODAS = 'Todas';
|
||||||
|
|
||||||
type
|
type
|
||||||
IBizEmpresasTiendas = interface(IEmpresasTiendas)
|
IBizEmpresaTienda = interface(IEmpresasTiendas)
|
||||||
['{564205A6-82A6-45E1-9523-6751BB5A8708}']
|
['{564205A6-82A6-45E1-9523-6751BB5A8708}']
|
||||||
function EsNuevo : Boolean;
|
function EsNuevo : Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TBizEmpresasTiendas = class(TEmpresasTiendasDataTableRules, IBizEmpresasTiendas)
|
TBizEmpresaTienda = class(TEmpresasTiendasDataTableRules, IBizEmpresaTienda)
|
||||||
protected
|
protected
|
||||||
procedure BeforeInsert(Sender: TDADataTable); override;
|
procedure BeforeInsert(Sender: TDADataTable); override;
|
||||||
public
|
public
|
||||||
@ -31,7 +31,7 @@ uses
|
|||||||
|
|
||||||
{ TBizEmpresasTiendas }
|
{ TBizEmpresasTiendas }
|
||||||
|
|
||||||
procedure TBizEmpresasTiendas.BeforeInsert(Sender: TDADataTable);
|
procedure TBizEmpresaTienda.BeforeInsert(Sender: TDADataTable);
|
||||||
var
|
var
|
||||||
AMasterTable : TDADataTable;
|
AMasterTable : TDADataTable;
|
||||||
begin
|
begin
|
||||||
@ -41,13 +41,13 @@ begin
|
|||||||
AMasterTable.Post;
|
AMasterTable.Post;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBizEmpresasTiendas.EsNuevo: Boolean;
|
function TBizEmpresaTienda.EsNuevo: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (ID < 0);
|
Result := (ID < 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
RegisterDataTableRules(BIZ_CLIENT_EMPRESAS_TIENDAS, TBizEmpresasTiendas);
|
RegisterDataTableRules(BIZ_CLIENT_EMPRESAS_TIENDAS, TBizEmpresaTienda);
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -32,6 +32,7 @@ type
|
|||||||
const aMaxRecords: Integer);
|
const aMaxRecords: Integer);
|
||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
|
function DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -54,6 +55,16 @@ begin
|
|||||||
SessionManager := dmServer.SessionManager;
|
SessionManager := dmServer.SessionManager;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvEmpresas.DarTiendaUsuario(const ID_EMPRESA, ID_USUARIO: Integer): Integer;
|
||||||
|
var
|
||||||
|
AContactosService : IsrvContactos;
|
||||||
|
Intf : IInterface;
|
||||||
|
begin
|
||||||
|
GetClassFactory('srvContactos').CreateInstance(ClientID, Intf);
|
||||||
|
AContactosService := Intf as IsrvContactos;
|
||||||
|
Result := AContactosService.DarTiendaDeUsuario(ID_EMPRESA, ID_USUARIO)
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TsrvEmpresas.DataAbstractServiceBeforeAcquireConnection(
|
procedure TsrvEmpresas.DataAbstractServiceBeforeAcquireConnection(
|
||||||
aSender: TObject; var aConnectionName: string);
|
aSender: TObject; var aConnectionName: string);
|
||||||
begin
|
begin
|
||||||
|
|||||||
@ -6,7 +6,10 @@ uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
|||||||
Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable, PngSpeedButton,
|
Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable, PngSpeedButton,
|
||||||
cxControls, cxContainer, cxEdit, cxTextEdit, cxHyperLinkEdit, cxDBEdit,
|
cxControls, cxContainer, cxEdit, cxTextEdit, cxHyperLinkEdit, cxDBEdit,
|
||||||
uIEditorTiendaEmpresa, uTiendasEmpresaController, uBizEmpresasTiendas,
|
uIEditorTiendaEmpresa, uTiendasEmpresaController, uBizEmpresasTiendas,
|
||||||
cxCurrencyEdit, uDAInterfaces, cxGraphics, cxMaskEdit, cxDropDownEdit;
|
cxCurrencyEdit, uDAInterfaces, cxGraphics, cxMaskEdit, cxDropDownEdit,
|
||||||
|
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinSilver, dxSkinsDefaultPainters;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorTiendaEmpresa = class(TForm, IEditorTiendaEmpresa)
|
TfEditorTiendaEmpresa = class(TForm, IEditorTiendaEmpresa)
|
||||||
@ -53,17 +56,17 @@ type
|
|||||||
procedure CargarPoblaciones;
|
procedure CargarPoblaciones;
|
||||||
protected
|
protected
|
||||||
FController : ITiendasEmpresaController;
|
FController : ITiendasEmpresaController;
|
||||||
FTienda: IBizEmpresasTiendas;
|
FTienda: IBizEmpresaTienda;
|
||||||
|
|
||||||
function GetController : ITiendasEmpresaController;
|
function GetController : ITiendasEmpresaController;
|
||||||
procedure SetController (const Value : ITiendasEmpresaController);
|
procedure SetController (const Value : ITiendasEmpresaController);
|
||||||
function GetTienda: IBizEmpresasTiendas;
|
function GetTienda: IBizEmpresaTienda;
|
||||||
procedure SetTienda(const Value: IBizEmpresasTiendas);
|
procedure SetTienda(const Value: IBizEmpresaTienda);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property Controller : ITiendasEmpresaController read GetController write SetController;
|
property Controller : ITiendasEmpresaController read GetController write SetController;
|
||||||
property Tienda: IBizEmpresasTiendas read GetTienda write SetTienda;
|
property Tienda: IBizEmpresaTienda read GetTienda write SetTienda;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -206,7 +209,7 @@ begin
|
|||||||
Result := FController;
|
Result := FController;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfEditorTiendaEmpresa.GetTienda: IBizEmpresasTiendas;
|
function TfEditorTiendaEmpresa.GetTienda: IBizEmpresaTienda;
|
||||||
begin
|
begin
|
||||||
Result := FTienda;
|
Result := FTienda;
|
||||||
end;
|
end;
|
||||||
@ -221,7 +224,7 @@ begin
|
|||||||
FController := Value;
|
FController := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorTiendaEmpresa.SetTienda(const Value: IBizEmpresasTiendas);
|
procedure TfEditorTiendaEmpresa.SetTienda(const Value: IBizEmpresaTienda);
|
||||||
begin
|
begin
|
||||||
FTienda := Value;
|
FTienda := Value;
|
||||||
if Assigned(FTienda) then
|
if Assigned(FTienda) then
|
||||||
|
|||||||
@ -131,8 +131,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewTienda.SetIDTienda(const ID: Integer);
|
procedure TfrViewTienda.SetIDTienda(const ID: Integer);
|
||||||
var
|
{var
|
||||||
AIndex: Integer;
|
AIndex: Integer;}
|
||||||
begin
|
begin
|
||||||
{ if FListaIDTiendas.Find(ID, AIndex) then
|
{ if FListaIDTiendas.Find(ID, AIndex) then
|
||||||
cbTienda.Text := FListaTiendas.Strings[AIndex];}
|
cbTienda.Text := FListaTiendas.Strings[AIndex];}
|
||||||
|
|||||||
@ -10,7 +10,10 @@ uses
|
|||||||
cxGridDBBandedTableView, cxClasses, cxControls, cxGridCustomView, cxGrid,
|
cxGridDBBandedTableView, cxClasses, cxControls, cxGridCustomView, cxGrid,
|
||||||
uDADataTable, Grids, DBGrids, ActnList, ImgList, PngImageList, ComCtrls,
|
uDADataTable, Grids, DBGrids, ActnList, ImgList, PngImageList, ComCtrls,
|
||||||
ToolWin, cxGridDBTableView, uViewDetallesGenerico, cxCurrencyEdit,
|
ToolWin, cxGridDBTableView, uViewDetallesGenerico, cxCurrencyEdit,
|
||||||
uDAInterfaces;
|
uDAInterfaces, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinSilver, dxSkinsDefaultPainters,
|
||||||
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrViewTiendas = class(TfrViewDetallesGenerico)
|
TfrViewTiendas = class(TfrViewDetallesGenerico)
|
||||||
@ -48,19 +51,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewTiendas.AnadirInterno;
|
procedure TfrViewTiendas.AnadirInterno;
|
||||||
|
var
|
||||||
|
ATiendasController : ITiendasEmpresaController;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
|
ATiendasController := TTiendasEmpresaController.Create;
|
||||||
try
|
try
|
||||||
with TTiendasEmpresaController.Create do
|
ATiendasController.Ver((dsDetalles.DataTable) as IBizEmpresaTienda);
|
||||||
try
|
|
||||||
VerTienda((dsDetalles.DataTable) as IBizEmpresasTiendas);
|
|
||||||
finally
|
|
||||||
Free;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
if (dsDetalles.DataTable.State in dsEditModes) then
|
if (dsDetalles.DataTable.State in dsEditModes) then
|
||||||
dsDetalles.DataTable.Post;
|
dsDetalles.DataTable.Post;
|
||||||
|
finally
|
||||||
|
ATiendasController := NIL;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -90,7 +92,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
AController := TTiendasEmpresaController.Create;
|
AController := TTiendasEmpresaController.Create;
|
||||||
try
|
try
|
||||||
AController.VerTienda((dsDetalles.DataTable) as IBizEmpresasTiendas);
|
AController.Ver((dsDetalles.DataTable) as IBizEmpresaTienda);
|
||||||
finally
|
finally
|
||||||
AController := NIL;
|
AController := NIL;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -67,8 +67,6 @@ type
|
|||||||
procedure SetUsarPasswordsSeguras(const Value: Boolean);
|
procedure SetUsarPasswordsSeguras(const Value: Boolean);
|
||||||
property UsarPasswordsSeguras : Boolean read GetUsarPasswordsSeguras write SetUsarPasswordsSeguras;
|
property UsarPasswordsSeguras : Boolean read GetUsarPasswordsSeguras write SetUsarPasswordsSeguras;
|
||||||
|
|
||||||
procedure darIDTiendaVendedorUsuario(const IdUsuario: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
procedure ChangePassword(IDUser: Integer; NewPassword: String);
|
procedure ChangePassword(IDUser: Integer; NewPassword: String);
|
||||||
procedure AddRight(idUser: Integer; ItemRight: TObject; FullPath: Boolean = True); overload;
|
procedure AddRight(idUser: Integer; ItemRight: TObject; FullPath: Boolean = True); overload;
|
||||||
@ -86,8 +84,6 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TUsuariosController = class(TControllerBase, IUsuariosController)
|
TUsuariosController = class(TControllerBase, IUsuariosController)
|
||||||
private
|
|
||||||
procedure FiltrarEmpresa(AUsuario: IBizUsuario);
|
|
||||||
protected
|
protected
|
||||||
FDataModule : IDataModuleUsuarios;
|
FDataModule : IDataModuleUsuarios;
|
||||||
FUserControl: TUserControl;
|
FUserControl: TUserControl;
|
||||||
@ -163,7 +159,7 @@ type
|
|||||||
function ValidarPassword(const APassword : string; const ALogin : String;
|
function ValidarPassword(const APassword : string; const ALogin : String;
|
||||||
const ANombre: String; out AMsg : String): boolean;
|
const ANombre: String; out AMsg : String): boolean;
|
||||||
|
|
||||||
procedure darIDTiendaVendedorUsuario(const IdUsuario: Integer; var AIdTienda: Integer; var ATienda: String);
|
//procedure DarIDTiendaVendedorUsuario(const IdUsuario: Integer; var AIdTienda: Integer; var ATienda: String);
|
||||||
|
|
||||||
property UsarPasswordsSeguras : Boolean read GetUsarPasswordsSeguras write SetUsarPasswordsSeguras;
|
property UsarPasswordsSeguras : Boolean read GetUsarPasswordsSeguras write SetUsarPasswordsSeguras;
|
||||||
property UserControl : TUserControl read FUserControl;
|
property UserControl : TUserControl read FUserControl;
|
||||||
@ -289,13 +285,11 @@ end;
|
|||||||
function TUsuariosController.BuscarTodosUsuarios: IBizUsuario;
|
function TUsuariosController.BuscarTodosUsuarios: IBizUsuario;
|
||||||
begin
|
begin
|
||||||
Result := FDataModule.GetUsuarios;
|
Result := FDataModule.GetUsuarios;
|
||||||
FiltrarEmpresa(Result);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TUsuariosController.BuscarUsuario(const AIDUser: Integer): IBizUsuario;
|
function TUsuariosController.BuscarUsuario(const AIDUser: Integer): IBizUsuario;
|
||||||
begin
|
begin
|
||||||
Result := FDataModule.GetUsuario(AIDUser);
|
Result := FDataModule.GetUsuario(AIDUser);
|
||||||
FiltrarEmpresa(Result);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TUsuariosController.CambiarPassword(const AIDUser: Integer;
|
function TUsuariosController.CambiarPassword(const AIDUser: Integer;
|
||||||
@ -372,11 +366,6 @@ begin
|
|||||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUsuariosController.darIDTiendaVendedorUsuario(const IdUsuario: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
begin
|
|
||||||
FDataModule.DarIDTiendaVendedorUsuario(IdUsuario, AIdTienda, ATienda);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TUsuariosController.DarListaPerfilesUsuario: TStringList;
|
function TUsuariosController.DarListaPerfilesUsuario: TStringList;
|
||||||
var
|
var
|
||||||
APerfilesUsuario: IBizPerfilUsuario;
|
APerfilesUsuario: IBizPerfilUsuario;
|
||||||
@ -919,30 +908,5 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUsuariosController.FiltrarEmpresa(AUsuario: IBizUsuario);
|
|
||||||
{var
|
|
||||||
Condicion: TDAWhereExpression;}
|
|
||||||
begin
|
|
||||||
|
|
||||||
// AQUI HAY QUE TENER EN CUENTA QUE UN USUARIO PUEDE QUE NO TENGA ACCESO
|
|
||||||
// EN UNA DETERMINADA EMPRESA
|
|
||||||
|
|
||||||
|
|
||||||
{ if AUsuario.DataTable.Active then
|
|
||||||
AUsuario.DataTable.Active := False;
|
|
||||||
|
|
||||||
// Filtrar los contactos actuales por empresa
|
|
||||||
with AUsuario.DataTable.DynamicWhere do
|
|
||||||
begin
|
|
||||||
Condicion := NewBinaryExpression(NewField('', fld_U
|
|
||||||
ContactosID_EMPRESA), NewConstant(AppFactuGES.EmpresaActiva.ID, datInteger), dboEqual);
|
|
||||||
|
|
||||||
if IsEmpty then
|
|
||||||
Expression := Condicion
|
|
||||||
else
|
|
||||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
|
||||||
end;}
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -37,7 +37,7 @@ type
|
|||||||
function GetPerfil (const ID : Integer) : IBizPerfilUsuario;
|
function GetPerfil (const ID : Integer) : IBizPerfilUsuario;
|
||||||
|
|
||||||
procedure InicializarUserControl (AUserControl : TUserControl);
|
procedure InicializarUserControl (AUserControl : TUserControl);
|
||||||
procedure DarIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
function DarTiendaUsuario(const ID_Usuario: Integer; var AID_Tienda: Integer; var ATienda: String) : Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -75,14 +75,22 @@ begin
|
|||||||
Result := GetUsuario(ID_NULO)
|
Result := GetUsuario(ID_NULO)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDataModuleUsuarios.DarIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
{procedure TDataModuleUsuarios.DarIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
||||||
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)
|
||||||
(srvUsuarios as IsrvUsuarios).darIDTiendaVendedorUsuario(ID_USUARIO, AIdTienda, ATienda);
|
(srvUsuarios as IsrvUsuarios).darIDTiendaVendedorUsuario(ID_USUARIO, AIdTienda, ATienda);
|
||||||
|
end;}
|
||||||
|
|
||||||
|
function TDataModuleUsuarios.DarTiendaUsuario(const ID_Usuario: Integer; var AID_Tienda: Integer; var ATienda: String) : Boolean;
|
||||||
|
begin
|
||||||
|
// 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.
|
||||||
|
// Esto funciona mientras la relación sea 1 a 1, cuando sea 1 a n (un usuario pertenece a varios vendedores deja de funcionar)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDataModuleUsuarios.DataModuleCreate(Sender: TObject);
|
procedure TDataModuleUsuarios.DataModuleCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ type
|
|||||||
function GetPerfiles : IBizPerfilUsuario;
|
function GetPerfiles : IBizPerfilUsuario;
|
||||||
function GetPerfil(const ID : Integer) : IBizPerfilUsuario;
|
function GetPerfil(const ID : Integer) : IBizPerfilUsuario;
|
||||||
|
|
||||||
procedure DarIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
function DarTiendaUsuario(const ID_Usuario: Integer; var AID_Tienda: Integer; var ATienda: String) : Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -9,14 +9,16 @@ const
|
|||||||
{ Data table rules ids
|
{ Data table rules ids
|
||||||
Feel free to change them to something more human readable
|
Feel free to change them to something more human readable
|
||||||
but make sure they are unique in the context of your application }
|
but make sure they are unique in the context of your application }
|
||||||
RID_USUARIOS = '{33D6AE2E-8518-4E35-9BED-D5952F0A8931}';
|
RID_DarTiendaUsuario = '{6E391DEF-F7EA-4159-BE3F-09458A45161B}';
|
||||||
RID_USUARIOS_EVENTOS = '{3310F829-00D6-43CE-B41E-60922A628503}';
|
RID_USUARIOS = '{5048D7CF-BE6A-4908-9359-FF38B82D059C}';
|
||||||
RID_USUARIOS_LOGON = '{E45B7C80-1F27-4D73-BCA4-CD0C2C1B7CEB}';
|
RID_USUARIOS_EVENTOS = '{AB4A1797-6311-4C66-9926-42AB459932C8}';
|
||||||
RID_PERMISOS = '{0000D1FE-8EC8-4BC6-A499-2F3C215EF8F9}';
|
RID_USUARIOS_LOGON = '{51E280BB-1009-4E18-B1BF-C05318F75D97}';
|
||||||
RID_PERMISOSEX = '{7424313C-3027-4073-97AE-4126FD866607}';
|
RID_PERMISOS = '{14944C0A-3708-4797-9016-18030A86267F}';
|
||||||
RID_PERFILES = '{9CEB3528-1A72-48AE-AA40-D7307185B2FD}';
|
RID_PERMISOSEX = '{09010D1A-F883-438B-8630-1A8814CD14F9}';
|
||||||
|
RID_PERFILES = '{68158A81-21D1-48B1-8F41-4B218AD21231}';
|
||||||
|
|
||||||
{ Data table names }
|
{ Data table names }
|
||||||
|
nme_DarTiendaUsuario = 'DarTiendaUsuario';
|
||||||
nme_USUARIOS = 'USUARIOS';
|
nme_USUARIOS = 'USUARIOS';
|
||||||
nme_USUARIOS_EVENTOS = 'USUARIOS_EVENTOS';
|
nme_USUARIOS_EVENTOS = 'USUARIOS_EVENTOS';
|
||||||
nme_USUARIOS_LOGON = 'USUARIOS_LOGON';
|
nme_USUARIOS_LOGON = 'USUARIOS_LOGON';
|
||||||
@ -24,6 +26,14 @@ const
|
|||||||
nme_PERMISOSEX = 'PERMISOSEX';
|
nme_PERMISOSEX = 'PERMISOSEX';
|
||||||
nme_PERFILES = 'PERFILES';
|
nme_PERFILES = 'PERFILES';
|
||||||
|
|
||||||
|
{ DarTiendaUsuario fields }
|
||||||
|
fld_DarTiendaUsuarioID_TIENDA = 'ID_TIENDA';
|
||||||
|
fld_DarTiendaUsuarioTIENDA = 'TIENDA';
|
||||||
|
|
||||||
|
{ DarTiendaUsuario field indexes }
|
||||||
|
idx_DarTiendaUsuarioID_TIENDA = 0;
|
||||||
|
idx_DarTiendaUsuarioTIENDA = 1;
|
||||||
|
|
||||||
{ USUARIOS fields }
|
{ USUARIOS fields }
|
||||||
fld_USUARIOSID = 'ID';
|
fld_USUARIOSID = 'ID';
|
||||||
fld_USUARIOSUSERNAME = 'USERNAME';
|
fld_USUARIOSUSERNAME = 'USERNAME';
|
||||||
@ -127,9 +137,56 @@ const
|
|||||||
idx_PERFILESTIPO = 3;
|
idx_PERFILESTIPO = 3;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{ IDarTiendaUsuario }
|
||||||
|
IDarTiendaUsuario = interface(IDAStronglyTypedDataTable)
|
||||||
|
['{544B73C1-70CD-40F9-BCD6-4C83C1E2B4DD}']
|
||||||
|
{ Property getters and setters }
|
||||||
|
function GetID_TIENDAValue: Integer;
|
||||||
|
procedure SetID_TIENDAValue(const aValue: Integer);
|
||||||
|
function GetID_TIENDAIsNull: Boolean;
|
||||||
|
procedure SetID_TIENDAIsNull(const aValue: Boolean);
|
||||||
|
function GetTIENDAValue: String;
|
||||||
|
procedure SetTIENDAValue(const aValue: String);
|
||||||
|
function GetTIENDAIsNull: Boolean;
|
||||||
|
procedure SetTIENDAIsNull(const aValue: Boolean);
|
||||||
|
|
||||||
|
|
||||||
|
{ Properties }
|
||||||
|
property ID_TIENDA: Integer read GetID_TIENDAValue write SetID_TIENDAValue;
|
||||||
|
property ID_TIENDAIsNull: Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
|
||||||
|
property TIENDA: String read GetTIENDAValue write SetTIENDAValue;
|
||||||
|
property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TDarTiendaUsuarioDataTableRules }
|
||||||
|
TDarTiendaUsuarioDataTableRules = class(TIntfObjectDADataTableRules, IDarTiendaUsuario)
|
||||||
|
private
|
||||||
|
protected
|
||||||
|
{ Property getters and setters }
|
||||||
|
function GetID_TIENDAValue: Integer; virtual;
|
||||||
|
procedure SetID_TIENDAValue(const aValue: Integer); virtual;
|
||||||
|
function GetID_TIENDAIsNull: Boolean; virtual;
|
||||||
|
procedure SetID_TIENDAIsNull(const aValue: Boolean); virtual;
|
||||||
|
function GetTIENDAValue: String; virtual;
|
||||||
|
procedure SetTIENDAValue(const aValue: String); virtual;
|
||||||
|
function GetTIENDAIsNull: Boolean; virtual;
|
||||||
|
procedure SetTIENDAIsNull(const aValue: Boolean); virtual;
|
||||||
|
|
||||||
|
{ Properties }
|
||||||
|
property ID_TIENDA: Integer read GetID_TIENDAValue write SetID_TIENDAValue;
|
||||||
|
property ID_TIENDAIsNull: Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
|
||||||
|
property TIENDA: String read GetTIENDAValue write SetTIENDAValue;
|
||||||
|
property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
|
||||||
|
|
||||||
|
public
|
||||||
|
constructor Create(aDataTable: TDADataTable); override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
{ IUSUARIOS }
|
{ IUSUARIOS }
|
||||||
IUSUARIOS = interface(IDAStronglyTypedDataTable)
|
IUSUARIOS = interface(IDAStronglyTypedDataTable)
|
||||||
['{609EF276-E3F0-44BE-897A-B99980AB6CA6}']
|
['{8F61797A-69C1-46D0-A77F-9008A4A13118}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetIDValue: Integer;
|
function GetIDValue: Integer;
|
||||||
procedure SetIDValue(const aValue: Integer);
|
procedure SetIDValue(const aValue: Integer);
|
||||||
@ -296,7 +353,7 @@ type
|
|||||||
|
|
||||||
{ IUSUARIOS_EVENTOS }
|
{ IUSUARIOS_EVENTOS }
|
||||||
IUSUARIOS_EVENTOS = interface(IDAStronglyTypedDataTable)
|
IUSUARIOS_EVENTOS = interface(IDAStronglyTypedDataTable)
|
||||||
['{57EB0AE4-C30E-4AEA-BB87-FBC94F54B462}']
|
['{1B4FFD5F-7D38-4BEE-8289-8C0001E01899}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetAPLICACIONValue: String;
|
function GetAPLICACIONValue: String;
|
||||||
procedure SetAPLICACIONValue(const aValue: String);
|
procedure SetAPLICACIONValue(const aValue: String);
|
||||||
@ -427,7 +484,7 @@ type
|
|||||||
|
|
||||||
{ IUSUARIOS_LOGON }
|
{ IUSUARIOS_LOGON }
|
||||||
IUSUARIOS_LOGON = interface(IDAStronglyTypedDataTable)
|
IUSUARIOS_LOGON = interface(IDAStronglyTypedDataTable)
|
||||||
['{341AC508-0746-40B5-A092-8C1D9CDBC604}']
|
['{41DCA6DD-2B8F-407C-A620-FBE083802B0F}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetLOGONIDValue: String;
|
function GetLOGONIDValue: String;
|
||||||
procedure SetLOGONIDValue(const aValue: String);
|
procedure SetLOGONIDValue(const aValue: String);
|
||||||
@ -510,7 +567,7 @@ type
|
|||||||
|
|
||||||
{ IPERMISOS }
|
{ IPERMISOS }
|
||||||
IPERMISOS = interface(IDAStronglyTypedDataTable)
|
IPERMISOS = interface(IDAStronglyTypedDataTable)
|
||||||
['{323F36F2-E464-4CAB-AE8C-B72295B949A4}']
|
['{080033E7-82B8-4563-AB39-D114EC371228}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetID_USUARIOValue: Integer;
|
function GetID_USUARIOValue: Integer;
|
||||||
procedure SetID_USUARIOValue(const aValue: Integer);
|
procedure SetID_USUARIOValue(const aValue: Integer);
|
||||||
@ -581,7 +638,7 @@ type
|
|||||||
|
|
||||||
{ IPERMISOSEX }
|
{ IPERMISOSEX }
|
||||||
IPERMISOSEX = interface(IDAStronglyTypedDataTable)
|
IPERMISOSEX = interface(IDAStronglyTypedDataTable)
|
||||||
['{84605C14-E7FC-4E1E-BE35-A0EBC3E7A02F}']
|
['{19C86BFC-8B28-43D9-AF89-B92C9C6DB2AB}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetID_USUARIOValue: Integer;
|
function GetID_USUARIOValue: Integer;
|
||||||
procedure SetID_USUARIOValue(const aValue: Integer);
|
procedure SetID_USUARIOValue(const aValue: Integer);
|
||||||
@ -664,7 +721,7 @@ type
|
|||||||
|
|
||||||
{ IPERFILES }
|
{ IPERFILES }
|
||||||
IPERFILES = interface(IDAStronglyTypedDataTable)
|
IPERFILES = interface(IDAStronglyTypedDataTable)
|
||||||
['{A0804B85-AECF-4F9A-A3C1-85068D16D302}']
|
['{5578704D-1574-4705-AC6D-4D7FEEDB7E3E}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetIDValue: Integer;
|
function GetIDValue: Integer;
|
||||||
procedure SetIDValue(const aValue: Integer);
|
procedure SetIDValue(const aValue: Integer);
|
||||||
@ -737,6 +794,60 @@ implementation
|
|||||||
|
|
||||||
uses Variants, uROBinaryHelpers;
|
uses Variants, uROBinaryHelpers;
|
||||||
|
|
||||||
|
{ TDarTiendaUsuarioDataTableRules }
|
||||||
|
constructor TDarTiendaUsuarioDataTableRules.Create(aDataTable: TDADataTable);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TDarTiendaUsuarioDataTableRules.Destroy;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioDataTableRules.GetID_TIENDAValue: Integer;
|
||||||
|
begin
|
||||||
|
result := DataTable.Fields[idx_DarTiendaUsuarioID_TIENDA].AsInteger;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioDataTableRules.SetID_TIENDAValue(const aValue: Integer);
|
||||||
|
begin
|
||||||
|
DataTable.Fields[idx_DarTiendaUsuarioID_TIENDA].AsInteger := aValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioDataTableRules.GetID_TIENDAIsNull: boolean;
|
||||||
|
begin
|
||||||
|
result := DataTable.Fields[idx_DarTiendaUsuarioID_TIENDA].IsNull;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioDataTableRules.SetID_TIENDAIsNull(const aValue: Boolean);
|
||||||
|
begin
|
||||||
|
if aValue then
|
||||||
|
DataTable.Fields[idx_DarTiendaUsuarioID_TIENDA].AsVariant := Null;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioDataTableRules.GetTIENDAValue: String;
|
||||||
|
begin
|
||||||
|
result := DataTable.Fields[idx_DarTiendaUsuarioTIENDA].AsString;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioDataTableRules.SetTIENDAValue(const aValue: String);
|
||||||
|
begin
|
||||||
|
DataTable.Fields[idx_DarTiendaUsuarioTIENDA].AsString := aValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioDataTableRules.GetTIENDAIsNull: boolean;
|
||||||
|
begin
|
||||||
|
result := DataTable.Fields[idx_DarTiendaUsuarioTIENDA].IsNull;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioDataTableRules.SetTIENDAIsNull(const aValue: Boolean);
|
||||||
|
begin
|
||||||
|
if aValue then
|
||||||
|
DataTable.Fields[idx_DarTiendaUsuarioTIENDA].AsVariant := Null;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TUSUARIOSDataTableRules }
|
{ TUSUARIOSDataTableRules }
|
||||||
constructor TUSUARIOSDataTableRules.Create(aDataTable: TDADataTable);
|
constructor TUSUARIOSDataTableRules.Create(aDataTable: TDADataTable);
|
||||||
begin
|
begin
|
||||||
@ -1636,6 +1747,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
RegisterDataTableRules(RID_DarTiendaUsuario, TDarTiendaUsuarioDataTableRules);
|
||||||
RegisterDataTableRules(RID_USUARIOS, TUSUARIOSDataTableRules);
|
RegisterDataTableRules(RID_USUARIOS, TUSUARIOSDataTableRules);
|
||||||
RegisterDataTableRules(RID_USUARIOS_EVENTOS, TUSUARIOS_EVENTOSDataTableRules);
|
RegisterDataTableRules(RID_USUARIOS_EVENTOS, TUSUARIOS_EVENTOSDataTableRules);
|
||||||
RegisterDataTableRules(RID_USUARIOS_LOGON, TUSUARIOS_LOGONDataTableRules);
|
RegisterDataTableRules(RID_USUARIOS_LOGON, TUSUARIOS_LOGONDataTableRules);
|
||||||
|
|||||||
@ -9,17 +9,64 @@ const
|
|||||||
{ Delta rules ids
|
{ Delta rules ids
|
||||||
Feel free to change them to something more human readable
|
Feel free to change them to something more human readable
|
||||||
but make sure they are unique in the context of your application }
|
but make sure they are unique in the context of your application }
|
||||||
RID_USUARIOSDelta = '{0CF1FB0D-0814-43C8-9EEA-C73F89D9EEFC}';
|
RID_DarTiendaUsuarioDelta = '{F68B88F5-A005-4557-A9A3-7DADC274C549}';
|
||||||
RID_USUARIOS_EVENTOSDelta = '{70259783-5480-4B8A-8C19-E5F3AF2ADF5E}';
|
RID_USUARIOSDelta = '{01398090-5678-4007-B853-CF463D600568}';
|
||||||
RID_USUARIOS_LOGONDelta = '{664180AD-0611-4CF4-BDE0-AA2BA4AC9973}';
|
RID_USUARIOS_EVENTOSDelta = '{641B4130-F1C0-47D5-8BDF-6FF343CE1718}';
|
||||||
RID_PERMISOSDelta = '{820DAE3D-63A0-4EEB-862C-A85EDF85E804}';
|
RID_USUARIOS_LOGONDelta = '{BAFFEAF0-C43F-43FC-B103-1E065D54C103}';
|
||||||
RID_PERMISOSEXDelta = '{A01553FE-193F-4827-A0F2-9904D94C140F}';
|
RID_PERMISOSDelta = '{D0B890F9-EEFC-4F17-ACCB-6467CE37D354}';
|
||||||
RID_PERFILESDelta = '{E7F3AB12-F120-4630-8AD5-01021379CC52}';
|
RID_PERMISOSEXDelta = '{FE39DC21-84C6-4B6E-987C-1498ACA90759}';
|
||||||
|
RID_PERFILESDelta = '{E8793C8F-9FEE-4129-A03B-6423C4724DC2}';
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{ IDarTiendaUsuarioDelta }
|
||||||
|
IDarTiendaUsuarioDelta = interface(IDarTiendaUsuario)
|
||||||
|
['{F68B88F5-A005-4557-A9A3-7DADC274C549}']
|
||||||
|
{ Property getters and setters }
|
||||||
|
function GetOldID_TIENDAValue : Integer;
|
||||||
|
function GetOldTIENDAValue : String;
|
||||||
|
|
||||||
|
{ Properties }
|
||||||
|
property OldID_TIENDA : Integer read GetOldID_TIENDAValue;
|
||||||
|
property OldTIENDA : String read GetOldTIENDAValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TDarTiendaUsuarioBusinessProcessorRules }
|
||||||
|
TDarTiendaUsuarioBusinessProcessorRules = class(TDABusinessProcessorRules, IDarTiendaUsuario, IDarTiendaUsuarioDelta)
|
||||||
|
private
|
||||||
|
protected
|
||||||
|
{ Property getters and setters }
|
||||||
|
function GetID_TIENDAValue: Integer; virtual;
|
||||||
|
function GetID_TIENDAIsNull: Boolean; virtual;
|
||||||
|
function GetOldID_TIENDAValue: Integer; virtual;
|
||||||
|
function GetOldID_TIENDAIsNull: Boolean; virtual;
|
||||||
|
procedure SetID_TIENDAValue(const aValue: Integer); virtual;
|
||||||
|
procedure SetID_TIENDAIsNull(const aValue: Boolean); virtual;
|
||||||
|
function GetTIENDAValue: String; virtual;
|
||||||
|
function GetTIENDAIsNull: Boolean; virtual;
|
||||||
|
function GetOldTIENDAValue: String; virtual;
|
||||||
|
function GetOldTIENDAIsNull: Boolean; virtual;
|
||||||
|
procedure SetTIENDAValue(const aValue: String); virtual;
|
||||||
|
procedure SetTIENDAIsNull(const aValue: Boolean); virtual;
|
||||||
|
|
||||||
|
{ Properties }
|
||||||
|
property ID_TIENDA : Integer read GetID_TIENDAValue write SetID_TIENDAValue;
|
||||||
|
property ID_TIENDAIsNull : Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
|
||||||
|
property OldID_TIENDA : Integer read GetOldID_TIENDAValue;
|
||||||
|
property OldID_TIENDAIsNull : Boolean read GetOldID_TIENDAIsNull;
|
||||||
|
property TIENDA : String read GetTIENDAValue write SetTIENDAValue;
|
||||||
|
property TIENDAIsNull : Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
|
||||||
|
property OldTIENDA : String read GetOldTIENDAValue;
|
||||||
|
property OldTIENDAIsNull : Boolean read GetOldTIENDAIsNull;
|
||||||
|
|
||||||
|
public
|
||||||
|
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
{ IUSUARIOSDelta }
|
{ IUSUARIOSDelta }
|
||||||
IUSUARIOSDelta = interface(IUSUARIOS)
|
IUSUARIOSDelta = interface(IUSUARIOS)
|
||||||
['{0CF1FB0D-0814-43C8-9EEA-C73F89D9EEFC}']
|
['{01398090-5678-4007-B853-CF463D600568}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldIDValue : Integer;
|
function GetOldIDValue : Integer;
|
||||||
function GetOldUSERNAMEValue : String;
|
function GetOldUSERNAMEValue : String;
|
||||||
@ -185,7 +232,7 @@ type
|
|||||||
|
|
||||||
{ IUSUARIOS_EVENTOSDelta }
|
{ IUSUARIOS_EVENTOSDelta }
|
||||||
IUSUARIOS_EVENTOSDelta = interface(IUSUARIOS_EVENTOS)
|
IUSUARIOS_EVENTOSDelta = interface(IUSUARIOS_EVENTOS)
|
||||||
['{70259783-5480-4B8A-8C19-E5F3AF2ADF5E}']
|
['{641B4130-F1C0-47D5-8BDF-6FF343CE1718}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldAPLICACIONValue : String;
|
function GetOldAPLICACIONValue : String;
|
||||||
function GetOldID_USUARIOValue : Integer;
|
function GetOldID_USUARIOValue : Integer;
|
||||||
@ -316,7 +363,7 @@ type
|
|||||||
|
|
||||||
{ IUSUARIOS_LOGONDelta }
|
{ IUSUARIOS_LOGONDelta }
|
||||||
IUSUARIOS_LOGONDelta = interface(IUSUARIOS_LOGON)
|
IUSUARIOS_LOGONDelta = interface(IUSUARIOS_LOGON)
|
||||||
['{664180AD-0611-4CF4-BDE0-AA2BA4AC9973}']
|
['{BAFFEAF0-C43F-43FC-B103-1E065D54C103}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldLOGONIDValue : String;
|
function GetOldLOGONIDValue : String;
|
||||||
function GetOldID_USUARIOValue : Integer;
|
function GetOldID_USUARIOValue : Integer;
|
||||||
@ -398,7 +445,7 @@ type
|
|||||||
|
|
||||||
{ IPERMISOSDelta }
|
{ IPERMISOSDelta }
|
||||||
IPERMISOSDelta = interface(IPERMISOS)
|
IPERMISOSDelta = interface(IPERMISOS)
|
||||||
['{820DAE3D-63A0-4EEB-862C-A85EDF85E804}']
|
['{D0B890F9-EEFC-4F17-ACCB-6467CE37D354}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldID_USUARIOValue : Integer;
|
function GetOldID_USUARIOValue : Integer;
|
||||||
function GetOldMODULOValue : String;
|
function GetOldMODULOValue : String;
|
||||||
@ -468,7 +515,7 @@ type
|
|||||||
|
|
||||||
{ IPERMISOSEXDelta }
|
{ IPERMISOSEXDelta }
|
||||||
IPERMISOSEXDelta = interface(IPERMISOSEX)
|
IPERMISOSEXDelta = interface(IPERMISOSEX)
|
||||||
['{A01553FE-193F-4827-A0F2-9904D94C140F}']
|
['{FE39DC21-84C6-4B6E-987C-1498ACA90759}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldID_USUARIOValue : Integer;
|
function GetOldID_USUARIOValue : Integer;
|
||||||
function GetOldMODULOValue : String;
|
function GetOldMODULOValue : String;
|
||||||
@ -550,7 +597,7 @@ type
|
|||||||
|
|
||||||
{ IPERFILESDelta }
|
{ IPERFILESDelta }
|
||||||
IPERFILESDelta = interface(IPERFILES)
|
IPERFILESDelta = interface(IPERFILES)
|
||||||
['{E7F3AB12-F120-4630-8AD5-01021379CC52}']
|
['{E8793C8F-9FEE-4129-A03B-6423C4724DC2}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldIDValue : Integer;
|
function GetOldIDValue : Integer;
|
||||||
function GetOldUSERNAMEValue : String;
|
function GetOldUSERNAMEValue : String;
|
||||||
@ -623,6 +670,80 @@ implementation
|
|||||||
uses
|
uses
|
||||||
Variants, uROBinaryHelpers, uDAInterfaces;
|
Variants, uROBinaryHelpers, uDAInterfaces;
|
||||||
|
|
||||||
|
{ TDarTiendaUsuarioBusinessProcessorRules }
|
||||||
|
constructor TDarTiendaUsuarioBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TDarTiendaUsuarioBusinessProcessorRules.Destroy;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetID_TIENDAValue: Integer;
|
||||||
|
begin
|
||||||
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioID_TIENDA];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetID_TIENDAIsNull: Boolean;
|
||||||
|
begin
|
||||||
|
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioID_TIENDA]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetOldID_TIENDAValue: Integer;
|
||||||
|
begin
|
||||||
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DarTiendaUsuarioID_TIENDA];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetOldID_TIENDAIsNull: Boolean;
|
||||||
|
begin
|
||||||
|
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DarTiendaUsuarioID_TIENDA]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioBusinessProcessorRules.SetID_TIENDAValue(const aValue: Integer);
|
||||||
|
begin
|
||||||
|
BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioID_TIENDA] := aValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioBusinessProcessorRules.SetID_TIENDAIsNull(const aValue: Boolean);
|
||||||
|
begin
|
||||||
|
if aValue then
|
||||||
|
BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioID_TIENDA] := Null;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetTIENDAValue: String;
|
||||||
|
begin
|
||||||
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioTIENDA];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetTIENDAIsNull: Boolean;
|
||||||
|
begin
|
||||||
|
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioTIENDA]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetOldTIENDAValue: String;
|
||||||
|
begin
|
||||||
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DarTiendaUsuarioTIENDA];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDarTiendaUsuarioBusinessProcessorRules.GetOldTIENDAIsNull: Boolean;
|
||||||
|
begin
|
||||||
|
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DarTiendaUsuarioTIENDA]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioBusinessProcessorRules.SetTIENDAValue(const aValue: String);
|
||||||
|
begin
|
||||||
|
BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioTIENDA] := aValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDarTiendaUsuarioBusinessProcessorRules.SetTIENDAIsNull(const aValue: Boolean);
|
||||||
|
begin
|
||||||
|
if aValue then
|
||||||
|
BusinessProcessor.CurrentChange.NewValueByName[fld_DarTiendaUsuarioTIENDA] := Null;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TUSUARIOSBusinessProcessorRules }
|
{ TUSUARIOSBusinessProcessorRules }
|
||||||
constructor TUSUARIOSBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
constructor TUSUARIOSBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
||||||
begin
|
begin
|
||||||
@ -1913,6 +2034,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
RegisterBusinessProcessorRules(RID_DarTiendaUsuarioDelta, TDarTiendaUsuarioBusinessProcessorRules);
|
||||||
RegisterBusinessProcessorRules(RID_USUARIOSDelta, TUSUARIOSBusinessProcessorRules);
|
RegisterBusinessProcessorRules(RID_USUARIOSDelta, TUSUARIOSBusinessProcessorRules);
|
||||||
RegisterBusinessProcessorRules(RID_USUARIOS_EVENTOSDelta, TUSUARIOS_EVENTOSBusinessProcessorRules);
|
RegisterBusinessProcessorRules(RID_USUARIOS_EVENTOSDelta, TUSUARIOS_EVENTOSBusinessProcessorRules);
|
||||||
RegisterBusinessProcessorRules(RID_USUARIOS_LOGONDelta, TUSUARIOS_LOGONBusinessProcessorRules);
|
RegisterBusinessProcessorRules(RID_USUARIOS_LOGONDelta, TUSUARIOS_LOGONBusinessProcessorRules);
|
||||||
|
|||||||
@ -15,6 +15,7 @@ type
|
|||||||
IBizUsuario = interface (IUSUARIOS)
|
IBizUsuario = interface (IUSUARIOS)
|
||||||
['{1DB69F36-969C-4078-B862-6D697670BCFD}']
|
['{1DB69F36-969C-4078-B862-6D697670BCFD}']
|
||||||
function EsNuevo : Boolean;
|
function EsNuevo : Boolean;
|
||||||
|
function EsAdministrador : Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IBizPerfilUsuario = interface (IPERFILES)
|
IBizPerfilUsuario = interface (IPERFILES)
|
||||||
@ -28,6 +29,7 @@ type
|
|||||||
procedure OnNewRecord(Sender: TDADataTable); override;
|
procedure OnNewRecord(Sender: TDADataTable); override;
|
||||||
public
|
public
|
||||||
function EsNuevo : Boolean;
|
function EsNuevo : Boolean;
|
||||||
|
function EsAdministrador : Boolean;
|
||||||
procedure IniciarValoresUsuarioNuevo;
|
procedure IniciarValoresUsuarioNuevo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -45,6 +47,11 @@ implementation
|
|||||||
|
|
||||||
{ TBizUsuario }
|
{ TBizUsuario }
|
||||||
|
|
||||||
|
function TBizUsuario.EsAdministrador: Boolean;
|
||||||
|
begin
|
||||||
|
Result := (USERNAME = 'admin');
|
||||||
|
end;
|
||||||
|
|
||||||
function TBizUsuario.EsNuevo: Boolean;
|
function TBizUsuario.EsNuevo: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (ID < 0);
|
Result := (ID < 0);
|
||||||
|
|||||||
@ -118,11 +118,17 @@ object srvUsuarios: TsrvUsuarios
|
|||||||
Diagrams = Diagrams
|
Diagrams = Diagrams
|
||||||
Datasets = <
|
Datasets = <
|
||||||
item
|
item
|
||||||
|
IsPublic = False
|
||||||
Params = <
|
Params = <
|
||||||
item
|
item
|
||||||
Name = 'ID_USUARIO'
|
Name = 'ID_USUARIO'
|
||||||
Value = ''
|
DataType = datInteger
|
||||||
ParamType = daptInput
|
Value = '6'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'ID_EMPRESA'
|
||||||
|
DataType = datInteger
|
||||||
|
Value = '1'
|
||||||
end>
|
end>
|
||||||
Statements = <
|
Statements = <
|
||||||
item
|
item
|
||||||
@ -132,9 +138,9 @@ object srvUsuarios: TsrvUsuarios
|
|||||||
TargetTable = 'V_VENDEDORES'
|
TargetTable = 'V_VENDEDORES'
|
||||||
Name = 'IBX'
|
Name = 'IBX'
|
||||||
SQL =
|
SQL =
|
||||||
'select ID_TIENDA, TIENDA'#10'from V_VENDEDORES'#10'left join USUARIOS on' +
|
'select ID_TIENDA, TIENDA'#10' from V_VENDEDORES'#10' where V_VENDEDORES' +
|
||||||
' (USUARIOS.ID = V_VENDEDORES.ID_USUARIO)'#10'where USUARIOS.ID = :ID' +
|
'.ID = :ID_USUARIO and'#10' V_VENDEDORES.ID_EMPRESA = :ID_EMPRE' +
|
||||||
'_USUARIO'#10
|
'SA'#10
|
||||||
StatementType = stSQL
|
StatementType = stSQL
|
||||||
ColumnMappings = <
|
ColumnMappings = <
|
||||||
item
|
item
|
||||||
@ -146,7 +152,7 @@ object srvUsuarios: TsrvUsuarios
|
|||||||
TableField = 'TIENDA'
|
TableField = 'TIENDA'
|
||||||
end>
|
end>
|
||||||
end>
|
end>
|
||||||
Name = 'darTiendaVendedorUsuario'
|
Name = 'DarTiendaUsuario'
|
||||||
Fields = <
|
Fields = <
|
||||||
item
|
item
|
||||||
Name = 'ID_TIENDA'
|
Name = 'ID_TIENDA'
|
||||||
|
|||||||
@ -29,9 +29,6 @@ type
|
|||||||
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
|
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
|
||||||
var aConnectionName: string);
|
var aConnectionName: string);
|
||||||
procedure DataAbstractServiceCreate(Sender: TObject);
|
procedure DataAbstractServiceCreate(Sender: TObject);
|
||||||
|
|
||||||
protected
|
|
||||||
procedure DarIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -40,53 +37,12 @@ implementation
|
|||||||
uses
|
uses
|
||||||
{Generated:} FactuGES_Invk, uROClasses, uDAInterfaces, uDataModuleServer;
|
{Generated:} FactuGES_Invk, uROClasses, uDAInterfaces, uDataModuleServer;
|
||||||
|
|
||||||
const
|
|
||||||
CTE_ID_TODAS = 0;
|
|
||||||
CTE_TODAS = 'Todas';
|
|
||||||
|
|
||||||
|
|
||||||
procedure Create_srvUsuarios(out anInstance : IUnknown);
|
procedure Create_srvUsuarios(out anInstance : IUnknown);
|
||||||
begin
|
begin
|
||||||
anInstance := TsrvUsuarios.Create(nil);
|
anInstance := TsrvUsuarios.Create(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ srvUsuarios }
|
{ srvUsuarios }
|
||||||
procedure TsrvUsuarios.DarIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
var
|
|
||||||
AConn : IDAConnection;
|
|
||||||
dsData: IDADataset;
|
|
||||||
|
|
||||||
begin
|
|
||||||
AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
|
|
||||||
|
|
||||||
try
|
|
||||||
try
|
|
||||||
dsData := schUsuarios.NewDataset(AConn, 'darTiendaVendedorUsuario', ['ID_USUARIO'], [ID_USUARIO]);
|
|
||||||
dsData.Active := True;
|
|
||||||
|
|
||||||
case dsData.RecordCount of
|
|
||||||
0: begin
|
|
||||||
AIdTienda := CTE_ID_TODAS;
|
|
||||||
ATienda := CTE_TODAS;
|
|
||||||
end;
|
|
||||||
1: begin
|
|
||||||
AIdTienda := dsData.FieldByName('ID_TIENDA').AsInteger;
|
|
||||||
ATienda := dsData.FieldByName('TIENDA').AsString;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
RaiseError('Error al buscar tienda por defecto para el usuario');
|
|
||||||
end;
|
|
||||||
|
|
||||||
AConn.CommitTransaction;
|
|
||||||
|
|
||||||
except
|
|
||||||
RaiseError('Error al buscar ejercicio activo de la empresa');
|
|
||||||
AConn.RollbackTransaction;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
dsData := NIL;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TsrvUsuarios.DataAbstractServiceBeforeAcquireConnection(
|
procedure TsrvUsuarios.DataAbstractServiceBeforeAcquireConnection(
|
||||||
aSender: TObject; var aConnectionName: string);
|
aSender: TObject; var aConnectionName: string);
|
||||||
|
|||||||
@ -25,7 +25,7 @@ object fEditorLogin: TfEditorLogin
|
|||||||
Width = 39
|
Width = 39
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Usuario:'
|
Caption = 'Usuario:'
|
||||||
Transparent = False
|
Transparent = True
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 24
|
Left = 24
|
||||||
@ -33,7 +33,7 @@ object fEditorLogin: TfEditorLogin
|
|||||||
Width = 57
|
Width = 57
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Contrase'#241'a:'
|
Caption = 'Contrase'#241'a:'
|
||||||
Transparent = False
|
Transparent = True
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
|
|||||||
@ -4,7 +4,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, Forms, uBizUsuarios, uBizEmpresas, uBizEjercicios, uControllerBase,
|
SysUtils, Classes, Forms, uBizUsuarios, uBizEmpresas, uBizEjercicios, uControllerBase,
|
||||||
uEmpresasController, uUsuariosController, uHostManager, uConfiguracionController;
|
uEmpresasController, uUsuariosController, uHostManager, uConfiguracionController,
|
||||||
|
uBizEmpresasTiendas;
|
||||||
|
|
||||||
type
|
type
|
||||||
TDoLoadModulesEvent = procedure;
|
TDoLoadModulesEvent = procedure;
|
||||||
@ -30,6 +31,7 @@ type
|
|||||||
function GetAppVersion: String;
|
function GetAppVersion: String;
|
||||||
function GetUsuarioActivo: IBizUsuario;
|
function GetUsuarioActivo: IBizUsuario;
|
||||||
function GetEmpresaActiva: IBizEmpresa;
|
function GetEmpresaActiva: IBizEmpresa;
|
||||||
|
function GetTiendaActiva: IBizEmpresaTienda;
|
||||||
function GetEjercicioActivo: IBizEjercicio;
|
function GetEjercicioActivo: IBizEjercicio;
|
||||||
function GetModuleManager : THostManager;
|
function GetModuleManager : THostManager;
|
||||||
function GetTerminated: Boolean;
|
function GetTerminated: Boolean;
|
||||||
@ -45,6 +47,7 @@ type
|
|||||||
procedure SetAppSplashForm (AAppSplashForm : IAppSplashForm);
|
procedure SetAppSplashForm (AAppSplashForm : IAppSplashForm);
|
||||||
|
|
||||||
procedure CambiarEmpresa(const AIDEmpresa : Integer);
|
procedure CambiarEmpresa(const AIDEmpresa : Integer);
|
||||||
|
procedure CambiarEmpresaPorDefecto;
|
||||||
procedure CambiarEjercicio(const AIDEmpresa : Integer);
|
procedure CambiarEjercicio(const AIDEmpresa : Integer);
|
||||||
|
|
||||||
procedure ShowSplashForm;
|
procedure ShowSplashForm;
|
||||||
@ -60,6 +63,7 @@ type
|
|||||||
property AppFullName : String read GetAppFullName;
|
property AppFullName : String read GetAppFullName;
|
||||||
property MainForm : TCustomForm read GetMainForm;
|
property MainForm : TCustomForm read GetMainForm;
|
||||||
property EmpresaActiva : IBizEmpresa read GetEmpresaActiva;
|
property EmpresaActiva : IBizEmpresa read GetEmpresaActiva;
|
||||||
|
property TiendaActiva : IBizEmpresaTienda read GetTiendaActiva;
|
||||||
property EjercicioActivo : IBizEjercicio read GetEjercicioActivo;
|
property EjercicioActivo : IBizEjercicio read GetEjercicioActivo;
|
||||||
property UsuarioActivo : IBizUsuario read GetUsuarioActivo;
|
property UsuarioActivo : IBizUsuario read GetUsuarioActivo;
|
||||||
property EmpresasController : IEmpresasController read GetEmpresasController;
|
property EmpresasController : IEmpresasController read GetEmpresasController;
|
||||||
@ -71,12 +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;
|
{ function getVAR_IDTIENDA : Integer;
|
||||||
procedure setVAR_IDTIENDA (AValue : Integer);
|
procedure setVAR_IDTIENDA (AValue : Integer);
|
||||||
function getVAR_TIENDA : String;
|
function getVAR_TIENDA : String;
|
||||||
procedure setVAR_TIENDA (AValue : String);
|
procedure setVAR_TIENDA (AValue : String);
|
||||||
property VAR_IDTIENDA: Integer read getVAR_IDTIENDA write SetVAR_IDTIENDA;
|
property VAR_IDTIENDA: Integer read getVAR_IDTIENDA write SetVAR_IDTIENDA;
|
||||||
property VAR_TIENDA: String read getVAR_TIENDA write setVAR_TIENDA;
|
property VAR_TIENDA: String read getVAR_TIENDA write setVAR_TIENDA;}
|
||||||
|
|
||||||
|
|
||||||
procedure ShowCapado;
|
procedure ShowCapado;
|
||||||
@ -91,6 +95,7 @@ type
|
|||||||
FEmpresasController : IEmpresasController;
|
FEmpresasController : IEmpresasController;
|
||||||
FUsuariosController: IUsuariosController;
|
FUsuariosController: IUsuariosController;
|
||||||
FEmpresaActiva: IBizEmpresa;
|
FEmpresaActiva: IBizEmpresa;
|
||||||
|
FTiendaActiva: IBizEmpresaTienda;
|
||||||
FEjercicioActivo: IBizEjercicio;
|
FEjercicioActivo: IBizEjercicio;
|
||||||
FConfiguracionController : IConfiguracionController;
|
FConfiguracionController : IConfiguracionController;
|
||||||
|
|
||||||
@ -109,6 +114,7 @@ type
|
|||||||
function GetAppVersion: String;
|
function GetAppVersion: String;
|
||||||
function GetUsuarioActivo: IBizUsuario;
|
function GetUsuarioActivo: IBizUsuario;
|
||||||
function GetEmpresaActiva: IBizEmpresa;
|
function GetEmpresaActiva: IBizEmpresa;
|
||||||
|
function GetTiendaActiva: IBizEmpresaTienda;
|
||||||
function GetEjercicioActivo: IBizEjercicio;
|
function GetEjercicioActivo: IBizEjercicio;
|
||||||
function GetModuleManager : THostManager;
|
function GetModuleManager : THostManager;
|
||||||
function GetTerminated: Boolean;
|
function GetTerminated: Boolean;
|
||||||
@ -125,8 +131,7 @@ type
|
|||||||
|
|
||||||
procedure AfterLoadModule(Sender: TObject; AModuleInfo: TModuleInfo);
|
procedure AfterLoadModule(Sender: TObject; AModuleInfo: TModuleInfo);
|
||||||
procedure RegisterModule(AModuleInfo : TModuleInfo);
|
procedure RegisterModule(AModuleInfo : TModuleInfo);
|
||||||
procedure PonerTiendaPorDefecto;
|
procedure BuscarTiendaPorDefecto;
|
||||||
|
|
||||||
protected
|
protected
|
||||||
procedure DoMainForm;
|
procedure DoMainForm;
|
||||||
|
|
||||||
@ -146,6 +151,7 @@ type
|
|||||||
procedure Configurar;
|
procedure Configurar;
|
||||||
|
|
||||||
procedure CambiarEmpresa(const AIDEmpresa : Integer);
|
procedure CambiarEmpresa(const AIDEmpresa : Integer);
|
||||||
|
procedure CambiarEmpresaPorDefecto;
|
||||||
procedure CambiarEjercicio(const AIDEmpresa : Integer);
|
procedure CambiarEjercicio(const AIDEmpresa : Integer);
|
||||||
|
|
||||||
property AppVersion : String read GetAppVersion;
|
property AppVersion : String read GetAppVersion;
|
||||||
@ -153,6 +159,7 @@ type
|
|||||||
property AppFullName : String read GetAppFullName;
|
property AppFullName : String read GetAppFullName;
|
||||||
property MainForm : TCustomForm read GetMainForm;
|
property MainForm : TCustomForm read GetMainForm;
|
||||||
property EmpresaActiva : IBizEmpresa read GetEmpresaActiva;
|
property EmpresaActiva : IBizEmpresa read GetEmpresaActiva;
|
||||||
|
property TiendaActiva : IBizEmpresaTienda read GetTiendaActiva;
|
||||||
property EjercicioActivo : IBizEjercicio read GetEjercicioActivo;
|
property EjercicioActivo : IBizEjercicio read GetEjercicioActivo;
|
||||||
property AppSplashForm : IAppSplashForm read GetAppSplashForm write SetAppSplashForm;
|
property AppSplashForm : IAppSplashForm read GetAppSplashForm write SetAppSplashForm;
|
||||||
property UsuarioActivo : IBizUsuario read GetUsuarioActivo;
|
property UsuarioActivo : IBizUsuario read GetUsuarioActivo;
|
||||||
@ -176,7 +183,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
AppFactuGES : IAppFactuGES = nil;
|
AppFactuGES : IAppFactuGES;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -217,6 +224,22 @@ begin
|
|||||||
|
|
||||||
//Establece el ejercicio activo de la empresa activa
|
//Establece el ejercicio activo de la empresa activa
|
||||||
CambiarEjercicio(AIDEmpresa);
|
CambiarEjercicio(AIDEmpresa);
|
||||||
|
BuscarTiendaPorDefecto;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAppFactuGES.CambiarEmpresaPorDefecto;
|
||||||
|
var
|
||||||
|
AEmpresas : IBizEmpresa;
|
||||||
|
begin
|
||||||
|
AEmpresas := FEmpresasController.BuscarTodos;
|
||||||
|
try
|
||||||
|
AEmpresas.DataTable.Active := True;
|
||||||
|
if AEmpresas.DataTable.RecordCount > 0 then
|
||||||
|
CambiarEmpresa(AEmpresas.ID);
|
||||||
|
AEmpresas.DataTable.Active := False;
|
||||||
|
finally
|
||||||
|
AEmpresas := NIL;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAppFactuGES.CargarModulos;
|
procedure TAppFactuGES.CargarModulos;
|
||||||
@ -230,19 +253,18 @@ end;
|
|||||||
procedure TAppFactuGES.Configurar;
|
procedure TAppFactuGES.Configurar;
|
||||||
begin
|
begin
|
||||||
FConfiguracionController.ConfigurarAplicacion;
|
FConfiguracionController.ConfigurarAplicacion;
|
||||||
|
FConfiguracionController.AplicarConfiguracion;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAppFactuGES.PonerTiendaPorDefecto;
|
procedure TAppFactuGES.BuscarTiendaPorDefecto;
|
||||||
var
|
var
|
||||||
AIdTienda: Integer;
|
AIDTienda : IBizEmpresaTienda;
|
||||||
ATienda: String;
|
|
||||||
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)
|
||||||
UsuariosController.DarIDTiendaVendedorUsuario(UsuarioActivo.ID, AIdTienda, ATienda);
|
FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID);
|
||||||
VAR_IDTIENDA := AIdTienda;
|
FTiendaActiva.DataTable.Open;
|
||||||
VAR_TIENDA := ATienda;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TAppFactuGES.Create;
|
constructor TAppFactuGES.Create;
|
||||||
@ -333,7 +355,7 @@ end;
|
|||||||
|
|
||||||
function TAppFactuGES.GetEmpresaActiva: IBizEmpresa;
|
function TAppFactuGES.GetEmpresaActiva: IBizEmpresa;
|
||||||
begin
|
begin
|
||||||
Result := FEmpresaActiva;
|
Result := FEmpresaActiva
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TAppFactuGES.GetEmpresasController: IEmpresasController;
|
function TAppFactuGES.GetEmpresasController: IEmpresasController;
|
||||||
@ -359,6 +381,11 @@ begin
|
|||||||
Result := FTerminated;
|
Result := FTerminated;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TAppFactuGES.GetTiendaActiva: IBizEmpresaTienda;
|
||||||
|
begin
|
||||||
|
Result := FTiendaActiva;
|
||||||
|
end;
|
||||||
|
|
||||||
function TAppFactuGES.GetUsuarioActivo: IBizUsuario;
|
function TAppFactuGES.GetUsuarioActivo: IBizUsuario;
|
||||||
begin
|
begin
|
||||||
Result := UsuariosController.CurrentUser;
|
Result := UsuariosController.CurrentUser;
|
||||||
@ -384,9 +411,7 @@ end;
|
|||||||
|
|
||||||
procedure TAppFactuGES.HideSplashForm;
|
procedure TAppFactuGES.HideSplashForm;
|
||||||
begin
|
begin
|
||||||
if not Assigned(FAppSplashForm) then
|
if Assigned(FAppSplashForm) then
|
||||||
raise Exception.Create('AppSplashForm no asignado (HideSplashForm)');
|
|
||||||
|
|
||||||
FAppSplashForm.Hide;
|
FAppSplashForm.Hide;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -398,19 +423,20 @@ end;
|
|||||||
|
|
||||||
procedure TAppFactuGES.RegisterModule(AModuleInfo: TModuleInfo);
|
procedure TAppFactuGES.RegisterModule(AModuleInfo: TModuleInfo);
|
||||||
begin
|
begin
|
||||||
AppSplashForm.Mensaje := 'Cargando ''' + AModuleInfo.Module.ModuleName + '''...';
|
if Assigned(FAppSplashForm) then
|
||||||
|
FAppSplashForm.Mensaje := 'Cargando ''' + AModuleInfo.Module.ModuleName + '''...';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAppFactuGES.Run;
|
procedure TAppFactuGES.Run;
|
||||||
begin
|
begin
|
||||||
|
FConfiguracionController.AplicarConfiguracion;
|
||||||
if UsuariosController.StartLogin then
|
if UsuariosController.StartLogin then
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
//ShowSplashForm;
|
ShowSplashForm;
|
||||||
CargarModulos;
|
CargarModulos;
|
||||||
DoMainForm;
|
DoMainForm;
|
||||||
PonerTiendaPorDefecto;
|
|
||||||
finally
|
finally
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
HideSplashForm;
|
HideSplashForm;
|
||||||
@ -454,11 +480,11 @@ end;
|
|||||||
|
|
||||||
procedure TAppFactuGES.ShowSplashForm;
|
procedure TAppFactuGES.ShowSplashForm;
|
||||||
begin
|
begin
|
||||||
if not Assigned(FAppSplashForm) then
|
if Assigned(FAppSplashForm) then
|
||||||
raise Exception.Create('AppSplashForm no asignado (ShowSplashForm)');
|
begin
|
||||||
|
FAppSplashForm.Show;
|
||||||
FAppSplashForm.Show;
|
FAppSplashForm.Update;
|
||||||
FAppSplashForm.Update;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAppFactuGES.Terminate;
|
procedure TAppFactuGES.Terminate;
|
||||||
@ -474,6 +500,8 @@ end;
|
|||||||
|
|
||||||
initialization
|
initialization
|
||||||
// Pongo esto aquí por ahora
|
// Pongo esto aquí por ahora
|
||||||
|
AppFactuGES := NIL;
|
||||||
|
|
||||||
uUsuariosViewRegister.RegisterViews;
|
uUsuariosViewRegister.RegisterViews;
|
||||||
uEmpresasViewRegister.RegisterViews;
|
uEmpresasViewRegister.RegisterViews;
|
||||||
|
|
||||||
|
|||||||
@ -10,12 +10,14 @@ uses
|
|||||||
uMenuUtils in 'Utiles\uMenuUtils.pas',
|
uMenuUtils in 'Utiles\uMenuUtils.pas',
|
||||||
uSplash in 'uSplash.pas' {SplashScreen},
|
uSplash in 'uSplash.pas' {SplashScreen},
|
||||||
uAcercaDe in 'uAcercaDe.pas',
|
uAcercaDe in 'uAcercaDe.pas',
|
||||||
uNavPaneController in 'uNavPaneController.pas',
|
udxNavPaneController in 'udxNavPaneController.pas',
|
||||||
uNavPaneUtils in 'Utiles\uNavPaneUtils.pas',
|
uNavPaneUtils in 'Utiles\uNavPaneUtils.pas',
|
||||||
uMainMenuController in 'uMainMenuController.pas',
|
uMainMenuController in 'uMainMenuController.pas',
|
||||||
uClienteUtils in 'Utiles\uClienteUtils.pas',
|
uClienteUtils in 'Utiles\uClienteUtils.pas',
|
||||||
uBootStrap in 'uBootStrap.pas',
|
uBootStrap in 'uBootStrap.pas',
|
||||||
VCLFlickerReduce in 'Utiles\VCLFlickerReduce.pas';
|
VCLFlickerReduce in 'Utiles\VCLFlickerReduce.pas',
|
||||||
|
uPantallaPrincipal2 in 'uPantallaPrincipal2.pas' {fPantallaPrincipal2},
|
||||||
|
uNavPaneController in 'uNavPaneController.pas';
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|||||||
@ -66,8 +66,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
|
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\DataAbstract_SQLiteDriver_D11.bpl">RemObjects Data Abstract - SQLite Driver</Excluded_Packages>
|
||||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\PluginSDK_D10R.bpl">PluginSDK for Delphi 10 (Runtime)</Excluded_Packages>
|
|
||||||
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||||
@ -79,11 +78,15 @@
|
|||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="uAcercaDe.pas" />
|
<DCCReference Include="uAcercaDe.pas" />
|
||||||
<DCCReference Include="uBootStrap.pas" />
|
<DCCReference Include="uBootStrap.pas" />
|
||||||
|
<DCCReference Include="udxNavPaneController.pas" />
|
||||||
<DCCReference Include="uMainMenuController.pas" />
|
<DCCReference Include="uMainMenuController.pas" />
|
||||||
<DCCReference Include="uNavPaneController.pas" />
|
<DCCReference Include="uNavPaneController.pas" />
|
||||||
<DCCReference Include="uPantallaPrincipal.pas">
|
<DCCReference Include="uPantallaPrincipal.pas">
|
||||||
<Form>fPantallaPrincipal</Form>
|
<Form>fPantallaPrincipal</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="uPantallaPrincipal2.pas">
|
||||||
|
<Form>fPantallaPrincipal2</Form>
|
||||||
|
</DCCReference>
|
||||||
<DCCReference Include="uSplash.pas">
|
<DCCReference Include="uSplash.pas">
|
||||||
<Form>SplashScreen</Form>
|
<Form>SplashScreen</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
@ -91,6 +94,7 @@
|
|||||||
<DCCReference Include="Utiles\uMenuUtils.pas" />
|
<DCCReference Include="Utiles\uMenuUtils.pas" />
|
||||||
<DCCReference Include="Utiles\uNavPaneUtils.pas" />
|
<DCCReference Include="Utiles\uNavPaneUtils.pas" />
|
||||||
<DCCReference Include="Utiles\VCLFlickerReduce.pas" />
|
<DCCReference Include="Utiles\VCLFlickerReduce.pas" />
|
||||||
|
<None Include="..\FactuGES.inc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
<!-- EurekaLog First Line
|
<!-- EurekaLog First Line
|
||||||
|
|||||||
@ -1086,7 +1086,7 @@ object fAcercaDe: TfAcercaDe
|
|||||||
BevelInner = bvNone
|
BevelInner = bvNone
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
BorderStyle = bsNone
|
BorderStyle = bsNone
|
||||||
ParentColor = True
|
Color = clBtnFace
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -78,7 +78,7 @@ begin
|
|||||||
AppFactuGES := TAppFactuGES.Create;
|
AppFactuGES := TAppFactuGES.Create;
|
||||||
with AppFactuGES do
|
with AppFactuGES do
|
||||||
begin
|
begin
|
||||||
AppSplashForm := TAppSplashForm.Create;
|
//AppSplashForm := TAppSplashForm.Create;
|
||||||
DoMainFormEvent := DoAppMainForm;
|
DoMainFormEvent := DoAppMainForm;
|
||||||
DoLoadModulesEvent := DoAppLoadModules;
|
DoLoadModulesEvent := DoAppLoadModules;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -85,6 +85,7 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
|||||||
NavPanelHotTrackFont.Style = []
|
NavPanelHotTrackFont.Style = []
|
||||||
SmallImages = ModulesSmallImageList
|
SmallImages = ModulesSmallImageList
|
||||||
OnChange = JvNavigationPaneChange
|
OnChange = JvNavigationPaneChange
|
||||||
|
ExplicitTop = 4
|
||||||
object pagInicio: TJvNavPanelPage
|
object pagInicio: TJvNavPanelPage
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -111,7 +112,6 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
|||||||
Top = 29
|
Top = 29
|
||||||
Width = 137
|
Width = 137
|
||||||
Height = 52
|
Height = 52
|
||||||
Margins.Bottom = 0
|
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
Caption = 'Para empezar a trabajar, elija una empresa en la lista de abajo'
|
Caption = 'Para empezar a trabajar, elija una empresa en la lista de abajo'
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -171,7 +171,6 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 210
|
Width = 210
|
||||||
Height = 54
|
Height = 54
|
||||||
Margins.Bottom = 0
|
|
||||||
Caption = 'Bienvenido'
|
Caption = 'Bienvenido'
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clHighlight
|
Font.Color = clHighlight
|
||||||
@ -186,7 +185,6 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
|||||||
Top = 52
|
Top = 52
|
||||||
Width = 247
|
Width = 247
|
||||||
Height = 22
|
Height = 22
|
||||||
Margins.Bottom = 0
|
|
||||||
Caption = 'Administraci'#243'n de puntos de venta'
|
Caption = 'Administraci'#243'n de puntos de venta'
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clGray
|
Font.Color = clGray
|
||||||
|
|||||||
@ -179,8 +179,6 @@ begin
|
|||||||
JvNavigationPane.StyleManager := dmBase.StyleManager;
|
JvNavigationPane.StyleManager := dmBase.StyleManager;
|
||||||
dmBase.OnThemeChange := Self.OnThemeChange;
|
dmBase.OnThemeChange := Self.OnThemeChange;
|
||||||
Self.OnThemeChange(Self); // Forzar el refresco de los colores del tema activo
|
Self.OnThemeChange(Self); // Forzar el refresco de los colores del tema activo
|
||||||
|
|
||||||
actLogin.Execute;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfPantallaPrincipal.FormShow(Sender: TObject);
|
procedure TfPantallaPrincipal.FormShow(Sender: TObject);
|
||||||
@ -215,6 +213,11 @@ begin
|
|||||||
TBXStatusBar1.Panels[1].Caption := AppFactuGES.UsuarioActivo.UserName
|
TBXStatusBar1.Panels[1].Caption := AppFactuGES.UsuarioActivo.UserName
|
||||||
else
|
else
|
||||||
TBXStatusBar1.Panels[1].Caption := '';
|
TBXStatusBar1.Panels[1].Caption := '';
|
||||||
|
|
||||||
|
if Assigned(AppFactuGES.TiendaActiva) then
|
||||||
|
TBXStatusBar1.Panels[2].Caption := AppFactuGES.TiendaActiva.NOMBRE
|
||||||
|
else
|
||||||
|
TBXStatusBar1.Panels[2].Caption := 'Sin tienda por defecto';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfPantallaPrincipal.ReleaseEmbedded;
|
procedure TfPantallaPrincipal.ReleaseEmbedded;
|
||||||
@ -267,7 +270,6 @@ begin
|
|||||||
LockWindowUpdate(Handle);
|
LockWindowUpdate(Handle);
|
||||||
try
|
try
|
||||||
Color := dmBase.StyleManager.Colors.DividerColorTo;
|
Color := dmBase.StyleManager.Colors.DividerColorTo;
|
||||||
//pnlBorde.Color := dmBase.StyleManager.Colors.FrameColor;
|
|
||||||
pnlBorde.BoundColor := dmBase.StyleManager.Colors.FrameColor;
|
pnlBorde.BoundColor := dmBase.StyleManager.Colors.FrameColor;
|
||||||
with StyleManagerButtons do
|
with StyleManagerButtons do
|
||||||
begin
|
begin
|
||||||
@ -291,8 +293,6 @@ begin
|
|||||||
Colors.ButtonSelectedColorTo := dmBase.StyleManager.Colors.ButtonSelectedColorTo;
|
Colors.ButtonSelectedColorTo := dmBase.StyleManager.Colors.ButtonSelectedColorTo;
|
||||||
end;
|
end;
|
||||||
lblBienvenido.Font.Color := JvNavigationPane.Colors.ButtonColorTo;
|
lblBienvenido.Font.Color := JvNavigationPane.Colors.ButtonColorTo;
|
||||||
{ JvGradient1.StartColor := JvNavigationPane.Colors.ButtonColorFrom;
|
|
||||||
JvGradient1.EndColor := JvNavigationPane.Colors.ButtonColorTo;}
|
|
||||||
finally
|
finally
|
||||||
LockWindowUpdate(0);
|
LockWindowUpdate(0);
|
||||||
Refresh;
|
Refresh;
|
||||||
|
|||||||
@ -190,8 +190,8 @@ begin
|
|||||||
SITUACION := SITUACION_ALBARAN_PENDIENTE;
|
SITUACION := SITUACION_ALBARAN_PENDIENTE;
|
||||||
REFERENCIA := '';
|
REFERENCIA := '';
|
||||||
TIPO := CTE_TIPO_ALBARAN;
|
TIPO := CTE_TIPO_ALBARAN;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
|
|
||||||
//TEMPORAL ALMACÉN PUESTO A CAPÓN Y PROVISIONAL
|
//TEMPORAL ALMACÉN PUESTO A CAPÓN Y PROVISIONAL
|
||||||
ID_ALMACEN := 1;
|
ID_ALMACEN := 1;
|
||||||
|
|||||||
@ -183,8 +183,8 @@ begin
|
|||||||
FECHA_ALBARAN := DateOf(Date);
|
FECHA_ALBARAN := DateOf(Date);
|
||||||
INCIDENCIAS_ACTIVAS := 0;
|
INCIDENCIAS_ACTIVAS := 0;
|
||||||
TIPO := CTE_TIPO_ALBARAN;
|
TIPO := CTE_TIPO_ALBARAN;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
|
|
||||||
// OJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
|
// OJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
|
||||||
//TEMPORAL ALMACÉN PUESTO A CAPÓN Y PROVISIONAL
|
//TEMPORAL ALMACÉN PUESTO A CAPÓN Y PROVISIONAL
|
||||||
|
|||||||
@ -92,6 +92,7 @@ begin
|
|||||||
PRECIO_NETO := 0;
|
PRECIO_NETO := 0;
|
||||||
COMISIONABLE := 1;
|
COMISIONABLE := 1;
|
||||||
ELIMINADO := 0;
|
ELIMINADO := 0;
|
||||||
|
INVENTARIABLE := 1;
|
||||||
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -99,7 +100,6 @@ procedure TBizArticulo.OnNewRecord(Sender: TDADataTable);
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ID := GetRecNo; // -1, -2, -3...
|
ID := GetRecNo; // -1, -2, -3...
|
||||||
INVENTARIABLE := 1;
|
|
||||||
IniciarValoresArticuloNuevo;
|
IniciarValoresArticuloNuevo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -447,14 +447,13 @@ end;
|
|||||||
procedure TBizContacto.IniciarValoresContactoNuevo;
|
procedure TBizContacto.IniciarValoresContactoNuevo;
|
||||||
begin
|
begin
|
||||||
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBizContacto.OnNewRecord(Sender: TDADataTable);
|
procedure TBizContacto.OnNewRecord(Sender: TDADataTable);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
// ID := GetRecNo; // -1, -2, -3...
|
|
||||||
IniciarValoresContactoNuevo;
|
IniciarValoresContactoNuevo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,41 @@ object srvContactos: TsrvContactos
|
|||||||
DataDictionary = DataDictionary
|
DataDictionary = DataDictionary
|
||||||
Diagrams = Diagrams
|
Diagrams = Diagrams
|
||||||
Datasets = <
|
Datasets = <
|
||||||
|
item
|
||||||
|
IsPublic = False
|
||||||
|
Params = <
|
||||||
|
item
|
||||||
|
Name = 'ID_USUARIO'
|
||||||
|
Value = ''
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'ID_EMPRESA'
|
||||||
|
Value = ''
|
||||||
|
end>
|
||||||
|
Statements = <
|
||||||
|
item
|
||||||
|
Connection = 'IBX'
|
||||||
|
ConnectionType = 'Interbase'
|
||||||
|
Default = True
|
||||||
|
Name = 'IBX'
|
||||||
|
SQL =
|
||||||
|
'select ID_TIENDA'#10' from V_VENDEDORES'#10' where V_VENDEDORES.ID_USUA' +
|
||||||
|
'RIO = :ID_USUARIO and'#10' V_VENDEDORES.ID_EMPRESA = :ID_EMPRE' +
|
||||||
|
'SA'#10
|
||||||
|
StatementType = stSQL
|
||||||
|
ColumnMappings = <
|
||||||
|
item
|
||||||
|
DatasetField = 'ID_TIENDA'
|
||||||
|
TableField = 'ID_TIENDA'
|
||||||
|
end>
|
||||||
|
end>
|
||||||
|
Name = 'DarTiendaDeUsuario'
|
||||||
|
Fields = <
|
||||||
|
item
|
||||||
|
Name = 'ID_TIENDA'
|
||||||
|
DataType = datInteger
|
||||||
|
end>
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Params = <>
|
Params = <>
|
||||||
Statements = <
|
Statements = <
|
||||||
|
|||||||
@ -41,6 +41,7 @@ type
|
|||||||
var aConnectionName: string);
|
var aConnectionName: string);
|
||||||
public
|
public
|
||||||
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
||||||
|
function DarTiendaDeUsuario(const ID_Empresa: Integer; const ID_Usuario: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -88,6 +89,23 @@ begin
|
|||||||
bpProveedores.BusinessRulesID := BIZ_SERVER_PROVEEDOR;
|
bpProveedores.BusinessRulesID := BIZ_SERVER_PROVEEDOR;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvContactos.DarTiendaDeUsuario(const ID_Empresa: Integer;
|
||||||
|
const ID_Usuario: Integer): Integer;
|
||||||
|
var
|
||||||
|
ADataSet : IDADataset;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADataSet := schContactos.NewDataset(Connection, 'DarTiendaDeUsuario', ['ID_EMPRESA', 'ID_USUARIO'], [ID_Empresa, ID_Usuario]);
|
||||||
|
ADataSet.Open;
|
||||||
|
if ADataSet.Dataset.RecordCount > 0 then
|
||||||
|
Result := ADataSet.Dataset.Fields[0].AsInteger
|
||||||
|
else
|
||||||
|
Result := 0; // 0 -> Todas las tiendas
|
||||||
|
finally
|
||||||
|
ADataSet.Close;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TsrvContactos.DataAbstractServiceBeforeAcquireConnection(
|
procedure TsrvContactos.DataAbstractServiceBeforeAcquireConnection(
|
||||||
aSender: TObject; var aConnectionName: string);
|
aSender: TObject; var aConnectionName: string);
|
||||||
begin
|
begin
|
||||||
|
|||||||
Binary file not shown.
@ -256,8 +256,8 @@ begin
|
|||||||
IVA := AppFactuGES.EmpresaActiva.IVA;
|
IVA := AppFactuGES.EmpresaActiva.IVA;
|
||||||
RE := 0;
|
RE := 0;
|
||||||
SITUACION := CTE_PENDIENTE;
|
SITUACION := CTE_PENDIENTE;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
IGNORAR_CONTABILIDAD := 0;
|
IGNORAR_CONTABILIDAD := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -245,8 +245,8 @@ begin
|
|||||||
IVA := AppFactuGES.EmpresaActiva.IVA;
|
IVA := AppFactuGES.EmpresaActiva.IVA;
|
||||||
RE := 0;
|
RE := 0;
|
||||||
SITUACION := CTE_PENDIENTE;
|
SITUACION := CTE_PENDIENTE;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
IGNORAR_CONTABILIDAD := 0;
|
IGNORAR_CONTABILIDAD := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -206,8 +206,8 @@ begin
|
|||||||
// ALMACÉN PUESTO A CAPÓN Y PROVISIONAL
|
// ALMACÉN PUESTO A CAPÓN Y PROVISIONAL
|
||||||
ID_ALMACEN := 1;
|
ID_ALMACEN := 1;
|
||||||
|
|
||||||
ID_TIENDA := CTE_ID_TODAS;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := CTE_TODAS;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBizPedidoProveedor.IVAOnChange(Sender: TDACustomField);
|
procedure TBizPedidoProveedor.IVAOnChange(Sender: TDACustomField);
|
||||||
|
|||||||
@ -200,8 +200,8 @@ begin
|
|||||||
// INCIDENCIAS := NIL;
|
// INCIDENCIAS := NIL;
|
||||||
REFERENCIA := '';
|
REFERENCIA := '';
|
||||||
SITUACION := SITUACION_PRESUPUESTO_PENDIENTE;
|
SITUACION := SITUACION_PRESUPUESTO_PENDIENTE;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
|
|
||||||
// ID_VENDEDOR := AppFactuGES.UsuarioActivo.ID_EMPLEADO;
|
// ID_VENDEDOR := AppFactuGES.UsuarioActivo.ID_EMPLEADO;
|
||||||
|
|
||||||
|
|||||||
@ -245,8 +245,8 @@ begin
|
|||||||
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
||||||
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||||
SITUACION := CTE_PENDIENTE;
|
SITUACION := CTE_PENDIENTE;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBizRecibosCliente.OnNewRecord(Sender: TDADataTable);
|
procedure TBizRecibosCliente.OnNewRecord(Sender: TDADataTable);
|
||||||
|
|||||||
@ -245,8 +245,8 @@ begin
|
|||||||
OTROS_GASTOS := 0;
|
OTROS_GASTOS := 0;
|
||||||
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
||||||
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||||
ID_TIENDA := AppFactuGES.VAR_IDTIENDA;
|
ID_TIENDA := AppFactuGES.TiendaActiva.ID;
|
||||||
TIENDA := AppFactuGES.VAR_TIENDA;
|
TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBizRecibosProveedor.OnNewRecord(Sender: TDADataTable);
|
procedure TBizRecibosProveedor.OnNewRecord(Sender: TDADataTable);
|
||||||
|
|||||||
@ -17,6 +17,16 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
|
<Operation Name="DarTiendaDeUsuario" UID="{B5D87F60-DA79-4720-B04A-06FFCBACD645}">
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="Result" DataType="Integer" Flag="Result">
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ID_Empresa" DataType="Integer" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ID_Usuario" DataType="Integer" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
</Parameters>
|
||||||
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
@ -73,6 +83,16 @@
|
|||||||
<Interfaces>
|
<Interfaces>
|
||||||
<Interface Name="Default" UID="{590F06D1-26B4-435B-B636-50CB8FFE6353}">
|
<Interface Name="Default" UID="{590F06D1-26B4-435B-B636-50CB8FFE6353}">
|
||||||
<Operations>
|
<Operations>
|
||||||
|
<Operation Name="DarTiendaUsuario" UID="{70597CB4-37D1-41AB-BD3A-4C0826F7E4F7}">
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="Result" DataType="Integer" Flag="Result">
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ID_USUARIO" DataType="Integer" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
</Parameters>
|
||||||
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
@ -126,16 +146,6 @@
|
|||||||
<Interfaces>
|
<Interfaces>
|
||||||
<Interface Name="Default" UID="{29388459-1A0B-46BE-AF9E-66A9E7AABB0B}">
|
<Interface Name="Default" UID="{29388459-1A0B-46BE-AF9E-66A9E7AABB0B}">
|
||||||
<Operations>
|
<Operations>
|
||||||
<Operation Name="darIDTiendaVendedorUsuario" UID="{7B485EF3-28A4-46EB-8BA5-CCA2C5F33CAF}">
|
|
||||||
<Parameters>
|
|
||||||
<Parameter Name="ID_USUARIO" DataType="Integer" Flag="In" >
|
|
||||||
</Parameter>
|
|
||||||
<Parameter Name="AIdTienda" DataType="Integer" Flag="InOut" >
|
|
||||||
</Parameter>
|
|
||||||
<Parameter Name="ATienda" DataType="String" Flag="InOut" >
|
|
||||||
</Parameter>
|
|
||||||
</Parameters>
|
|
||||||
</Operation>
|
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
|
|||||||
@ -165,6 +165,7 @@ type
|
|||||||
IsrvContactos = interface(IDataAbstractService)
|
IsrvContactos = interface(IDataAbstractService)
|
||||||
['{28CCDC07-A3A4-4917-89B4-64423DC70C9D}']
|
['{28CCDC07-A3A4-4917-89B4-64423DC70C9D}']
|
||||||
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
||||||
|
function DarTiendaDeUsuario(const ID_Empresa: Integer; const ID_Usuario: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvContactos }
|
{ CosrvContactos }
|
||||||
@ -178,6 +179,7 @@ type
|
|||||||
function __GetInterfaceName:string; override;
|
function __GetInterfaceName:string; override;
|
||||||
|
|
||||||
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
||||||
|
function DarTiendaDeUsuario(const ID_Empresa: Integer; const ID_Usuario: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvLogin }
|
{ IsrvLogin }
|
||||||
@ -240,6 +242,7 @@ type
|
|||||||
{ IsrvEmpresas }
|
{ IsrvEmpresas }
|
||||||
IsrvEmpresas = interface(IDataAbstractService)
|
IsrvEmpresas = interface(IDataAbstractService)
|
||||||
['{590F06D1-26B4-435B-B636-50CB8FFE6353}']
|
['{590F06D1-26B4-435B-B636-50CB8FFE6353}']
|
||||||
|
function DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvEmpresas }
|
{ CosrvEmpresas }
|
||||||
@ -252,6 +255,7 @@ type
|
|||||||
protected
|
protected
|
||||||
function __GetInterfaceName:string; override;
|
function __GetInterfaceName:string; override;
|
||||||
|
|
||||||
|
function DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvConfiguracion }
|
{ IsrvConfiguracion }
|
||||||
@ -327,7 +331,6 @@ type
|
|||||||
{ IsrvUsuarios }
|
{ IsrvUsuarios }
|
||||||
IsrvUsuarios = interface(IDataAbstractService)
|
IsrvUsuarios = interface(IDataAbstractService)
|
||||||
['{29388459-1A0B-46BE-AF9E-66A9E7AABB0B}']
|
['{29388459-1A0B-46BE-AF9E-66A9E7AABB0B}']
|
||||||
procedure darIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvUsuarios }
|
{ CosrvUsuarios }
|
||||||
@ -340,7 +343,6 @@ type
|
|||||||
protected
|
protected
|
||||||
function __GetInterfaceName:string; override;
|
function __GetInterfaceName:string; override;
|
||||||
|
|
||||||
procedure darIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvAlmacenes }
|
{ IsrvAlmacenes }
|
||||||
@ -1000,6 +1002,23 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvContactos_Proxy.DarTiendaDeUsuario(const ID_Empresa: Integer; const ID_Usuario: Integer): Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarTiendaDeUsuario');
|
||||||
|
__Message.Write('ID_Empresa', TypeInfo(Integer), ID_Empresa, []);
|
||||||
|
__Message.Write('ID_Usuario', TypeInfo(Integer), ID_Usuario, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
__TransportChannel.Dispatch(__Message);
|
||||||
|
|
||||||
|
__Message.Read('Result', TypeInfo(Integer), result, []);
|
||||||
|
finally
|
||||||
|
__Message.UnsetAttributes(__TransportChannel);
|
||||||
|
__Message.FreeStream;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
{ CosrvLogin }
|
{ CosrvLogin }
|
||||||
|
|
||||||
class function CosrvLogin.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
|
class function CosrvLogin.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
|
||||||
@ -1092,11 +1111,30 @@ begin
|
|||||||
result := TsrvEmpresas_Proxy.Create(aMessage, aTransportChannel);
|
result := TsrvEmpresas_Proxy.Create(aMessage, aTransportChannel);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TsrvEmpresas_Proxy }
|
||||||
|
|
||||||
function TsrvEmpresas_Proxy.__GetInterfaceName:string;
|
function TsrvEmpresas_Proxy.__GetInterfaceName:string;
|
||||||
begin
|
begin
|
||||||
result := 'srvEmpresas';
|
result := 'srvEmpresas';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvEmpresas_Proxy.DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarTiendaUsuario');
|
||||||
|
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Write('ID_USUARIO', TypeInfo(Integer), ID_USUARIO, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
__TransportChannel.Dispatch(__Message);
|
||||||
|
|
||||||
|
__Message.Read('Result', TypeInfo(Integer), result, []);
|
||||||
|
finally
|
||||||
|
__Message.UnsetAttributes(__TransportChannel);
|
||||||
|
__Message.FreeStream;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
{ CosrvConfiguracion }
|
{ CosrvConfiguracion }
|
||||||
|
|
||||||
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
||||||
@ -1170,32 +1208,11 @@ begin
|
|||||||
result := TsrvUsuarios_Proxy.Create(aMessage, aTransportChannel);
|
result := TsrvUsuarios_Proxy.Create(aMessage, aTransportChannel);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TsrvUsuarios_Proxy }
|
|
||||||
|
|
||||||
function TsrvUsuarios_Proxy.__GetInterfaceName:string;
|
function TsrvUsuarios_Proxy.__GetInterfaceName:string;
|
||||||
begin
|
begin
|
||||||
result := 'srvUsuarios';
|
result := 'srvUsuarios';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsrvUsuarios_Proxy.darIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String);
|
|
||||||
begin
|
|
||||||
try
|
|
||||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'darIDTiendaVendedorUsuario');
|
|
||||||
__Message.Write('ID_USUARIO', TypeInfo(Integer), ID_USUARIO, []);
|
|
||||||
__Message.Write('AIdTienda', TypeInfo(Integer), AIdTienda, []);
|
|
||||||
__Message.Write('ATienda', TypeInfo(String), ATienda, []);
|
|
||||||
__Message.Finalize;
|
|
||||||
|
|
||||||
__TransportChannel.Dispatch(__Message);
|
|
||||||
|
|
||||||
__Message.Read('AIdTienda', TypeInfo(Integer), AIdTienda, []);
|
|
||||||
__Message.Read('ATienda', TypeInfo(String), ATienda, []);
|
|
||||||
finally
|
|
||||||
__Message.UnsetAttributes(__TransportChannel);
|
|
||||||
__Message.FreeStream;
|
|
||||||
end
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ CosrvAlmacenes }
|
{ CosrvAlmacenes }
|
||||||
|
|
||||||
class function CosrvAlmacenes.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvAlmacenes;
|
class function CosrvAlmacenes.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvAlmacenes;
|
||||||
|
|||||||
@ -25,6 +25,7 @@ type
|
|||||||
protected
|
protected
|
||||||
published
|
published
|
||||||
procedure Invoke_GenerateEtiquetasReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GenerateEtiquetasReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
procedure Invoke_DarTiendaDeUsuario(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvLogin_Invoker = class(TDataAbstractService_Invoker)
|
TsrvLogin_Invoker = class(TDataAbstractService_Invoker)
|
||||||
@ -52,6 +53,7 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
published
|
published
|
||||||
|
procedure Invoke_DarTiendaUsuario(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvConfiguracion_Invoker = class(TDataAbstractService_Invoker)
|
TsrvConfiguracion_Invoker = class(TDataAbstractService_Invoker)
|
||||||
@ -83,7 +85,6 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
published
|
published
|
||||||
procedure Invoke_darIDTiendaVendedorUsuario(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvAlmacenes_Invoker = class(TDataAbstractService_Invoker)
|
TsrvAlmacenes_Invoker = class(TDataAbstractService_Invoker)
|
||||||
@ -250,6 +251,28 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TsrvContactos_Invoker.Invoke_DarTiendaDeUsuario(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
{ function DarTiendaDeUsuario(const ID_Empresa: Integer; const ID_Usuario: Integer): Integer; }
|
||||||
|
var
|
||||||
|
ID_Empresa: Integer;
|
||||||
|
ID_Usuario: Integer;
|
||||||
|
lResult: Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
__Message.Read('ID_Empresa', TypeInfo(Integer), ID_Empresa, []);
|
||||||
|
__Message.Read('ID_Usuario', TypeInfo(Integer), ID_Usuario, []);
|
||||||
|
|
||||||
|
lResult := (__Instance as IsrvContactos).DarTiendaDeUsuario(ID_Empresa, ID_Usuario);
|
||||||
|
|
||||||
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContactos', 'DarTiendaDeUsuarioResponse');
|
||||||
|
__Message.Write('Result', TypeInfo(Integer), lResult, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
__Message.UnsetAttributes(__Transport);
|
||||||
|
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TsrvLogin_Invoker }
|
{ TsrvLogin_Invoker }
|
||||||
|
|
||||||
procedure TsrvLogin_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvLogin_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
@ -316,6 +339,30 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TsrvEmpresas_Invoker }
|
||||||
|
|
||||||
|
procedure TsrvEmpresas_Invoker.Invoke_DarTiendaUsuario(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
{ function DarTiendaUsuario(const ID_EMPRESA: Integer; const ID_USUARIO: Integer): Integer; }
|
||||||
|
var
|
||||||
|
ID_EMPRESA: Integer;
|
||||||
|
ID_USUARIO: Integer;
|
||||||
|
lResult: Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
__Message.Read('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Read('ID_USUARIO', TypeInfo(Integer), ID_USUARIO, []);
|
||||||
|
|
||||||
|
lResult := (__Instance as IsrvEmpresas).DarTiendaUsuario(ID_EMPRESA, ID_USUARIO);
|
||||||
|
|
||||||
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvEmpresas', 'DarTiendaUsuarioResponse');
|
||||||
|
__Message.Write('Result', TypeInfo(Integer), lResult, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
__Message.UnsetAttributes(__Transport);
|
||||||
|
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TsrvConfiguracion_Invoker }
|
{ TsrvConfiguracion_Invoker }
|
||||||
|
|
||||||
procedure TsrvConfiguracion_Invoker.Invoke_darValor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvConfiguracion_Invoker.Invoke_darValor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
@ -338,32 +385,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TsrvUsuarios_Invoker }
|
|
||||||
|
|
||||||
procedure TsrvUsuarios_Invoker.Invoke_darIDTiendaVendedorUsuario(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
|
||||||
{ procedure darIDTiendaVendedorUsuario(const ID_USUARIO: Integer; var AIdTienda: Integer; var ATienda: String); }
|
|
||||||
var
|
|
||||||
ID_USUARIO: Integer;
|
|
||||||
AIdTienda: Integer;
|
|
||||||
ATienda: String;
|
|
||||||
begin
|
|
||||||
try
|
|
||||||
__Message.Read('ID_USUARIO', TypeInfo(Integer), ID_USUARIO, []);
|
|
||||||
__Message.Read('AIdTienda', TypeInfo(Integer), AIdTienda, []);
|
|
||||||
__Message.Read('ATienda', TypeInfo(String), ATienda, []);
|
|
||||||
|
|
||||||
(__Instance as IsrvUsuarios).darIDTiendaVendedorUsuario(ID_USUARIO, AIdTienda, ATienda);
|
|
||||||
|
|
||||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvUsuarios', 'darIDTiendaVendedorUsuarioResponse');
|
|
||||||
__Message.Write('AIdTienda', TypeInfo(Integer), AIdTienda, []);
|
|
||||||
__Message.Write('ATienda', TypeInfo(String), ATienda, []);
|
|
||||||
__Message.Finalize;
|
|
||||||
__Message.UnsetAttributes(__Transport);
|
|
||||||
|
|
||||||
finally
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TsrvRecibosCliente_Invoker }
|
{ TsrvRecibosCliente_Invoker }
|
||||||
|
|
||||||
procedure TsrvRecibosCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvRecibosCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -103,6 +103,8 @@ uses
|
|||||||
uRptAlbaranesCliente_Server in '..\Modulos\Albaranes de cliente\Reports\uRptAlbaranesCliente_Server.pas',
|
uRptAlbaranesCliente_Server in '..\Modulos\Albaranes de cliente\Reports\uRptAlbaranesCliente_Server.pas',
|
||||||
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
|
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
|
||||||
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
|
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
|
||||||
|
schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas',
|
||||||
|
schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas',
|
||||||
schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
|
schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
|
||||||
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
|
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
|
||||||
schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
|
schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
|
||||||
@ -114,8 +116,6 @@ uses
|
|||||||
uBizComisionesServer in '..\Modulos\Comisiones\Model\uBizComisionesServer.pas',
|
uBizComisionesServer in '..\Modulos\Comisiones\Model\uBizComisionesServer.pas',
|
||||||
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
|
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
|
||||||
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
|
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
|
||||||
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
|
|
||||||
schUsuariosServer_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosServer_Intf.pas',
|
|
||||||
schComisionesClient_Intf in '..\Modulos\Comisiones\Model\schComisionesClient_Intf.pas',
|
schComisionesClient_Intf in '..\Modulos\Comisiones\Model\schComisionesClient_Intf.pas',
|
||||||
schComisionesServer_Intf in '..\Modulos\Comisiones\Model\schComisionesServer_Intf.pas',
|
schComisionesServer_Intf in '..\Modulos\Comisiones\Model\schComisionesServer_Intf.pas',
|
||||||
uRptComisiones_Server in '..\Modulos\Comisiones\Reports\uRptComisiones_Server.pas' {RptComisiones: TDataModule},
|
uRptComisiones_Server in '..\Modulos\Comisiones\Reports\uRptComisiones_Server.pas' {RptComisiones: TDataModule},
|
||||||
@ -124,8 +124,8 @@ uses
|
|||||||
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
|
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
|
||||||
schEjerciciosClient_Intf in '..\ApplicationBase\Ejercicios\Model\schEjerciciosClient_Intf.pas',
|
schEjerciciosClient_Intf in '..\ApplicationBase\Ejercicios\Model\schEjerciciosClient_Intf.pas',
|
||||||
schEjerciciosServer_Intf in '..\ApplicationBase\Ejercicios\Model\schEjerciciosServer_Intf.pas',
|
schEjerciciosServer_Intf in '..\ApplicationBase\Ejercicios\Model\schEjerciciosServer_Intf.pas',
|
||||||
schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas',
|
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
|
||||||
schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas';
|
schUsuariosServer_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosServer_Intf.pas';
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
{$R ..\Servicios\RODLFile.res}
|
{$R ..\Servicios\RODLFile.res}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ BEGIN
|
|||||||
VALUE "FileVersion", "2.2.3.0\0"
|
VALUE "FileVersion", "2.2.3.0\0"
|
||||||
VALUE "ProductName", "FactuGES (Servidor)\0"
|
VALUE "ProductName", "FactuGES (Servidor)\0"
|
||||||
VALUE "ProductVersion", "2.2.3.0\0"
|
VALUE "ProductVersion", "2.2.3.0\0"
|
||||||
VALUE "CompileDate", "martes, 22 de julio de 2008 19:03\0"
|
VALUE "CompileDate", "miércoles, 23 de julio de 2008 17:05\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
@ -248,6 +248,7 @@ end;
|
|||||||
|
|
||||||
procedure TdmServer.DataModuleDestroy(Sender: TObject);
|
procedure TdmServer.DataModuleDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
SessionManager.ClearSessions(False);
|
SessionManager.ClearSessions(False);
|
||||||
ConnectionManager.ClearPool;
|
ConnectionManager.ClearPool;
|
||||||
HTTPServer.Active := False;
|
HTTPServer.Active := False;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user