diff --git a/Source/ApplicationBase/ApplicationBase.dproj b/Source/ApplicationBase/ApplicationBase.dproj
index c758bf6a..cd6d6caf 100644
--- a/Source/ApplicationBase/ApplicationBase.dproj
+++ b/Source/ApplicationBase/ApplicationBase.dproj
@@ -55,10 +55,10 @@
MainSource
-
-
-
-
+
+
+
+
diff --git a/Source/ApplicationBase/Empresas/Controller/uDatosBancariosEmpresaController.pas b/Source/ApplicationBase/Empresas/Controller/uDatosBancariosEmpresaController.pas
index e40fdb8b..6af352d6 100644
--- a/Source/ApplicationBase/Empresas/Controller/uDatosBancariosEmpresaController.pas
+++ b/Source/ApplicationBase/Empresas/Controller/uDatosBancariosEmpresaController.pas
@@ -50,17 +50,14 @@ begin
CreateEditor('EditorDatosBancariosEmpresa', IEditorDatosBancariosEmpresa, AEditor);
if Assigned(AEditor) then
begin
- with AEditor do
- begin
- try
- DatosBancarios := ADatosBancarios;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.DatosBancarios := ADatosBancarios;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
end;
diff --git a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
index f03e8e94..25f0bc44 100644
--- a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
+++ b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
@@ -273,16 +273,13 @@ begin
AEditor := NIL;
CreateEditor('EditorEmpresa', IEditorEmpresa, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Empresa := AEmpresa;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Empresa := AEmpresa;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -292,24 +289,16 @@ procedure TEmpresasController.VerTodos(AEmpresas: IBizEmpresa);
begin
{
AEditor := NIL;
- ShowHourglassCursor;
- try
- CreateEditor('EditorEmpresas', IEditorClientes, AEditor);
- if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Contactos := AContactos;
- Controller := Self;
- ShowModal;
- finally
- Release;
- end;
- end;
- finally
- AEditor := NIL;
- HideHourglassCursor;
- end;
+ CreateEditor('EditorEmpresas', IEditorClientes, AEditor);
+ if Assigned(AEditor) then
+ try
+ AEditor.Contactos := AContactos;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
}
end;
diff --git a/Source/ApplicationBase/Usuarios/Controller/uPerfilesUsuarioController.pas b/Source/ApplicationBase/Usuarios/Controller/uPerfilesUsuarioController.pas
index c51f7e6b..7672e006 100644
--- a/Source/ApplicationBase/Usuarios/Controller/uPerfilesUsuarioController.pas
+++ b/Source/ApplicationBase/Usuarios/Controller/uPerfilesUsuarioController.pas
@@ -148,17 +148,14 @@ begin
CreateEditor('EditorPerfilesUsuario', IEditorPerfilesUsuario, AEditor);
if Assigned(AEditor) then
begin
- with (AEditor as IEditorPerfilesUsuario) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- PerfilesUsuario := APerfilesUsuario;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.PerfilesUsuario := APerfilesUsuario;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
finally
APerfilesUsuario := NIL;
@@ -178,17 +175,14 @@ begin
FPerfil.Active := True;
CreateEditor('EditorPerfilUsuario', IEditorPerfilUsuario, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorPerfilUsuario) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- PerfilUsuario := FPerfil;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.PerfilUsuario := FPerfil;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
finally
FPerfil := NIL;
end;
@@ -207,16 +201,14 @@ begin
APerfilesUsuario.Active := True;
CreateEditor('EditorPerfilesUsuario', IEditorPerfilesUsuario, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorPerfilesUsuario) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- PerfilesUsuario := APerfilesUsuario;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.PerfilesUsuario := APerfilesUsuario;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
finally
APerfilesUsuario := NIL;
diff --git a/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas b/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas
index 0b601bf3..a0e7db1d 100644
--- a/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas
+++ b/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas
@@ -303,7 +303,7 @@ end;
function TUsuariosController.CambiarPassword(const AIDUser: Integer) : Boolean;
var
AUser : IBizUsuario;
- AEditorCambiar : TfEditorCambiarPassword;
+ AEditor : TfEditorCambiarPassword;
begin
Result := False;
AUser := FDataModule.GetUsuario(AIDUser);
@@ -311,21 +311,20 @@ begin
begin
AUser.Active := True;
- AEditorCambiar := TfEditorCambiarPassword.Create(NIL);
- with AEditorCambiar do
- try
- Controller := Self;
- Usuario := AUser;
- CambioObligatorio := False;
- if (Length(Trim(AUser.PASS)) = 0) then
- EditAtu.Enabled := False;
- if (ShowModal = mrOk) then
- Result := CambiarPassword(AIDUser, EditNova.Text);
- finally
- Release;
- AUser.Active := False;
- AUser := NIL;
- end;
+ AEditor := TfEditorCambiarPassword.Create(NIL);
+ try
+ AEditor.Controller := Self;
+ AEditor.Usuario := AUser;
+ AEditor.CambioObligatorio := False;
+ if (Length(Trim(AUser.PASS)) = 0) then
+ AEditor.EditAtu.Enabled := False;
+ if (AEditor.ShowModal = mrOk) then
+ Result := CambiarPassword(AIDUser, AEditor.EditNova.Text);
+ finally
+ AEditor.Release;
+ AUser.Active := False;
+ AUser := NIL;
+ end;
end;
end;
@@ -761,16 +760,13 @@ begin
CreateEditor('EditorPerfilUsuario', IEditorPerfilUsuario, AEditor);
if Assigned(AEditor) then
begin
- with (AEditor as IEditorPerfilUsuario) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- PerfilUsuario := APerfil;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.PerfilUsuario := APerfil;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
end;
@@ -787,16 +783,13 @@ begin
APerfilesUsuario.Active := True;
CreateEditor('EditorPerfilesUsuario', IEditorPerfilesUsuario, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorPerfilesUsuario) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- PerfilesUsuario := APerfilesUsuario;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.PerfilesUsuario := APerfilesUsuario;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
finally
APerfilesUsuario := NIL;
@@ -822,17 +815,14 @@ begin
AUser.Active := True;
CreateEditor('EditorUsuario', IEditorUsuario, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorUsuario) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Usuario := AUser;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Usuario := AUser;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TUsuariosController.VerUsuarios;
@@ -847,17 +837,14 @@ begin
try
CreateEditor('EditorUsuarios', IEditorUsuarios, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorUsuarios) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Usuarios := FUsuarios;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Usuarios := FUsuarios;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
finally
FUsuarios := NIL;
end;
@@ -878,16 +865,13 @@ begin
CreateEditor('EditorLogin', IEditorLogin, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Result := (AEditor.ShowModal = mrOk);
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ Result := (AEditor.ShowModal = mrOk);
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TUsuariosController.FiltrarEmpresa(AUsuario: IBizUsuario);
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 252458a4..58f42674 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -54,57 +54,57 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Base/Base.res b/Source/Base/Base.res
index 1641339f..8b251f31 100644
Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 6df4d44b..1d759155 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -54,7 +54,7 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1450FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.4.5.0FactuGESFactuGES1.4.5.0
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1460FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.4.6.0FactuGESFactuGES1.4.6.0
diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc
index fe91af58..a8fe5655 100644
--- a/Source/Cliente/FactuGES.rc
+++ b/Source/Cliente/FactuGES.rc
@@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico"
1 VERSIONINFO
-FILEVERSION 1,4,5,0
-PRODUCTVERSION 1,4,5,0
+FILEVERSION 1,4,6,0
+PRODUCTVERSION 1,4,6,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
- VALUE "FileVersion", "1.4.5.0\0"
+ VALUE "FileVersion", "1.4.6.0\0"
VALUE "InternalName", "FactuGES\0"
VALUE "ProductName", "FactuGES\0"
- VALUE "ProductVersion", "1.4.5.0\0"
+ VALUE "ProductVersion", "1.4.6.0\0"
END
END
BLOCK "VarFileInfo"
diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res
index 8dd95477..92df1ad1 100644
Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index 3ebc6185..0b8bcd4a 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -59,30 +59,30 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas
index 80a60c5a..a3ca221e 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas
@@ -572,7 +572,7 @@ end;
procedure TAlbaranesClienteController.Ver(AAlbaran: IBizAlbaranCliente);
var
- AEditor : IEditorDBItem;
+ AEditor : IEditorAlbaranCliente;
begin
AEditor := NIL;
RecuperarObjetos(AAlbaran);
@@ -583,28 +583,25 @@ begin
CreateEditor('EditorAlbaranDevCliente', IEditorAlbaranDevCliente, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorAlbaranCliente) do
- begin
- try
- //MODO CONSULTAR
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Albaran := AAlbaran;
+ try
+ //MODO CONSULTAR
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Albaran := AAlbaran;
- if not EsModificable(AAlbaran) then
- begin
- SetDataTableReadOnly(AAlbaran.DataTable, True);
- ReadOnly := True;
- end;
-
- ShowModal;
-
- //MODO CONSULTAR (Se deja la tabla como estaba)
- if ReadOnly then
- SetDataTableReadOnly(AAlbaran.DataTable, False);
- finally
- Release;
- AEditor := NIL;
+ if not EsModificable(AAlbaran) then
+ begin
+ SetDataTableReadOnly(AAlbaran.DataTable, True);
+ AEditor.ReadOnly := True;
end;
+
+ AEditor.ShowModal;
+
+ //MODO CONSULTAR (Se deja la tabla como estaba)
+ if AEditor.ReadOnly then
+ SetDataTableReadOnly(AAlbaran.DataTable, False);
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -618,15 +615,12 @@ begin
//RecuperarObjetos(AAlbaran); <- No descomentar. No hace falta
CreateEditor('EditorDireccionEntregaAlbaranCliente', IEditorDireccionEntregaAlbaranCliente, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorDireccionEntregaAlbaranCliente) do
- begin
- try
- Albaran := AAlbaran;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Albaran := AAlbaran;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -639,28 +633,25 @@ begin
AEditor := NIL;
CreateEditor('EditorAlbaranesCliente', IEditorAlbaranesCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- if not EsCadenaVacia(AWindowCaption) then
- AEditor.WindowCaption := AWindowCaption;
+ try
+ if not EsCadenaVacia(AWindowCaption) then
+ AEditor.WindowCaption := AWindowCaption;
- if not EsCadenaVacia(AHeaderText) then
- AEditor.HeaderText := AHeaderText;
+ if not EsCadenaVacia(AHeaderText) then
+ AEditor.HeaderText := AHeaderText;
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Albaranes := AAlbarans;
- MultiSelect := True;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Albaranes := AAlbarans;
+ AEditor.MultiSelect := True;
- if AVerModal then
- ShowModal
- else
- ShowEmbedded;
- finally
- if AVerModal then
- Release;
- AEditor := NIL;
- end;
+ if AVerModal then
+ AEditor.ShowModal
+ else
+ AEditor.ShowEmbedded;
+ finally
+ if AVerModal then
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -673,28 +664,25 @@ begin
AEditor := NIL;
CreateEditor('EditorAlbaranesDevCliente', IEditorAlbaranesDevCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- if not EsCadenaVacia(AWindowCaption) then
- AEditor.WindowCaption := AWindowCaption;
+ try
+ if not EsCadenaVacia(AWindowCaption) then
+ AEditor.WindowCaption := AWindowCaption;
- if not EsCadenaVacia(AHeaderText) then
- AEditor.HeaderText := AHeaderText;
+ if not EsCadenaVacia(AHeaderText) then
+ AEditor.HeaderText := AHeaderText;
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Albaranes := AAlbarans;
- MultiSelect := True;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Albaranes := AAlbarans;
+ AEditor.MultiSelect := True;
- if AVerModal then
- ShowModal
- else
- ShowEmbedded;
- finally
- if AVerModal then
- Release;
- AEditor := NIL;
- end;
+ if AVerModal then
+ AEditor.ShowModal
+ else
+ AEditor.ShowEmbedded;
+ finally
+ if AVerModal then
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -723,19 +711,16 @@ begin
Result := NIL;
CreateEditor('EditorElegirAlbaranesCliente', IEditorElegirAlbaranesCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Albaranes := AAlbaran;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := AlbaranesClienteSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Albaranes := AAlbaran;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.AlbaranesClienteSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas
index aa0e60a0..5c1615c2 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas
@@ -74,14 +74,11 @@ begin
try
CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- end;
+ try
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
end;
finally
FreeAndNil(AStream);
@@ -99,14 +96,11 @@ begin
try
CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- LoadFromStream(AStream);
- Print;
- finally
- Release;
- end;
+ try
+ AEditor.LoadFromStream(AStream);
+ AEditor.Print;
+ finally
+ AEditor.Release;
end;
finally
FreeAndNil(AStream);
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uArticulosAlbaranClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uArticulosAlbaranClienteController.pas
index 0d22ad3b..c5383f76 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uArticulosAlbaranClienteController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uArticulosAlbaranClienteController.pas
@@ -29,20 +29,17 @@ begin
Result := NIL;
CreateEditor('EditorElegirArticulosAlbaranesCliente', IEditorElegirArticulosAlbaranesCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Articulos := AArticulos;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Articulos := AArticulos;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
end.
diff --git a/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas b/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas
index 483bc09e..42df76f4 100644
--- a/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas
+++ b/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas
@@ -653,7 +653,7 @@ end;
procedure TAlbaranesProveedorController.Ver(AAlbaran: IBizAlbaranProveedor);
var
- AEditor : IEditorDBItem;
+ AEditor : IEditorAlbaranProveedor;
begin
AEditor := NIL;
@@ -665,29 +665,26 @@ begin
CreateEditor('EditorAlbaranDevProveedor', IEditorAlbaranDevProveedor, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorAlbaranProveedor) do
- begin
try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Albaran := AAlbaran;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Albaran := AAlbaran;
//MODO CONSULTAR
if not EsModificable(AAlbaran) then
begin
SetDataTableReadOnly(AAlbaran.DataTable, True);
- ReadOnly := True;
+ AEditor.ReadOnly := True;
end;
- ShowModal;
+ AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
- if ReadOnly then
+ if AEditor.ReadOnly then
SetDataTableReadOnly(AAlbaran.DataTable, False);
finally
- Release;
+ AEditor.Release;
AEditor := NIL;
end;
- end;
end;
procedure TAlbaranesProveedorController.VerDireccionEntrega(AAlbaran: IBizAlbaranProveedor);
@@ -698,16 +695,13 @@ begin
//RecuperarObjetos(AAlbaran); <- No descomentar. No hace falta
CreateEditor('EditorDireccionEntregaAlbaranProveedor', IEditorDireccionEntregaAlbaranProveedor, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorDireccionEntregaAlbaranProveedor) do
- begin
- try
- Albaran := AAlbaran;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Albaran := AAlbaran;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TAlbaranesProveedorController.VerTodosAlbaranes(AAlbarans: IBizAlbaranProveedor;
@@ -719,27 +713,24 @@ begin
AEditor := NIL;
CreateEditor('EditorAlbaranesProveedor', IEditorAlbaranesProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- if not EsCadenaVacia(AWindowCaption) then
- AEditor.WindowCaption := AWindowCaption;
+ try
+ if not EsCadenaVacia(AWindowCaption) then
+ AEditor.WindowCaption := AWindowCaption;
- if not EsCadenaVacia(AHeaderText) then
- AEditor.HeaderText := AHeaderText;
+ if not EsCadenaVacia(AHeaderText) then
+ AEditor.HeaderText := AHeaderText;
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Albaranes := AAlbarans;
- MultiSelect := True;
- if AVerModal then
- ShowModal
- else
- ShowEmbedded;
- finally
- if AVerModal then
- Release;
- AEditor := NIL;
- end;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Albaranes := AAlbarans;
+ AEditor.MultiSelect := True;
+ if AVerModal then
+ AEditor.ShowModal
+ else
+ AEditor.ShowEmbedded;
+ finally
+ if AVerModal then
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -752,27 +743,24 @@ begin
AEditor := NIL;
CreateEditor('EditorAlbaranesDevProveedor', IEditorAlbaranesDevProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- if not EsCadenaVacia(AWindowCaption) then
- AEditor.WindowCaption := AWindowCaption;
+ try
+ if not EsCadenaVacia(AWindowCaption) then
+ AEditor.WindowCaption := AWindowCaption;
- if not EsCadenaVacia(AHeaderText) then
- AEditor.HeaderText := AHeaderText;
+ if not EsCadenaVacia(AHeaderText) then
+ AEditor.HeaderText := AHeaderText;
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Albaranes := AAlbarans;
- MultiSelect := True;
- if AVerModal then
- ShowModal
- else
- ShowEmbedded;
- finally
- if AVerModal then
- Release;
- AEditor := NIL;
- end;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Albaranes := AAlbarans;
+ AEditor.MultiSelect := True;
+ if AVerModal then
+ AEditor.ShowModal
+ else
+ AEditor.ShowEmbedded;
+ finally
+ if AVerModal then
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -801,19 +789,16 @@ begin
Result := NIL;
CreateEditor('EditorElegirAlbaranesProveedor', IEditorElegirAlbaranesProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Albaranes := AAlbaran;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := AlbaranesProveedorSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Albaranes := AAlbaran;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.AlbaranesProveedorSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorReportController.pas b/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorReportController.pas
index 52062e0d..2890efff 100644
--- a/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorReportController.pas
+++ b/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorReportController.pas
@@ -64,15 +64,12 @@ begin
try
CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
try
- LoadFromStream(AStream);
- Preview;
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
finally
- Release;
+ AEditor.Release;
end;
- end;
finally
FreeAndNil(AStream);
AEditor := Nil;
@@ -91,15 +88,12 @@ begin
try
CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
try
- LoadFromStream(AStream);
- Print;
+ AEditor.LoadFromStream(AStream);
+ AEditor.Print;
finally
- Release;
+ AEditor.Release;
end;
- end;
finally
FreeAndNil(AStream);
AEditor := Nil;
diff --git a/Source/Modulos/Albaranes de proveedor/Controller/uArticulosAlbaranProveedorController.pas b/Source/Modulos/Albaranes de proveedor/Controller/uArticulosAlbaranProveedorController.pas
index cef0182a..136d4e3c 100644
--- a/Source/Modulos/Albaranes de proveedor/Controller/uArticulosAlbaranProveedorController.pas
+++ b/Source/Modulos/Albaranes de proveedor/Controller/uArticulosAlbaranProveedorController.pas
@@ -29,20 +29,17 @@ begin
Result := NIL;
CreateEditor('EditorElegirArticulosAlbaranesProveedor', IEditorElegirArticulosAlbaranesProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Articulos := AArticulos;
- Proveedor := AProveedor;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Articulos := AArticulos;
+ AEditor.Proveedor := AProveedor;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas b/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas
index 3d708247..f8cc2e52 100644
--- a/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas
+++ b/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas
@@ -189,8 +189,6 @@ end;
function TAlmacenesController.ValidarAlmacen(AAlmacen: IBizAlmacen): Boolean;
begin
- Result := False;
-
if (AAlmacen.DataTable.State in dsEditModes) then
AAlmacen.DataTable.Post;
@@ -215,23 +213,20 @@ end;
procedure TAlmacenesController.Ver(AAlmacen: IBizAlmacen);
var
- AEditor : IEditorDBItem;
+ AEditor : IEditorAlmacen;
begin
AEditor := NIL;
RecuperarObjetos(AAlmacen);
CreateEditor('EditorAlmacen', IEditorAlmacen, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorAlmacen) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Almacen := AAlmacen;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Almacen := AAlmacen;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TAlmacenesController.VerLista(AAlmacenes: IBizAlmacen): IBizAlmacen;
@@ -243,17 +238,14 @@ begin
CreateEditor('EditorListaAlmacenes', IEditorListaAlmacenes, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Almacenes := AAlmacenes;
- if IsPositiveResult(ShowModal) then
- Result := AlmacenSeleccionado;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Almacenes := AAlmacenes;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.AlmacenSeleccionado;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TAlmacenesController.VerTodos(AAlmacenes: IBizAlmacen);
diff --git a/Source/Modulos/Articulos/Controller/Articulos_controller.dproj b/Source/Modulos/Articulos/Controller/Articulos_controller.dproj
index e11913f5..f1cf7bf4 100644
--- a/Source/Modulos/Articulos/Controller/Articulos_controller.dproj
+++ b/Source/Modulos/Articulos/Controller/Articulos_controller.dproj
@@ -55,22 +55,22 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Articulos/Controller/uArticulosController.pas b/Source/Modulos/Articulos/Controller/uArticulosController.pas
index f044e078..184a92d8 100644
--- a/Source/Modulos/Articulos/Controller/uArticulosController.pas
+++ b/Source/Modulos/Articulos/Controller/uArticulosController.pas
@@ -446,17 +446,14 @@ begin
CreateEditor('EditorArticulo', IEditorArticulo, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorArticulo) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Articulo := AArticulo;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Articulo := AArticulo;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TArticulosController.VerProveedor(AArticulo: IBizArticulo);
@@ -519,19 +516,16 @@ begin
CreateEditor('EditorElegirArticulos', IEditorElegirArticulos, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Articulos := AArticulos;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Articulos := AArticulos;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Banca electronica/Controller/uBancaElectronicaController.pas b/Source/Modulos/Banca electronica/Controller/uBancaElectronicaController.pas
index e87b5ef3..b19d2807 100644
--- a/Source/Modulos/Banca electronica/Controller/uBancaElectronicaController.pas
+++ b/Source/Modulos/Banca electronica/Controller/uBancaElectronicaController.pas
@@ -185,25 +185,22 @@ begin
CreateEditor('EditorExportacionNorma19', IEditorExportacionNorma19, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- CodigoEntidad := Entidad;
- CodigoAgencia := Oficina;
- FechaCargo := AFechaCargo;
- Fichero := AFileName;
+ try
+ AEditor.CodigoEntidad := Entidad;
+ AEditor.CodigoAgencia := Oficina;
+ AEditor.FechaCargo := AFechaCargo;
+ AEditor.Fichero := AFileName;
- if (ShowModal = mrOk) then
- begin
- Entidad := CodigoEntidad;
- Oficina := CodigoAgencia;
- AFechaCargo := FechaCargo;
- AFileName := Fichero;
- Result := True;
- end;
- finally
- Release;
- end;
+ if (AEditor.ShowModal = mrOk) then
+ begin
+ AEditor.Entidad := CodigoEntidad;
+ AEditor.Oficina := CodigoAgencia;
+ AFechaCargo := AEditor.FechaCargo;
+ AFileName := AEditor.Fichero;
+ Result := True;
+ end;
+ finally
+ AEditor.Release;
end;
end;
diff --git a/Source/Modulos/Contactos/Controller/uClientesController.pas b/Source/Modulos/Contactos/Controller/uClientesController.pas
index 5aeab507..dfcfdfc7 100644
--- a/Source/Modulos/Contactos/Controller/uClientesController.pas
+++ b/Source/Modulos/Contactos/Controller/uClientesController.pas
@@ -149,7 +149,7 @@ begin
if IsPositiveResult(AEditor.ShowModal) then
Result := AEditor.DireccionSeleccionada;
finally
- Release;
+ AEditor.Release;
AEditor := NIL;
Application.ProcessMessages;
end;
@@ -172,7 +172,7 @@ begin
if IsPositiveResult(AEditor.ShowModal) then
Result := AEditor.PersonaSeleccionada;
finally
- Release;
+ AEditor.Release;
AEditor := NIL;
Application.ProcessMessages;
end;
@@ -391,17 +391,14 @@ begin
CreateEditor('EditorCliente', IEditorCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Contacto := AContacto;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Contacto := AContacto;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TClientesController.VerAlbaranesDeCliente(ACliente: IBizCliente);
diff --git a/Source/Modulos/Contactos/Controller/uDatosBancariosContactoController.pas b/Source/Modulos/Contactos/Controller/uDatosBancariosContactoController.pas
index 73eb0c6c..9b35aafa 100644
--- a/Source/Modulos/Contactos/Controller/uDatosBancariosContactoController.pas
+++ b/Source/Modulos/Contactos/Controller/uDatosBancariosContactoController.pas
@@ -73,16 +73,13 @@ begin
CreateEditor('EditorDatoBancarioContacto', IEditorDatoBancarioContacto, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- DatoBancario := ADatoBancario;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.DatoBancario := ADatoBancario;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas b/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas
index 34503b0f..d2b389dd 100644
--- a/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas
+++ b/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas
@@ -138,17 +138,14 @@ begin
CreateEditor('EditorDireccion', IEditorEditorDireccion, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Direccion := ADireccion;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Direccion := ADireccion;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
end.
diff --git a/Source/Modulos/Contactos/Controller/uEmpleadosController.pas b/Source/Modulos/Contactos/Controller/uEmpleadosController.pas
index af4235a7..88963433 100644
--- a/Source/Modulos/Contactos/Controller/uEmpleadosController.pas
+++ b/Source/Modulos/Contactos/Controller/uEmpleadosController.pas
@@ -269,16 +269,13 @@ begin
CreateEditor('EditorEmpleado', IEditorEmpleado, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Contacto := AContacto;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Contacto := AContacto;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Contactos/Controller/uGruposClienteController.pas b/Source/Modulos/Contactos/Controller/uGruposClienteController.pas
index 4a901736..4a268ca1 100644
--- a/Source/Modulos/Contactos/Controller/uGruposClienteController.pas
+++ b/Source/Modulos/Contactos/Controller/uGruposClienteController.pas
@@ -143,17 +143,14 @@ begin
CreateEditor('EditorGruposCliente', IEditorGruposCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- GruposCliente := AGruposCliente;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.GruposCliente := AGruposCliente;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TGruposClienteController.Eliminar(AGrupoCliente: IBizGrupoCliente): Boolean;
diff --git a/Source/Modulos/Contactos/Controller/uGruposEmpleadoController.pas b/Source/Modulos/Contactos/Controller/uGruposEmpleadoController.pas
index 2a71dff4..2ec08990 100644
--- a/Source/Modulos/Contactos/Controller/uGruposEmpleadoController.pas
+++ b/Source/Modulos/Contactos/Controller/uGruposEmpleadoController.pas
@@ -143,17 +143,14 @@ begin
CreateEditor('EditorGruposEmpleado', IEditorGruposEmpleado, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- GruposEmpleado := AGruposEmpleado;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.GruposEmpleado := AGruposEmpleado;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TGruposEmpleadoController.Eliminar(AGrupoEmpleado: IBizGrupoEmpleado): Boolean;
diff --git a/Source/Modulos/Contactos/Controller/uGruposProveedorController.pas b/Source/Modulos/Contactos/Controller/uGruposProveedorController.pas
index 6b891b5e..e7f95835 100644
--- a/Source/Modulos/Contactos/Controller/uGruposProveedorController.pas
+++ b/Source/Modulos/Contactos/Controller/uGruposProveedorController.pas
@@ -143,17 +143,14 @@ begin
CreateEditor('EditorGruposProveedor', IEditorGruposProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- GruposProveedor := AGruposProveedor;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.GruposProveedor := AGruposProveedor;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TGruposProveedorController.Eliminar(AGrupoProveedor: IBizGrupoProveedor): Boolean;
diff --git a/Source/Modulos/Contactos/Controller/uPersonalContactoController.pas b/Source/Modulos/Contactos/Controller/uPersonalContactoController.pas
index 2cf04697..fbcba8b1 100644
--- a/Source/Modulos/Contactos/Controller/uPersonalContactoController.pas
+++ b/Source/Modulos/Contactos/Controller/uPersonalContactoController.pas
@@ -72,15 +72,12 @@ begin
CreateEditor('EditorPersonalContacto', IEditorPersonalContacto, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Personal := APersonal;
- Controller := Self;
- ShowModal;
- finally
- Release;
- end;
+ try
+ AEditor.Personal := APersonal;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
end;
end;
diff --git a/Source/Modulos/Contactos/Controller/uProveedoresController.pas b/Source/Modulos/Contactos/Controller/uProveedoresController.pas
index f592b14a..bac56545 100644
--- a/Source/Modulos/Contactos/Controller/uProveedoresController.pas
+++ b/Source/Modulos/Contactos/Controller/uProveedoresController.pas
@@ -124,19 +124,16 @@ begin
CreateEditor('EditorElegirProveedores', IEditorElegirProveedores, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Contactos := AContactos;
- Controller := Self;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ContactosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Contactos := AContactos;
+ AEditor.Controller := Self;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ContactosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -149,18 +146,15 @@ begin
CreateEditor('EditorElegirDireccionEntrega', IEditorElegirDireccionEntrega, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Contacto := AProveedor;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := DireccionSeleccionada;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Contacto := AProveedor;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.DireccionSeleccionada;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TProveedoresController.Eliminar(AProveedor: IBizContacto; AllItems: Boolean): Boolean;
@@ -315,17 +309,14 @@ begin
CreateEditor('EditorProveedor', IEditorProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Contacto := AContacto;
- Controller := Self;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Contacto := AContacto;
+ AEditor.Controller := Self;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TProveedoresController.VerAlbaranesDeProveedor(
diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dproj b/Source/Modulos/Contactos/Views/Contactos_view.dproj
index 47c4f912..34b55b95 100644
--- a/Source/Modulos/Contactos/Views/Contactos_view.dproj
+++ b/Source/Modulos/Contactos/Views/Contactos_view.dproj
@@ -49,52 +49,52 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Fabricantes/Controller/uFabricantesController.pas b/Source/Modulos/Fabricantes/Controller/uFabricantesController.pas
index 984db5e3..56c9757e 100644
--- a/Source/Modulos/Fabricantes/Controller/uFabricantesController.pas
+++ b/Source/Modulos/Fabricantes/Controller/uFabricantesController.pas
@@ -155,17 +155,14 @@ begin
CreateEditor('EditorFabricantes', IEditorFabricantes, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Fabricantes := AFabricantes;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Fabricantes := AFabricantes;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TFabricantesController.Eliminar(AFabricante: IBizFabricante): Boolean;
diff --git a/Source/Modulos/Facturas de cliente/Controller/uArticulosFacturaClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uArticulosFacturaClienteController.pas
index 298f9f6d..924ed74f 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uArticulosFacturaClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uArticulosFacturaClienteController.pas
@@ -30,20 +30,17 @@ begin
CreateEditor('EditorElegirArticulosFacturaCliente', IEditorElegirArticulosFacturasCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Articulos := AArticulos;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Articulos := AArticulos;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
end.
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
index a6300d01..85483f37 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
@@ -615,28 +615,25 @@ begin
CreateEditor('EditorFacturaCliente', IEditorFacturaCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Factura := AFactura;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Factura := AFactura;
- //MODO CONSULTAR
- if not EsModificable(AFactura) then
- begin
- SetDataTableReadOnly(AFactura.DataTable, True);
- ReadOnly := True;
- end;
-
- ShowModal;
-
- //MODO CONSULTAR (Se deja la tabla como estaba)
- if ReadOnly then
- SetDataTableReadOnly(AFactura.DataTable, False);
- finally
- Release;
- AEditor := NIL;
+ //MODO CONSULTAR
+ if not EsModificable(AFactura) then
+ begin
+ SetDataTableReadOnly(AFactura.DataTable, True);
+ AEditor.ReadOnly := True;
end;
+
+ AEditor.ShowModal;
+
+ //MODO CONSULTAR (Se deja la tabla como estaba)
+ if AEditor.ReadOnly then
+ SetDataTableReadOnly(AFactura.DataTable, False);
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -650,27 +647,24 @@ begin
CreateEditor('EditorFacturasCliente', IEditorFacturasCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- if not EsCadenaVacia(AWindowCaption) then
- AEditor.WindowCaption := AWindowCaption;
+ try
+ if not EsCadenaVacia(AWindowCaption) then
+ AEditor.WindowCaption := AWindowCaption;
- if not EsCadenaVacia(AHeaderText) then
- AEditor.HeaderText := AHeaderText;
+ if not EsCadenaVacia(AHeaderText) then
+ AEditor.HeaderText := AHeaderText;
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Facturas := AFacturas;
- MultiSelect := True;
- if AVerModal then
- ShowModal
- else
- ShowEmbedded;
- finally
- if AVerModal then
- Release;
- AEditor := Nil;
- end;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Facturas := AFacturas;
+ AEditor.MultiSelect := True;
+ if AVerModal then
+ AEditor.ShowModal
+ else
+ AEditor.ShowEmbedded;
+ finally
+ if AVerModal then
+ AEditor.Release;
+ AEditor := Nil;
end;
end;
@@ -701,19 +695,16 @@ begin
CreateEditor('EditorElegirFacturasCliente', IEditorElegirFacturasCliente, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Facturas := AFacturas;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := FacturasClienteSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Facturas := AFacturas;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.FacturasClienteSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas
index e4cd2c77..300982b6 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas
@@ -119,17 +119,14 @@ begin
try
CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- ListaID := AListaID;
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.ListaID := AListaID;
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ end;
finally
FreeAndNil(AStream);
AEditor := Nil;
@@ -148,16 +145,13 @@ begin
try
CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- LoadFromStream(AStream);
- Print;
- finally
- Release;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.LoadFromStream(AStream);
+ AEditor.Print;
+ finally
+ AEditor.Release;
+ end;
finally
FreeAndNil(AStream);
AEditor := Nil;
diff --git a/Source/Modulos/Facturas de proveedor/Controller/uArticulosFacturaProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uArticulosFacturaProveedorController.pas
index f3249b84..39a82623 100644
--- a/Source/Modulos/Facturas de proveedor/Controller/uArticulosFacturaProveedorController.pas
+++ b/Source/Modulos/Facturas de proveedor/Controller/uArticulosFacturaProveedorController.pas
@@ -31,21 +31,18 @@ begin
CreateEditor('EditorElegirArticulosFacturaProveedor', IEditorElegirArticulosFacturasProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Articulos := AArticulos;
- Proveedor := AProveedor;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Articulos := AArticulos;
+ AEditor.Proveedor := AProveedor;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
end.
diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
index 186d19f8..d82c761e 100644
--- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
+++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
@@ -468,28 +468,25 @@ begin
CreateEditor('EditorFacturaProveedor', IEditorFacturaProveedor, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Factura := AFactura;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Factura := AFactura;
- //MODO CONSULTAR
- if not EsModificable(AFactura) then
- begin
- SetDataTableReadOnly(AFactura.DataTable, True);
- ReadOnly := True;
- end;
+ //MODO CONSULTAR
+ if not EsModificable(AFactura) then
+ begin
+ SetDataTableReadOnly(AFactura.DataTable, True);
+ AEditor.ReadOnly := True;
+ end;
- ShowModal;
+ AEditor.ShowModal;
- //MODO CONSULTAR (Se deja la tabla como estaba)
- if ReadOnly then
- SetDataTableReadOnly(AFactura.DataTable, False);
- finally
- Release;
- AEditor := NIL;
- end;
+ //MODO CONSULTAR (Se deja la tabla como estaba)
+ if AEditor.ReadOnly then
+ SetDataTableReadOnly(AFactura.DataTable, False);
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -502,27 +499,24 @@ begin
AEditor := NIL;
CreateEditor('EditorFacturasProveedor', IEditorFacturasProveedor, AEditor);
- with AEditor do
- begin
- try
- if not EsCadenaVacia(AWindowCaption) then
- AEditor.WindowCaption := AWindowCaption;
+ try
+ if not EsCadenaVacia(AWindowCaption) then
+ AEditor.WindowCaption := AWindowCaption;
- if not EsCadenaVacia(AHeaderText) then
- AEditor.HeaderText := AHeaderText;
+ if not EsCadenaVacia(AHeaderText) then
+ AEditor.HeaderText := AHeaderText;
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Facturas := AFacturas;
- MultiSelect := True;
- if AVerModal then
- ShowModal
- else
- ShowEmbedded;
- finally
- if AVerModal then
- Release;
- AEditor := Nil;
- end;
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Facturas := AFacturas;
+ AEditor.MultiSelect := True;
+ if AVerModal then
+ AEditor.ShowModal
+ else
+ AEditor.ShowEmbedded;
+ finally
+ if AVerModal then
+ AEditor.Release;
+ AEditor := Nil;
end;
end;
@@ -563,7 +557,7 @@ begin
if IsPositiveResult(ShowModal) then
Result := FacturasProveedoreSeleccionados;
finally
- Release;
+ AEditor.Release;
AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorReportController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorReportController.pas
index 832c56da..b3b54f3a 100644
--- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorReportController.pas
+++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorReportController.pas
@@ -64,15 +64,12 @@ begin
try
CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- end;
- end;
+ try
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ end;
finally
FreeAndNil(AStream);
AEditor := Nil;
@@ -92,15 +89,12 @@ begin
try
CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- LoadFromStream(AStream);
- Print;
- finally
- Release;
- end;
- end;
+ try
+ AEditor.LoadFromStream(AStream);
+ AEditor.Print;
+ finally
+ AEditor.Release;
+ end;
finally
FreeAndNil(AStream);
AEditor := Nil;
diff --git a/Source/Modulos/Familias/Controller/uFamiliasController.pas b/Source/Modulos/Familias/Controller/uFamiliasController.pas
index 87ded847..94bd92bd 100644
--- a/Source/Modulos/Familias/Controller/uFamiliasController.pas
+++ b/Source/Modulos/Familias/Controller/uFamiliasController.pas
@@ -148,17 +148,14 @@ begin
CreateEditor('EditorFamilias', IEditorFamilias, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Familias := AFamilias;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Familias := AFamilias;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TFamiliasController.Eliminar(AFamilia: IBizFamilia): Boolean;
diff --git a/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas b/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas
index be3e1dbd..ba79eaa5 100644
--- a/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas
+++ b/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas
@@ -181,16 +181,13 @@ begin
CreateEditor('EditorFormaPago', IEditorFormaPago, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- FormaPago := AFormaPago;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.FormaPago := AFormaPago;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TFormasPagoController.VerTodos(AFormasPago: IBizFormaPago);
@@ -201,16 +198,13 @@ begin
CreateEditor('EditorFormasPago', IEditorFormasPago, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- FormasPago := AFormasPago;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.FormasPago := AFormasPago;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TFormasPagoController.Eliminar(AFormaPago: IBizFormaPago): Boolean;
diff --git a/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas b/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas
index 85b9c009..c81fb000 100644
--- a/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas
+++ b/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas
@@ -283,19 +283,18 @@ begin
AEditor := NIL;
CreateEditor('EditorInformeIVAClientesReport', IEditorInformeIVAClientesReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de IVA de facturas de cliente';
- AStream := FDataModule.GenerarInformeIVAClientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de IVA de facturas de cliente';
+ AStream := FDataModule.GenerarInformeIVAClientes(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes,
+ AEditor.DesglosadoCliente, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -308,19 +307,19 @@ begin
CreateEditor('EditorInformeIVAProveedoresReport', IEditorInformeIVAProveedoresReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de IVA de facturas de proveedor';
- AStream := FDataModule.GenerarInformeIVAProveedores(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de IVA de facturas de proveedor';
+ AStream := FDataModule.GenerarInformeIVAProveedores(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin,
+ AEditor.ListaIDProveedores, AEditor.DesglosadoProveedor,
+ AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -333,19 +332,18 @@ begin
CreateEditor('EditorInformeFacturasClienteReport', IEditorInformeFacturasClienteReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de facturas de cliente';
- AStream := FDataModule.GenerarInformeListadoFacturasCli(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de facturas de cliente';
+ AStream := FDataModule.GenerarInformeListadoFacturasCli(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes,
+ AEditor.DesglosadoCliente, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -358,19 +356,18 @@ begin
CreateEditor('EditorInformeFacturasClientePendientesReport', IEditorInformeFacturasClientePendientesReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de facturas de cliente pendientes';
- AStream := FDataModule.GenerarInformeListadoFacturasCliPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de facturas de cliente pendientes';
+ AStream := FDataModule.GenerarInformeListadoFacturasCliPendientes(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes,
+ AEditor.DesglosadoCliente, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -382,19 +379,18 @@ begin
AEditor := NIL;
CreateEditor('EditorInformeFacturasProveedorReport', IEditorInformeFacturasProveedorReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de facturas de proveedor';
- AStream := FDataModule.GenerarInformeListadoFacturasProv(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de facturas de proveedor';
+ AStream := FDataModule.GenerarInformeListadoFacturasProv(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores,
+ AEditor.DesglosadoProveedor, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -406,19 +402,18 @@ begin
AEditor := NIL;
CreateEditor('EditorInformeFacturasProveedorPendientesReport', IEditorInformeFacturasProveedorPendientesReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de facturas de proveedor pendientes';
- AStream := FDataModule.GenerarInformeListadoFacturasProvPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de facturas de proveedor pendientes';
+ AStream := FDataModule.GenerarInformeListadoFacturasProvPendientes(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores,
+ AEditor.DesglosadoProveedor, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -431,19 +426,18 @@ begin
ShowHourglassCursor;
CreateEditor('EditorInformePedidosReport', IEditorInformePedidosReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de pedidos de proveedor';
- AStream := FDataModule.GenerarInformeListadoPedidos(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de pedidos de proveedor';
+ AStream := FDataModule.GenerarInformeListadoPedidos(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores,
+ AEditor.DesglosadoProveedor, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -456,19 +450,18 @@ begin
CreateEditor('EditorInformePresupuestosReport', IEditorInformePresupuestosReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AEditor.Title := 'Listado de presupuestos de cliente';
- AStream := FDataModule.GenerarInformeListadoPresupuestos(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Title := 'Listado de presupuestos de cliente';
+ AStream := FDataModule.GenerarInformeListadoPresupuestos(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes,
+ AEditor.DesglosadoCliente, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -480,18 +473,17 @@ begin
AEditor := NIL;
CreateEditor('EditorInformeRecibosClienteReport', IEditorInformeRecibosClienteReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AStream := FDataModule.GenerarInformeListadoRecibosCliente(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AStream := FDataModule.GenerarInformeListadoRecibosCliente(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes,
+ AEditor.DesglosadoCliente, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -504,18 +496,17 @@ begin
CreateEditor('EditorInformeRecibosCliPendientesReport', IEditorInformeRecibosCliPendientesReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AStream := FDataModule.GenerarInformeListadoRecibosCliPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AStream := FDataModule.GenerarInformeListadoRecibosCliPendientes(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes,
+ AEditor.DesglosadoCliente, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -529,18 +520,17 @@ begin
CreateEditor('EditorInformeRecibosProveedorReport', IEditorInformeRecibosProveedorReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AStream := FDataModule.GenerarInformeListadoRecibosProveedor(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AStream := FDataModule.GenerarInformeListadoRecibosProveedor(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores,
+ AEditor.DesglosadoProveedor, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -553,18 +543,17 @@ begin
CreateEditor('EditorInformeRecibosProvPendientesReport', IEditorInformeRecibosProvPendientesReport, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- AEditor.Controller := Self;
- AStream := FDataModule.GenerarInformeListadoRecibosProvPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
- LoadFromStream(AStream);
- Preview;
- finally
- Release;
- AEditor := Nil;
- FreeAndNil(AStream);
- end;
+ try
+ AEditor.Controller := Self;
+ AStream := FDataModule.GenerarInformeListadoRecibosProvPendientes(AppFactuGES.EmpresaActiva.ID,
+ AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores,
+ AEditor.DesglosadoProveedor, AEditor.ImporteMinimo);
+ AEditor.LoadFromStream(AStream);
+ AEditor.Preview;
+ finally
+ AEditor.Release;
+ AEditor := Nil;
+ FreeAndNil(AStream);
end;
end;
@@ -599,7 +588,7 @@ begin
if ReadOnly then
SetDataTableReadOnly(AFactura.DataTable, False);
finally
- Release;
+ AEditor.Release;
end;
end;
finally
diff --git a/Source/Modulos/Historico de movimientos/Controller/uHistoricoMovimientosController.pas b/Source/Modulos/Historico de movimientos/Controller/uHistoricoMovimientosController.pas
index d44abab5..8a3d4dcb 100644
Binary files a/Source/Modulos/Historico de movimientos/Controller/uHistoricoMovimientosController.pas and b/Source/Modulos/Historico de movimientos/Controller/uHistoricoMovimientosController.pas differ
diff --git a/Source/Modulos/Inventario/Controller/uArticulosInventarioController.pas b/Source/Modulos/Inventario/Controller/uArticulosInventarioController.pas
index a750614c..c54adbf2 100644
--- a/Source/Modulos/Inventario/Controller/uArticulosInventarioController.pas
+++ b/Source/Modulos/Inventario/Controller/uArticulosInventarioController.pas
@@ -29,19 +29,16 @@ begin
Result := NIL;
CreateEditor('EditorElegirArticulosCatalogo', IEditorElegirArticulosCatalogo, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Articulos := AArticulos;
- MultiSelect := AMultiSelect;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Articulos := AArticulos;
+ AEditor.MultiSelect := AMultiSelect;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
end.
diff --git a/Source/Modulos/Inventario/Controller/uInventarioController.pas b/Source/Modulos/Inventario/Controller/uInventarioController.pas
index 9c8473f9..fe2b9331 100644
--- a/Source/Modulos/Inventario/Controller/uInventarioController.pas
+++ b/Source/Modulos/Inventario/Controller/uInventarioController.pas
@@ -195,8 +195,6 @@ begin
end;
function TInventarioController.Buscar(const ID_ALMACEN: Integer): IBizInventario;
-var
- Condicion: TDAWhereExpression;
begin
Result := (FDataModule as IDataModuleInventario).GetItems(ID_ALMACEN);
FiltrarEmpresa(Result);
@@ -409,20 +407,17 @@ begin
CreateEditor('EditorElegirArticulosAlmacen', IEditorElegirArticulosAlmacen, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self;
- Inventario := AArticulos;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ArticulosSeleccionados;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self;
+ AEditor.Inventario := AArticulos;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ArticulosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TInventarioController.Eliminar(AInventario: IBizInventario; Todos: Boolean; ApplyUpdates: Boolean): Boolean;
@@ -534,21 +529,18 @@ begin
CreateEditor('EditorEntradaSalidaArticulos', IEditorEntradaSalidaArticulos, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Articulos := AArticulos;
- Inventario := AInventario;
- if Assigned(APedido) then
- PedidoProveedor := APedido;
- ShowModal;
- Result := ResultadoModalOK;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Articulos := AArticulos;
+ AEditor.Inventario := AInventario;
+ if Assigned(APedido) then
+ AEditor.PedidoProveedor := APedido;
+ AEditor.ShowModal;
+ Result := AEditor.ResultadoModalOK;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TInventarioController.VerReservas(AArticulo: IBizInventario; const ATipoReservas: String);
@@ -559,19 +551,16 @@ begin
CreateEditor('EditorDetalleReservas', IEditorDetalleReservas, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- TipoReservas := ATipoReservas;
- DetalleReservas := FDataModule.GetDetalleReservas;
- Articulo := AArticulo;
- MultiSelect := True;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.TipoReservas := ATipoReservas;
+ AEditor.DetalleReservas := FDataModule.GetDetalleReservas;
+ AEditor.Articulo := AArticulo;
+ AEditor.MultiSelect := True;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Obras/Controller/Obras_controller.dproj b/Source/Modulos/Obras/Controller/Obras_controller.dproj
index 0ccaa1a1..62263c23 100644
--- a/Source/Modulos/Obras/Controller/Obras_controller.dproj
+++ b/Source/Modulos/Obras/Controller/Obras_controller.dproj
@@ -47,12 +47,12 @@
MainSource
+
+
+
+
+
-
-
-
-
-
diff --git a/Source/Modulos/Obras/Controller/View/uIEditorFechaCierreObra.pas b/Source/Modulos/Obras/Controller/View/uIEditorFechaCierreObra.pas
index f208d175..98054ba4 100644
--- a/Source/Modulos/Obras/Controller/View/uIEditorFechaCierreObra.pas
+++ b/Source/Modulos/Obras/Controller/View/uIEditorFechaCierreObra.pas
@@ -7,6 +7,7 @@ type
['{2124B621-143A-4955-90EF-EC2053840A47}']
function ShowModal : Integer;
procedure Show;
+ procedure Release;
procedure SetFechaCierre (const Value : TDateTime);
function GetFechaCierre : TDateTime;
diff --git a/Source/Modulos/Obras/Controller/uObrasController.pas b/Source/Modulos/Obras/Controller/uObrasController.pas
index a959d20c..3f0d2a4c 100644
--- a/Source/Modulos/Obras/Controller/uObrasController.pas
+++ b/Source/Modulos/Obras/Controller/uObrasController.pas
@@ -192,20 +192,17 @@ begin
CreateEditor('EditorFechaCierreObra', IEditorFechaCierreObra, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorFechaCierreObra) do
- begin
- try
- FechaCierre := DateOf(AFecha);
- if (ShowModal = mrOk) then
- begin
- AObra.Ejecuciones.Edit;
- AObra.Ejecuciones.FECHA_FIN := DateOf(FechaCierre);
- AObra.Ejecuciones.Post;
- end;
- finally
- Release;
- AEditor := NIL;
+ try
+ AEditor.FechaCierre := DateOf(AFecha);
+ if (AEditor.ShowModal = mrOk) then
+ begin
+ AObra.Ejecuciones.Edit;
+ AObra.Ejecuciones.FECHA_FIN := DateOf(AEditor.FechaCierre);
+ AObra.Ejecuciones.Post;
end;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -342,24 +339,21 @@ end;
procedure TObrasController.Ver(AObra: IBizObra);
var
- AEditor : IEditorDBItem;
+ AEditor : IEditorObra;
begin
AEditor := NIL;
RecuperarObjetos(AObra);
CreateEditor('EditorObra', IEditorObra, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorObra) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Obra := AObra;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Obra := AObra;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
procedure TObrasController.VerEjecucion(AObra: IBizObra);
@@ -371,17 +365,14 @@ begin
RecuperarObjetos(AObra);
CreateEditor('EditorEjecucionObra', IEditorEjecucionObra, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorEjecucionObra) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- Obra := AObra;
- ShowModal;
- finally
- Release;
- AEditor := NIL;
- end;
- end;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.Obra := AObra;
+ AEditor.ShowModal;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ end;
end;
function TObrasController.VerLista(AObras: IBizObra): IBizObra;
@@ -393,16 +384,13 @@ begin
CreateEditor('EditorListaObras', IEditorListaObras, AEditor);
if Assigned(AEditor) then
- with AEditor do
- begin
- try
- Obras := AObras;
- if IsPositiveResult(ShowModal) then
- Result := ObraSeleccionado;
- finally
- Release;
- AEditor := NIL;
- end;
+ try
+ AEditor.Obras := AObras;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ObraSeleccionado;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
diff --git a/Source/Modulos/Obras/Plugin/Obras_plugin.dproj b/Source/Modulos/Obras/Plugin/Obras_plugin.dproj
index 7fa7790b..828fc3d9 100644
--- a/Source/Modulos/Obras/Plugin/Obras_plugin.dproj
+++ b/Source/Modulos/Obras/Plugin/Obras_plugin.dproj
@@ -46,13 +46,12 @@
MainSource
-
-
-
+
+
+
-