Controladores -> repaso a las llamadas de 'Release'

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@330 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2008-11-13 20:19:16 +00:00
parent 2324e47e86
commit 852e9b3a39
65 changed files with 1080 additions and 1228 deletions

View File

@ -227,16 +227,13 @@ begin
CreateEditor('EditorEjercicio', IEditorEjercicio, AEditor); CreateEditor('EditorEjercicio', IEditorEjercicio, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorEjercicio) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Ejercicio := AEjercicio;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Ejercicio := AEjercicio; finally
ShowModal; AEditor.Release;
finally AEditor := NIL
Release;
AEditor := NIL
end;
end; end;
end; end;

View File

@ -34,16 +34,13 @@ begin
CreateEditor('EditorDatosBancariosEmpresa', IEditorDatosBancariosEmpresa, AEditor); CreateEditor('EditorDatosBancariosEmpresa', IEditorDatosBancariosEmpresa, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.DatosBancarios := ADatosBancarios;
try AEditor.Controller := Self;
DatosBancarios := ADatosBancarios; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -265,16 +265,13 @@ begin
CreateEditor('EditorEmpresa', IEditorEmpresa, AEditor); CreateEditor('EditorEmpresa', IEditorEmpresa, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Empresa := AEmpresa;
try AEditor.Controller := Self;
Empresa := AEmpresa; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -82,16 +82,13 @@ begin
CreateEditor('EditorTiendaEmpresa', IEditorTiendaEmpresa, AEditor); CreateEditor('EditorTiendaEmpresa', IEditorTiendaEmpresa, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Tienda := ATienda;
try AEditor.Controller := Self;
Tienda := ATienda; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -302,7 +302,7 @@ end;
function TUsuariosController.CambiarPassword(const AIDUser: Integer) : Boolean; function TUsuariosController.CambiarPassword(const AIDUser: Integer) : Boolean;
var var
AUser : IBizUsuario; AUser : IBizUsuario;
AEditorCambiar : TfEditorCambiarPassword; AEditor : TfEditorCambiarPassword;
begin begin
Result := False; Result := False;
@ -311,26 +311,26 @@ begin
begin begin
AUser.Active := True; AUser.Active := True;
AEditorCambiar := TfEditorCambiarPassword.Create(NIL); AEditor := TfEditorCambiarPassword.Create(NIL);
with AEditorCambiar do if Assigned(AEditor) then
try try
Controller := Self; AEditor.Controller := Self;
Usuario := AUser; AEditor.Usuario := AUser;
CambioObligatorio := False; AEditor.CambioObligatorio := False;
if (Length(Trim(AUser.PASS)) = 0) then if (Length(Trim(AUser.PASS)) = 0) then
EditAtu.Enabled := False; AEditor.EditAtu.Enabled := False;
if (ShowModal = mrOk) then if (AEditor.ShowModal = mrOk) then
Result := CambiarPassword(AIDUser, EditNova.Text) Result := CambiarPassword(AIDUser, AEditor.EditNova.Text)
else else
Result := False; Result := False;
finally finally
Release; AEditor.Release;
AUser.Active := False; AUser.Active := False;
AUser := NIL; AUser := NIL;
end; end;
end; end;
end; end;
@ -784,16 +784,13 @@ begin
CreateEditor('EditorPerfilUsuario', IEditorPerfilUsuario, AEditor); CreateEditor('EditorPerfilUsuario', IEditorPerfilUsuario, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorPerfilUsuario) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.PerfilUsuario := APerfil;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
PerfilUsuario := APerfil; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;
@ -837,17 +834,14 @@ begin
CreateEditor('EditorUsuario', IEditorUsuario, AEditor); CreateEditor('EditorUsuario', IEditorUsuario, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorUsuario) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Usuario := AUser;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Usuario := AUser; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TUsuariosController.VerUsuarios; procedure TUsuariosController.VerUsuarios;
@ -884,15 +878,12 @@ begin
CreateEditor('EditorLogin', IEditorLogin, AEditor); CreateEditor('EditorLogin', IEditorLogin, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try Result := (AEditor.ShowModal = mrOk);
Controller := Self; finally
Result := (AEditor.ShowModal = mrOk); AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -544,7 +544,7 @@ end;
procedure TAlbaranesClienteController.Ver(AAlbaran: IBizAlbaranCliente); procedure TAlbaranesClienteController.Ver(AAlbaran: IBizAlbaranCliente);
var var
AEditor : IEditorDBItem; AEditor : IEditorAlbaranCliente;
begin begin
AEditor := NIL; AEditor := NIL;
@ -556,27 +556,25 @@ begin
CreateEditor('EditorAlbaranDevCliente', IEditorAlbaranDevCliente, AEditor); CreateEditor('EditorAlbaranDevCliente', IEditorAlbaranDevCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorAlbaranCliente) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Albaran := AAlbaran;
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Albaran := AAlbaran;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(AAlbaran) then if not EsModificable(AAlbaran) then
begin begin
SetDataTableReadOnly(AAlbaran.DataTable, True); SetDataTableReadOnly(AAlbaran.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end;
ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then
SetDataTableReadOnly(AAlbaran.DataTable, False);
finally
AEditor.Release;
end; 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;
end; end;
@ -590,14 +588,13 @@ begin
//RecuperarObjetos(AAlbaran); <- No descomentar. No hace falta //RecuperarObjetos(AAlbaran); <- No descomentar. No hace falta
CreateEditor('EditorDireccionEntregaAlbaranCliente', IEditorDireccionEntregaAlbaranCliente, AEditor); CreateEditor('EditorDireccionEntregaAlbaranCliente', IEditorDireccionEntregaAlbaranCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorDireccionEntregaAlbaranCliente) do try
try AEditor.Albaran := AAlbaran;
Albaran := AAlbaran; AEditor.ShowModal;
ShowModal; finally
finally AEditor.Release;
Release; AEditor := NIL;
AEditor := NIL; end;
end;
end; end;
procedure TAlbaranesClienteController.VerTodosAlbaranes(AAlbarans: IBizAlbaranCliente); procedure TAlbaranesClienteController.VerTodosAlbaranes(AAlbarans: IBizAlbaranCliente);
@ -660,19 +657,16 @@ begin
CreateEditor('EditorElegirAlbaranesCliente', IEditorElegirAlbaranesCliente, AEditor); CreateEditor('EditorElegirAlbaranesCliente', IEditorElegirAlbaranesCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Albaranes := AAlbaran;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Albaranes := AAlbaran; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.AlbaranesClienteSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := AlbaranesClienteSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -73,16 +73,13 @@ begin
try try
CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -101,16 +98,13 @@ begin
try try
CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := Nil; AEditor := Nil;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -30,20 +30,17 @@ begin
CreateEditor('EditorElegirArticulosAlbaranesCliente', IEditorElegirArticulosAlbaranesCliente, AEditor); CreateEditor('EditorElegirArticulosAlbaranesCliente', IEditorElegirArticulosAlbaranesCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Articulos := AArticulos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -613,7 +613,7 @@ end;
procedure TAlbaranesProveedorController.Ver(AAlbaran: IBizAlbaranProveedor); procedure TAlbaranesProveedorController.Ver(AAlbaran: IBizAlbaranProveedor);
var var
AEditor : IEditorDBItem; AEditor : IEditorAlbaranProveedor;
begin begin
AEditor := NIL; AEditor := NIL;
@ -625,28 +625,26 @@ begin
CreateEditor('EditorAlbaranDevProveedor', IEditorAlbaranDevProveedor, AEditor); CreateEditor('EditorAlbaranDevProveedor', IEditorAlbaranDevProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorAlbaranProveedor) do
begin
try try
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
Albaran := AAlbaran; AEditor.Albaran := AAlbaran;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(AAlbaran) then if not EsModificable(AAlbaran) then
begin begin
SetDataTableReadOnly(AAlbaran.DataTable, True); SetDataTableReadOnly(AAlbaran.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end; end;
ShowModal; AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba) //MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then if AEditor.ReadOnly then
SetDataTableReadOnly(AAlbaran.DataTable, False); SetDataTableReadOnly(AAlbaran.DataTable, False);
finally finally
AEditor.Release; AEditor.Release;
AEditor := NIL;
end; end;
end;
end; end;
procedure TAlbaranesProveedorController.VerDireccionEntrega(AAlbaran: IBizAlbaranProveedor); procedure TAlbaranesProveedorController.VerDireccionEntrega(AAlbaran: IBizAlbaranProveedor);
@ -658,16 +656,13 @@ begin
//RecuperarObjetos(AAlbaran); <- No descomentar. No hace falta //RecuperarObjetos(AAlbaran); <- No descomentar. No hace falta
CreateEditor('EditorDireccionEntregaAlbaranProveedor', IEditorDireccionEntregaAlbaranProveedor, AEditor); CreateEditor('EditorDireccionEntregaAlbaranProveedor', IEditorDireccionEntregaAlbaranProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorDireccionEntregaAlbaranProveedor) do try
begin AEditor.Albaran := AAlbaran;
try AEditor.ShowModal;
Albaran := AAlbaran; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TAlbaranesProveedorController.VerTodosAlbaranes(AAlbarans: IBizAlbaranProveedor); procedure TAlbaranesProveedorController.VerTodosAlbaranes(AAlbarans: IBizAlbaranProveedor);
@ -730,19 +725,16 @@ begin
CreateEditor('EditorElegirAlbaranesProveedor', IEditorElegirAlbaranesProveedor, AEditor); CreateEditor('EditorElegirAlbaranesProveedor', IEditorElegirAlbaranesProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Albaranes := AAlbaran;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Albaranes := AAlbaran; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.AlbaranesProveedorSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := AlbaranesProveedorSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -65,16 +65,13 @@ begin
try try
CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor); CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -92,16 +89,13 @@ begin
try try
CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor); CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := Nil; AEditor := Nil;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -30,20 +30,17 @@ begin
CreateEditor('EditorElegirArticulosAlbaranesProveedor', IEditorElegirArticulosAlbaranesProveedor, AEditor); CreateEditor('EditorElegirArticulosAlbaranesProveedor', IEditorElegirArticulosAlbaranesProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.Proveedor := AProveedor;
Articulos := AArticulos; AEditor.MultiSelect := AMultiSelect;
Proveedor := AProveedor; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -205,24 +205,21 @@ end;
procedure TAlmacenesController.Ver(AAlmacen: IBizAlmacen); procedure TAlmacenesController.Ver(AAlmacen: IBizAlmacen);
var var
AEditor : IEditorDBItem; AEditor : IEditorAlmacen;
begin begin
AEditor := NIL; AEditor := NIL;
RecuperarObjetos(AAlmacen); RecuperarObjetos(AAlmacen);
CreateEditor('EditorAlmacen', IEditorAlmacen, AEditor); CreateEditor('EditorAlmacen', IEditorAlmacen, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorAlmacen) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Almacen := AAlmacen;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Almacen := AAlmacen; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TAlmacenesController.VerLista(AAlmacenes: IBizAlmacen): IBizAlmacen; function TAlmacenesController.VerLista(AAlmacenes: IBizAlmacen): IBizAlmacen;
@ -234,16 +231,13 @@ begin
CreateEditor('EditorListaAlmacenes', IEditorListaAlmacenes, AEditor); CreateEditor('EditorListaAlmacenes', IEditorListaAlmacenes, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Almacenes := AAlmacenes;
try if IsPositiveResult(AEditor.ShowModal) then
Almacenes := AAlmacenes; Result := AEditor.AlmacenSeleccionado;
if IsPositiveResult(ShowModal) then finally
Result := AlmacenSeleccionado; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -400,17 +400,14 @@ begin
CreateEditor('EditorArticulo', IEditorArticulo, AEditor); CreateEditor('EditorArticulo', IEditorArticulo, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorArticulo) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Articulo := AArticulo;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Articulo := AArticulo; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TArticulosController.VerProveedor(AArticulo: IBizArticulo); procedure TArticulosController.VerProveedor(AArticulo: IBizArticulo);
@ -473,19 +470,16 @@ begin
CreateEditor('EditorElegirArticulos', IEditorElegirArticulos, AEditor); CreateEditor('EditorElegirArticulos', IEditorElegirArticulos, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Articulos := AArticulos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -185,26 +185,23 @@ begin
CreateEditor('EditorExportacionNorma19', IEditorExportacionNorma19, AEditor); CreateEditor('EditorExportacionNorma19', IEditorExportacionNorma19, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.CodigoEntidad := Entidad;
try AEditor.CodigoAgencia := Oficina;
CodigoEntidad := Entidad; AEditor.FechaCargo := AFechaCargo;
CodigoAgencia := Oficina; AEditor.Fichero := AFileName;
FechaCargo := AFechaCargo;
Fichero := AFileName;
if (ShowModal = mrOk) then if (AEditor.ShowModal = mrOk) then
begin begin
Entidad := CodigoEntidad; Entidad := AEditor.CodigoEntidad;
Oficina := CodigoAgencia; Oficina := AEditor.CodigoAgencia;
AFechaCargo := FechaCargo; AFechaCargo := AEditor.FechaCargo;
AFileName := Fichero; AFileName := AEditor.Fichero;
Result := True; Result := True;
end; end;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end;
end; end;
end; end;

View File

@ -312,17 +312,14 @@ begin
CreateEditor('EditorComision', IEditorComision, AEditor); CreateEditor('EditorComision', IEditorComision, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorComision) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Comision := AComision;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Comision := AComision; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TComisionesController.VerTodos(AComision: IBizComisiones); procedure TComisionesController.VerTodos(AComision: IBizComisiones);

View File

@ -65,16 +65,13 @@ begin
try try
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor); CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Preview;
LoadFromStream(AStream); finally
Preview; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -93,16 +90,13 @@ begin
try try
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor); CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Print;
LoadFromStream(AStream); finally
Print; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -278,17 +278,14 @@ begin
CreateEditor('EditorApunte', IEditorApunte, AEditor); CreateEditor('EditorApunte', IEditorApunte, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin // AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Apunte := AApunte;
// Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Apunte := AApunte; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
{ {
@ -300,12 +297,11 @@ begin
CreateEditor('EditorApuntes', IEditorApuntes, AEditor); CreateEditor('EditorApuntes', IEditorApuntes, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do begin
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.Apuntes := AApuntes;
Apuntes := AApuntes; AEditor.ShowEmbedded;
ShowEmbedded; end;
end;
end; end;
} }

View File

@ -241,17 +241,14 @@ begin
CreateEditor('EditorAsiento', IEditorAsiento, AEditor); CreateEditor('EditorAsiento', IEditorAsiento, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Asiento := AAsiento;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Asiento := AAsiento; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TAsientosController.VerDiario(ADiario: IBizDiario); procedure TAsientosController.VerDiario(ADiario: IBizDiario);

View File

@ -181,15 +181,13 @@ begin
CreateEditor('EditorBalance', IEditorBalance, AEditor); CreateEditor('EditorBalance', IEditorBalance, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Balance := ABalance;
try AEditor.ShowModal;
Balance := ABalance; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
end;
end;
end; end;
procedure TBalancesController.VerTodos(ABalances: IBizBalance); procedure TBalancesController.VerTodos(ABalances: IBizBalance);
@ -200,17 +198,14 @@ begin
CreateEditor('EditorBalances', IEditorBalances, AEditor); CreateEditor('EditorBalances', IEditorBalances, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Balances := ABalances;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Balances := ABalances; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TBalancesController.ElegirBalance(ABalances: IBizBalance; AMensaje: String; AMultiSelect: Boolean): IBizBalance; function TBalancesController.ElegirBalance(ABalances: IBizBalance; AMensaje: String; AMultiSelect: Boolean): IBizBalance;
@ -221,18 +216,15 @@ begin
CreateEditor('EditorElegirBalances', IEditorElegirBalances, AEditor); CreateEditor('EditorElegirBalances', IEditorElegirBalances, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Balances := ABalances;
try AEditor.Controller := Self;
Balances := ABalances; AEditor.Mensaje := AMensaje;
Controller := Self; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.BalancesSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := BalancesSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -197,17 +197,14 @@ begin
CreateEditor('EditorCuenta', IEditorCuenta, AEditor); CreateEditor('EditorCuenta', IEditorCuenta, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Cuenta := ACuenta;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Cuenta := ACuenta; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TCuentasController.VerTodos(ACuentas: IBizCuenta); procedure TCuentasController.VerTodos(ACuentas: IBizCuenta);
@ -262,19 +259,17 @@ begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirCuentas', IEditorElegirCuentas, AEditor); CreateEditor('EditorElegirCuentas', IEditorElegirCuentas, AEditor);
with AEditor do if Assigned(AEditor) then
begin
try try
Cuentas := ACuentas; AEditor.Cuentas := ACuentas;
Controller := Self; AEditor.Controller := Self;
Mensaje := AMensaje; AEditor.Mensaje := AMensaje;
if IsPositiveResult(ShowModal) then if IsPositiveResult(AEditor.ShowModal) then
Result := CuentasSeleccionados; Result := AEditor.CuentasSeleccionados;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
end; end;
procedure TCuentasController.ElegirCuentaEspecial(ACuenta: IBizCuenta); procedure TCuentasController.ElegirCuentaEspecial(ACuenta: IBizCuenta);

View File

@ -181,16 +181,13 @@ begin
CreateEditor('EditorCuentaEspecial', IEditorCuentaEspecial, AEditor); CreateEditor('EditorCuentaEspecial', IEditorCuentaEspecial, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.CuentaEspecial := ACuentaEspecial;
try AEditor.ShowModal;
CuentaEspecial := ACuentaEspecial; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TCuentasEspecialesController.VerTodos(ACuentasEspeciales: IBizCuentaEspecial); procedure TCuentasEspecialesController.VerTodos(ACuentasEspeciales: IBizCuentaEspecial);
@ -201,17 +198,14 @@ begin
CreateEditor('EditorCuentasEspeciales', IEditorCuentasEspeciales, AEditor); CreateEditor('EditorCuentasEspeciales', IEditorCuentasEspeciales, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.CuentasEspeciales := ACuentasEspeciales;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
CuentasEspeciales := ACuentasEspeciales; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TCuentasEspecialesController.ElegirCuentaEspecial(ACuentasEspeciales: IBizCuentaEspecial; AMensaje: String; function TCuentasEspecialesController.ElegirCuentaEspecial(ACuentasEspeciales: IBizCuentaEspecial; AMensaje: String;
@ -223,18 +217,15 @@ begin
CreateEditor('EditorElegirCuentasEspeciales', IEditorElegirCuentasEspeciales, AEditor); CreateEditor('EditorElegirCuentasEspeciales', IEditorElegirCuentasEspeciales, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.CuentasEspeciales := ACuentasEspeciales;
try AEditor.Controller := Self;
CuentasEspeciales := ACuentasEspeciales; AEditor.Mensaje := AMensaje;
Controller := Self; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.CuentasEspecialesSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := CuentasEspecialesSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -205,17 +205,14 @@ begin
CreateEditor('EditorEpigrafe', IEditorEpigrafe, AEditor); CreateEditor('EditorEpigrafe', IEditorEpigrafe, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Epigrafe := AEpigrafe;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Epigrafe := AEpigrafe; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TEpigrafesController.VerTodos(AEpigrafes: IBizEpigrafe); procedure TEpigrafesController.VerTodos(AEpigrafes: IBizEpigrafe);
@ -242,18 +239,15 @@ begin
CreateEditor('EditorElegirEpigrafes', IEditorElegirEpigrafes, AEditor); CreateEditor('EditorElegirEpigrafes', IEditorElegirEpigrafes, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Epigrafes := AEpigrafes;
try AEditor.Controller := Self;
Epigrafes := AEpigrafes; AEditor.Mensaje := AMensaje;
Controller := Self; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.EpigrafesSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := EpigrafesSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -411,17 +411,14 @@ begin
CreateEditor('EditorSubCuenta', IEditorSubCuenta, AEditor); CreateEditor('EditorSubCuenta', IEditorSubCuenta, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.SubCuenta := ASubCuenta;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
SubCuenta := ASubCuenta; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TSubCuentasController.VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto); procedure TSubCuentasController.VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
@ -506,18 +503,15 @@ begin
CreateEditor('EditorElegirSubCuentas', IEditorElegirSubCuentas, AEditor); CreateEditor('EditorElegirSubCuentas', IEditorElegirSubCuentas, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.SubCuentas := ASubCuentas;
try AEditor.Controller := Self;
SubCuentas := ASubCuentas; AEditor.Mensaje := AMensaje;
Controller := Self; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.SubCuentasSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := SubCuentasSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -107,19 +107,16 @@ begin
CreateEditor('EditorElegirClientes', IEditorElegirClientes, AEditor); CreateEditor('EditorElegirClientes', IEditorElegirClientes, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Contactos := AContactos;
try AEditor.Controller := Self;
Contactos := AContactos; AEditor.MultiSelect := AMultiSelect;
Controller := Self; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ContactosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ContactosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;
@ -389,17 +386,14 @@ begin
CreateEditor('EditorCliente', IEditorCliente, AEditor); CreateEditor('EditorCliente', IEditorCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Contacto := AContacto;
try AEditor.Controller := Self;
Contacto := AContacto; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TClientesController.VerTodos(AContactos: IBizContacto); procedure TClientesController.VerTodos(AContactos: IBizContacto);

View File

@ -105,17 +105,14 @@ begin
CreateEditor('EditorDireccion', IEditorEditorDireccion, AEditor); CreateEditor('EditorDireccion', IEditorEditorDireccion, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Direccion := ADireccion;
try AEditor.Controller := Self;
Direccion := ADireccion; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -63,15 +63,12 @@ begin
try try
CreateEditor('EditorEtiquetasContactosPreview', IEditorEtiquetasContactosPreview, AEditor); CreateEditor('EditorEtiquetasContactosPreview', IEditorEtiquetasContactosPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Preview;
LoadFromStream(AStream); finally
Preview; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -90,16 +87,13 @@ begin
try try
CreateEditor('EditorEtiquetasContactosPreview', IEditorEtiquetasContactosPreview, AEditor); CreateEditor('EditorEtiquetasContactosPreview', IEditorEtiquetasContactosPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := Nil; AEditor := Nil;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -145,17 +145,14 @@ begin
CreateEditor('EditorGruposCliente', IEditorGruposCliente, AEditor); CreateEditor('EditorGruposCliente', IEditorGruposCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.GruposCliente := AGruposCliente;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
GruposCliente := AGruposCliente; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TGruposClienteController.Eliminar(AGrupoCliente: IBizGrupoCliente): Boolean; function TGruposClienteController.Eliminar(AGrupoCliente: IBizGrupoCliente): Boolean;

View File

@ -145,17 +145,14 @@ begin
CreateEditor('EditorGruposProveedor', IEditorGruposProveedor, AEditor); CreateEditor('EditorGruposProveedor', IEditorGruposProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.GruposProveedor := AGruposProveedor;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
GruposProveedor := AGruposProveedor; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TGruposProveedorController.Eliminar(AGrupoProveedor: IBizGrupoProveedor): Boolean; function TGruposProveedorController.Eliminar(AGrupoProveedor: IBizGrupoProveedor): Boolean;

View File

@ -145,17 +145,14 @@ begin
CreateEditor('EditorProcedenciasCliente', IEditorProcedenciasCliente, AEditor); CreateEditor('EditorProcedenciasCliente', IEditorProcedenciasCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.ProcedenciasCliente := AProcedenciasCliente;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
ProcedenciasCliente := AProcedenciasCliente; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TProcedenciasClienteController.Eliminar(AProcedenciaCliente: IBizProcedenciaCliente): Boolean; function TProcedenciasClienteController.Eliminar(AProcedenciaCliente: IBizProcedenciaCliente): Boolean;

View File

@ -93,19 +93,16 @@ begin
CreateEditor('EditorElegirProveedores', IEditorElegirProveedores, AEditor); CreateEditor('EditorElegirProveedores', IEditorElegirProveedores, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Contactos := AContactos;
try AEditor.Controller := Self;
Contactos := AContactos; AEditor.MultiSelect := AMultiSelect;
Controller := Self; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ContactosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ContactosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;
@ -328,17 +325,14 @@ begin
CreateEditor('EditorProveedor', IEditorProveedor, AEditor); CreateEditor('EditorProveedor', IEditorProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Contacto := AContacto;
try AEditor.Controller := Self;
Contacto := AContacto; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TProveedoresController.VerTodos(AContactos: IBizContacto); procedure TProveedoresController.VerTodos(AContactos: IBizContacto);

View File

@ -140,19 +140,16 @@ begin
CreateEditor('EditorElegirVendedores', IEditorElegirVendedores, AEditor); CreateEditor('EditorElegirVendedores', IEditorElegirVendedores, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Contactos := AContactos;
try AEditor.Controller := Self;
Contactos := AContactos; AEditor.MultiSelect := AMultiSelect;
Controller := Self; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ContactosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ContactosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;
@ -239,17 +236,14 @@ begin
CreateEditor('EditorVendedor', IEditorVendedor, AEditor); CreateEditor('EditorVendedor', IEditorVendedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Contacto := AContacto;
try AEditor.Controller := Self;
Contacto := AContacto; AEditor.ShowModal;
Controller := Self; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TVendedoresController.VerTodos(AContactos: IBizContacto); procedure TVendedoresController.VerTodos(AContactos: IBizContacto);

View File

@ -30,20 +30,17 @@ begin
CreateEditor('EditorElegirArticulosFacturaCliente', IEditorElegirArticulosFacturasCliente, AEditor); CreateEditor('EditorElegirArticulosFacturaCliente', IEditorElegirArticulosFacturasCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Articulos := AArticulos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -687,27 +687,25 @@ begin
CreateEditor('EditorFacturaCliente', IEditorFacturaCliente, AEditor); CreateEditor('EditorFacturaCliente', IEditorFacturaCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Factura := AFactura;
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Factura := AFactura;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(AFactura) then if not EsModificable(AFactura) then
begin begin
SetDataTableReadOnly(AFactura.DataTable, True); SetDataTableReadOnly(AFactura.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end; end;
ShowModal; AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba) //MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then if AEditor.ReadOnly then
SetDataTableReadOnly(AFactura.DataTable, False); SetDataTableReadOnly(AFactura.DataTable, False);
finally finally
Release; AEditor.Release;
end; AEditor := NIL;
end; end;
end; end;
@ -755,20 +753,16 @@ begin
CreateEditor('EditorElegirFacturasCliente', IEditorElegirFacturasCliente, AEditor); CreateEditor('EditorElegirFacturasCliente', IEditorElegirFacturasCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Facturas := AFacturas;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Facturas := AFacturas; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.FacturasClienteSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := FacturasClienteSeleccionados; AEditor.Release;
AEditor := NIL;
finally
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -65,16 +65,13 @@ begin
try try
CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
AEditor := Nil; AEditor := Nil;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -92,16 +89,13 @@ begin
try try
CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := Nil; AEditor := Nil;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -3,19 +3,19 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Top = 208 Top = 208
Caption = 'Nueva factura de cliente' Caption = 'Nueva factura de cliente'
ClientHeight = 662 ClientHeight = 662
ClientWidth = 771 ClientWidth = 860
Position = poScreenCenter Position = poScreenCenter
OnClose = CustomEditorClose OnClose = CustomEditorClose
ExplicitWidth = 779 ExplicitWidth = 868
ExplicitHeight = 696 ExplicitHeight = 696
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 771 Width = 860
Caption = 'Nueva factura de cliente' Caption = 'Nueva factura de cliente'
ExplicitWidth = 771 ExplicitWidth = 860
inherited Image1: TImage inherited Image1: TImage
Left = 744 Left = 833
Picture.Data = { Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2 0000180806000000E0773DF80000000970485973000017120000171201679FD2
@ -39,8 +39,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Width = 771 Width = 860
ExplicitWidth = 771 ExplicitWidth = 860
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 488 ExplicitWidth = 488
inherited TBXItem2: TTBXItem inherited TBXItem2: TTBXItem
@ -54,7 +54,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
end end
inherited tbxMenu: TTBXToolbar inherited tbxMenu: TTBXToolbar
ExplicitWidth = 771 ExplicitWidth = 860
inherited TBXSubmenuItem4: TTBXSubmenuItem inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem inherited TBXItem8: TTBXItem
Visible = False Visible = False
@ -69,22 +69,22 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
end end
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 765 Width = 854
Height = 398 Height = 398
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitLeft = 3 ExplicitLeft = 3
ExplicitTop = 79 ExplicitTop = 79
ExplicitWidth = 765 ExplicitWidth = 854
ExplicitHeight = 398 ExplicitHeight = 398
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
ExplicitLeft = 4 ExplicitLeft = 4
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 757 ExplicitWidth = 846
ExplicitHeight = 370 ExplicitHeight = 370
inline frViewFacturaCliente1: TfrViewFacturaCliente inline frViewFacturaCliente1: TfrViewFacturaCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 757 Width = 846
Height = 370 Height = 370
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -95,66 +95,127 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 757 ExplicitWidth = 846
ExplicitHeight = 370 ExplicitHeight = 370
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 757 Width = 846
Height = 370 Height = 370
ExplicitWidth = 757 ExplicitWidth = 846
ExplicitHeight = 370 ExplicitHeight = 370
inherited eReferencia: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 159
Width = 159
end
inherited edtFecha: TcxDBDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 159
Width = 159
end
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
ExplicitWidth = 713 Style.LookAndFeel.SkinName = ''
ExplicitHeight = 29 StyleDisabled.LookAndFeel.SkinName = ''
Height = 29 StyleFocused.LookAndFeel.SkinName = ''
Width = 713 StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 301
ExplicitHeight = 159
Height = 159
Width = 301
end
inherited cbFormaPago: TcxDBLookupComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 78
Width = 78
end
inherited frViewTienda1: TfrViewTienda
inherited dxLayoutControl1: TdxLayoutControl
inherited cbTienda: TcxComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 399
Width = 399
end
end
end end
inherited frViewClienteFactura1: TfrViewClienteFactura inherited frViewClienteFactura1: TfrViewClienteFactura
Width = 334 Width = 398
ExplicitWidth = 334 ExplicitWidth = 398
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 334 Width = 398
ExplicitWidth = 314
inherited Bevel1: TBevel inherited Bevel1: TBevel
Width = 266 Width = 266
ExplicitWidth = 266 ExplicitWidth = 266
end end
inherited edtlNombre: TcxDBTextEdit inherited edtlNombre: TcxDBTextEdit
DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = ''
ExplicitWidth = 243 StyleDisabled.LookAndFeel.SkinName = ''
Width = 243 StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 276
Width = 276
end end
inherited edtNIFCIF: TcxDBTextEdit inherited edtNIFCIF: TcxDBTextEdit
DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = ''
ExplicitWidth = 243 StyleDisabled.LookAndFeel.SkinName = ''
Width = 243 StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 276
Width = 276
end end
inherited edtCalle: TcxDBTextEdit inherited edtCalle: TcxDBTextEdit
DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = ''
ExplicitWidth = 243 StyleDisabled.LookAndFeel.SkinName = ''
Width = 243 StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 276
Width = 276
end end
inherited edtPoblacion: TcxDBTextEdit inherited edtPoblacion: TcxDBTextEdit
DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = ''
ExplicitWidth = 125 StyleDisabled.LookAndFeel.SkinName = ''
Width = 125 StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 158
Width = 158
end end
inherited edtProvincia: TcxDBTextEdit inherited edtProvincia: TcxDBTextEdit
DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = ''
ExplicitWidth = 243 StyleDisabled.LookAndFeel.SkinName = ''
Width = 243 StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 276
Width = 276
end end
inherited edtCodigoPostal: TcxDBTextEdit inherited edtCodigoPostal: TcxDBTextEdit
Left = 242 Left = 331
DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = ''
ExplicitLeft = 242 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 331
end end
inherited Button3: TBitBtn inherited Button3: TBitBtn
Left = 132 Left = 221
ExplicitLeft = 132 ExplicitLeft = 221
end end
inherited cxDBTextEdit1: TcxDBTextEdit inherited cxDBTextEdit1: TcxDBTextEdit
ExplicitWidth = 243 Style.LookAndFeel.SkinName = ''
Width = 243 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 283
Width = 283
end end
end end
end end
@ -167,7 +228,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 757 Width = 846
Height = 370 Height = 370
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
@ -180,77 +241,104 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 757 ExplicitWidth = 846
ExplicitHeight = 370 ExplicitHeight = 370
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 757 Width = 846
ExplicitWidth = 757 Height = 24
ExplicitWidth = 846
ExplicitHeight = 24
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Wrap = False Wrap = False
end end
inherited ToolButton14: TToolButton inherited ToolButton14: TToolButton
Left = 334 Left = 334
Top = 0 Top = 0
Wrap = True
ExplicitLeft = 334 ExplicitLeft = 334
ExplicitTop = 0 ExplicitTop = 0
end end
inherited FontName: TJvFontComboBox inherited FontName: TJvFontComboBox
Left = 0 Left = 368
ExplicitLeft = 0 Top = 0
ExplicitLeft = 368
ExplicitTop = 0
end end
inherited FontSize: TEdit inherited FontSize: TEdit
Left = 145 Left = 513
Top = 0
Width = 57 Width = 57
ExplicitLeft = 145 ExplicitLeft = 513
ExplicitTop = 0
ExplicitWidth = 57 ExplicitWidth = 57
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 202 Left = 570
ExplicitLeft = 202 Top = 0
ExplicitLeft = 570
ExplicitTop = 0
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 219 Left = 587
ExplicitLeft = 219 Top = 0
ExplicitLeft = 587
ExplicitTop = 0
end end
inherited ToolButton6: TToolButton inherited ToolButton6: TToolButton
Left = 227 Left = 595
ExplicitLeft = 227 Top = 0
ExplicitLeft = 595
ExplicitTop = 0
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Left = 261 Left = 629
ExplicitLeft = 261 Top = 0
ExplicitLeft = 629
ExplicitTop = 0
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 295 Left = 663
ExplicitLeft = 295 Top = 0
ExplicitLeft = 663
ExplicitTop = 0
end end
inherited ToolButton12: TToolButton inherited ToolButton12: TToolButton
Left = 329 Left = 697
ExplicitLeft = 329 Top = 0
ExplicitLeft = 697
ExplicitTop = 0
end end
inherited ToolButton9: TToolButton inherited ToolButton9: TToolButton
Left = 337 Left = 705
ExplicitLeft = 337 Top = 0
ExplicitLeft = 705
ExplicitTop = 0
end end
inherited ToolButton10: TToolButton inherited ToolButton10: TToolButton
Left = 371 Left = 739
ExplicitLeft = 371 Top = 0
ExplicitLeft = 739
ExplicitTop = 0
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 405 Left = 773
ExplicitLeft = 405 Top = 0
ExplicitLeft = 773
ExplicitTop = 0
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 757 Top = 50
Height = 298 Width = 846
ExplicitWidth = 757 Height = 320
ExplicitHeight = 298 ExplicitTop = 50
ExplicitWidth = 846
ExplicitHeight = 320
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 757 Top = 24
ExplicitWidth = 757 Width = 846
ExplicitTop = 24
ExplicitWidth = 846
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548 ExplicitWidth = 548
end end
@ -263,7 +351,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inline frViewListaSubcuentas1: TfrViewListaSubcuentas inline frViewListaSubcuentas1: TfrViewListaSubcuentas
Left = 0 Left = 0
Top = 0 Top = 0
Width = 757 Width = 846
Height = 73 Height = 73
Align = alTop Align = alTop
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -274,20 +362,28 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 757 ExplicitWidth = 846
ExplicitHeight = 73 ExplicitHeight = 73
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 757 Width = 846
ExplicitWidth = 757 ExplicitWidth = 846
inherited cbSubCuentas: TcxComboBox inherited cbSubCuentas: TcxComboBox
Left = 85 Left = 85
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 85 ExplicitLeft = 85
ExplicitWidth = 429 ExplicitWidth = 429
Width = 429 Width = 429
end end
inherited eContabilizar: TcxCheckBox inherited eContabilizar: TcxCheckBox
Left = 520 Left = 581
ExplicitLeft = 520 Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 581
ExplicitWidth = 227 ExplicitWidth = 227
Width = 227 Width = 227
end end
@ -302,18 +398,18 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
inherited StatusBar: TJvStatusBar inherited StatusBar: TJvStatusBar
Top = 643 Top = 643
Width = 771 Width = 860
Panels = < Panels = <
item item
Width = 200 Width = 200
end> end>
ExplicitTop = 643 ExplicitTop = 643
ExplicitWidth = 771 ExplicitWidth = 860
end end
inline frViewTotales1: TfrViewTotales [4] inline frViewTotales1: TfrViewTotales [4]
Left = 0 Left = 0
Top = 480 Top = 480
Width = 771 Width = 860
Height = 163 Height = 163
Align = alBottom Align = alBottom
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -325,12 +421,12 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 4 TabOrder = 4
ReadOnly = False ReadOnly = False
ExplicitTop = 480 ExplicitTop = 480
ExplicitWidth = 771 ExplicitWidth = 860
ExplicitHeight = 163 ExplicitHeight = 163
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 771 Width = 860
LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1 LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1
ExplicitWidth = 771 ExplicitWidth = 860
inherited Bevel1: TBevel inherited Bevel1: TBevel
Top = 111 Top = 111
Width = 73 Width = 73
@ -338,42 +434,54 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 73 ExplicitWidth = 73
end end
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 411 Left = 457
Top = 30 Top = 30
Height = 122 Height = 122
ExplicitLeft = 411 ExplicitLeft = 457
ExplicitTop = 30 ExplicitTop = 30
ExplicitHeight = 122 ExplicitHeight = 122
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 523 Left = 569
Top = 111 Top = 111
Width = 186 Width = 186
ExplicitLeft = 523 ExplicitLeft = 569
ExplicitTop = 111 ExplicitTop = 111
ExplicitWidth = 186 ExplicitWidth = 186
end end
inherited ImporteDto: TcxDBCurrencyEdit inherited ImporteDto: TcxDBCurrencyEdit
Top = 131 Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 131 ExplicitTop = 131
ExplicitWidth = 220 ExplicitWidth = 220
Width = 220 Width = 220
end end
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 594 Left = 640
Top = 57 Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 594 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 640
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 155 ExplicitWidth = 155
Width = 155 Width = 155
end end
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 524 Left = 570
Top = 131 Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 524 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 570
ExplicitTop = 131 ExplicitTop = 131
ExplicitWidth = 225 ExplicitWidth = 225
Width = 225 Width = 225
@ -381,45 +489,69 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited edtDescuento: TcxDBSpinEdit inherited edtDescuento: TcxDBSpinEdit
Top = 131 Top = 131
Properties.OnValidate = frViewTotales1edtDescuentoPropertiesValidate Properties.OnValidate = frViewTotales1edtDescuentoPropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 131 ExplicitTop = 131
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 523 Left = 569
Top = 57 Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 523 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 569
ExplicitTop = 57 ExplicitTop = 57
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 523 Left = 569
Top = 30 Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 523 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 569
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 226 ExplicitWidth = 226
Width = 226 Width = 226
end end
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 523 Left = 569
Top = 84 Top = 84
Properties.AssignedValues.MinValue = True Properties.AssignedValues.MinValue = True
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 523 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 569
ExplicitTop = 84 ExplicitTop = 84
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 594 Left = 640
Top = 84 Top = 84
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 594 StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 640
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 155 ExplicitWidth = 155
Width = 155 Width = 155
end end
inherited eImporteNeto: TcxDBCurrencyEdit inherited eImporteNeto: TcxDBCurrencyEdit
Top = 30 Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 291 ExplicitWidth = 291
Width = 291 Width = 291
@ -428,7 +560,11 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Top = 158 Top = 158
DataBinding.DataSource = dsDataTable DataBinding.DataSource = dsDataTable
Properties.OnValidate = frViewTotales1ePortePropertiesValidate Properties.OnValidate = frViewTotales1ePortePropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
OnEditing = frViewTotales1ePorteEditing OnEditing = frViewTotales1ePorteEditing
ExplicitTop = 158 ExplicitTop = 158
ExplicitWidth = 291 ExplicitWidth = 291
@ -438,20 +574,28 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Top = 57 Top = 57
Properties.OnValidate = frViewTotales1eIVAPropertiesValidate Properties.OnValidate = frViewTotales1eIVAPropertiesValidate
Style.Color = clInfoBk Style.Color = clInfoBk
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 153 ExplicitWidth = 153
Width = 153 Width = 153
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 263 Left = 309
Top = 57 Top = 57
OnClick = frViewTotales1bTiposIVAClick OnClick = frViewTotales1bTiposIVAClick
ExplicitLeft = 263 ExplicitLeft = 309
ExplicitTop = 57 ExplicitTop = 57
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 84 Top = 84
Properties.OnEditValueChanged = frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged Properties.OnEditValueChanged = frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 291 ExplicitWidth = 291
Width = 291 Width = 291

View File

@ -30,21 +30,18 @@ begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosFacturaProveedor', IEditorElegirArticulosFacturasProveedor, AEditor); CreateEditor('EditorElegirArticulosFacturaProveedor', IEditorElegirArticulosFacturasProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.Proveedor := AProveedor;
Articulos := AArticulos; AEditor.MultiSelect := AMultiSelect;
Proveedor := AProveedor; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -764,14 +764,14 @@ begin
with AEditor do with AEditor do
begin begin
try try
Controller := Self; AEditor.Controller := Self;
Facturas := AFacturas; AEditor.Facturas := AFacturas;
MultiSelect := AMultiSelect; AEditor.MultiSelect := AMultiSelect;
Mensaje := AMensaje; AEditor.Mensaje := AMensaje;
if IsPositiveResult(ShowModal) then if IsPositiveResult(AEditor.ShowModal) then
Result := FacturasProveedoreSeleccionados; Result := AEditor.FacturasProveedoreSeleccionados;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end; end;

View File

@ -64,16 +64,13 @@ begin
try try
CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor); CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Preview;
LoadFromStream(AStream); finally
Preview; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -92,16 +89,13 @@ begin
try try
CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor); CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Print;
LoadFromStream(AStream); finally
Print; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -155,17 +155,14 @@ begin
CreateEditor('EditorFamilias', IEditorFamilias, AEditor); CreateEditor('EditorFamilias', IEditorFamilias, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Familias := AFamilias;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Familias := AFamilias; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TFamiliasController.Eliminar(AFamilia: IBizFamilia): Boolean; function TFamiliasController.Eliminar(AFamilia: IBizFamilia): Boolean;
@ -182,7 +179,7 @@ begin
AFamilia.Delete; AFamilia.Delete;
AFamilia.DataTable.ApplyUpdates; AFamilia.DataTable.ApplyUpdates;
HideHourglassCursor;
Result := True; Result := True;
finally finally
HideHourglassCursor; HideHourglassCursor;

View File

@ -203,16 +203,13 @@ begin
CreateEditor('EditorFormaPago', IEditorFormaPago, AEditor); CreateEditor('EditorFormaPago', IEditorFormaPago, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
begin begin
with AEditor do try
begin AEditor.FormaPago := AFormaPago;
try AEditor.ShowModal;
FormaPago := AFormaPago; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end; end;
@ -224,16 +221,13 @@ begin
CreateEditor('EditorFormasPago', IEditorFormasPago, AEditor); CreateEditor('EditorFormasPago', IEditorFormasPago, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.FormasPago := AFormasPago;
try AEditor.ShowModal;
FormasPago := AFormasPago; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TFormasPagoController.Eliminar(AFormaPago: IBizFormaPago): Boolean; function TFormasPagoController.Eliminar(AFormaPago: IBizFormaPago): Boolean;

View File

@ -13,4 +13,4 @@ BEGIN
END END
/* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Controller\GestorDocumentos_Controller.res */ /* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Controller\GestorDocumentos_Controller.res */
/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf2F3.tmp */ /* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf54.tmp */

View File

@ -14,4 +14,4 @@ END
/* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Data\uDataModuleGestorDocumentos.dfm */ /* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Data\uDataModuleGestorDocumentos.dfm */
/* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Data\GestorDocumentos_data.res */ /* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Data\GestorDocumentos_data.res */
/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf2F1.tmp */ /* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf52.tmp */

View File

@ -123,19 +123,16 @@ begin
CreateEditor('EditorEntradaSalidaArticulos', IEditorEntradaSalidaArticulos, AEditor); CreateEditor('EditorEntradaSalidaArticulos', IEditorEntradaSalidaArticulos, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Articulos := AArticulos;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.HistoricoMovimientos := AHistoricoMovimientos;
Articulos := AArticulos; AEditor.ShowModal;
HistoricoMovimientos := AHistoricoMovimientos; Result := AEditor.ResultadoModalOK;
ShowModal; finally
Result := ResultadoModalOK; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end;} end;}
procedure THistoricoMovimientosController.VerTodos(AHistoricoMovimientos: IBizHistoricoMovimientos); procedure THistoricoMovimientosController.VerTodos(AHistoricoMovimientos: IBizHistoricoMovimientos);

View File

@ -30,19 +30,16 @@ begin
CreateEditor('EditorElegirArticulosCatalogo', IEditorElegirArticulosCatalogo, AEditor); CreateEditor('EditorElegirArticulosCatalogo', IEditorElegirArticulosCatalogo, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Articulos := AArticulos; if IsPositiveResult(AEditor.ShowModal) then
MultiSelect := AMultiSelect; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -329,20 +329,17 @@ begin
CreateEditor('EditorElegirArticulosAlmacen', IEditorElegirArticulosAlmacen, AEditor); CreateEditor('EditorElegirArticulosAlmacen', IEditorElegirArticulosAlmacen, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Inventario := AArticulos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Inventario := AArticulos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TInventarioController.Eliminar(AInventario: IBizInventario; Todos: Boolean; ApplyUpdates: Boolean): Boolean; function TInventarioController.Eliminar(AInventario: IBizInventario; Todos: Boolean; ApplyUpdates: Boolean): Boolean;
@ -454,21 +451,18 @@ begin
CreateEditor('EditorEntradaSalidaArticulos', IEditorEntradaSalidaArticulos, AEditor); CreateEditor('EditorEntradaSalidaArticulos', IEditorEntradaSalidaArticulos, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Articulos := AArticulos;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.Inventario := AInventario;
Articulos := AArticulos; if Assigned(APedido) then
Inventario := AInventario; AEditor.PedidoProveedor := APedido;
if Assigned(APedido) then AEditor.ShowModal;
PedidoProveedor := APedido; Result := AEditor.ResultadoModalOK;
ShowModal; finally
Result := ResultadoModalOK; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TInventarioController.VerReservas(AArticulo: IBizInventario); procedure TInventarioController.VerReservas(AArticulo: IBizInventario);
@ -479,18 +473,15 @@ begin
CreateEditor('EditorDetalleReservas', IEditorDetalleReservas, AEditor); CreateEditor('EditorDetalleReservas', IEditorDetalleReservas, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin // AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.DetalleReservas := FDataModule.GetDetalleReservas;
// Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.Articulo := AArticulo;
DetalleReservas := FDataModule.GetDetalleReservas; // AEditor.MultiSelect := False;
Articulo := AArticulo; AEditor.ShowModal;
// MultiSelect := False; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -31,21 +31,18 @@ begin
CreateEditor('EditorElegirArticulosPedidoProveedor', IEditorElegirArticulosPedidosProveedor, AEditor); CreateEditor('EditorElegirArticulosPedidoProveedor', IEditorElegirArticulosPedidosProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.Proveedor := AProveedor;
Articulos := AArticulos; AEditor.MultiSelect := AMultiSelect;
Proveedor := AProveedor; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -244,18 +244,15 @@ begin
RecuperarProveedor(APedido); RecuperarProveedor(APedido);
CreateEditor('EditorSituacionPedidoProveedor', IEditorSituacionPedidoProveedor, AEditor); CreateEditor('EditorSituacionPedidoProveedor', IEditorSituacionPedidoProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.PedidoProveedor := APedido;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
PedidoProveedor := APedido; Result := True;
ShowModal; finally
Result := True; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
destructor TPedidosProveedorController.Destroy; destructor TPedidosProveedorController.Destroy;
@ -372,28 +369,25 @@ begin
CreateEditor('EditorPedidoProveedor', IEditorPedidoProveedor, AEditor); CreateEditor('EditorPedidoProveedor', IEditorPedidoProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Pedido := APedido;
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Pedido := APedido;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(APedido) then if not EsModificable(APedido) then
begin begin
SetDataTableReadOnly(APedido.DataTable, True); SetDataTableReadOnly(APedido.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end;
ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then
SetDataTableReadOnly(APedido.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end; end;
AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if AEditor.ReadOnly then
SetDataTableReadOnly(APedido.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end; end;
end; end;
@ -424,16 +418,13 @@ begin
//RecuperarObjetos(APedido); <- No descomentar. No hace falta //RecuperarObjetos(APedido); <- No descomentar. No hace falta
CreateEditor('EditorDireccionEntregaPedidoProveedor', IEditorDireccionEntregaPedidoProveedor, AEditor); CreateEditor('EditorDireccionEntregaPedidoProveedor', IEditorDireccionEntregaPedidoProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorDireccionEntregaPedidoProveedor) do try
begin AEditor.Pedido := APedido;
try AEditor.ShowModal;
Pedido := APedido; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TPedidosProveedorController._Vacio: IBizPedidoProveedor; function TPedidosProveedorController._Vacio: IBizPedidoProveedor;
@ -462,20 +453,17 @@ begin
CreateEditor('EditorElegirPedidosProveedor', IEditorElegirPedidosProveedor, AEditor); CreateEditor('EditorElegirPedidosProveedor', IEditorElegirPedidosProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Pedidos := APedido;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Pedidos := APedido; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.PedidosProveedorSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := PedidosProveedorSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TPedidosProveedorController.Eliminar(APedido: IBizPedidoProveedor; AllItems: Boolean = false): Boolean; function TPedidosProveedorController.Eliminar(APedido: IBizPedidoProveedor; AllItems: Boolean = false): Boolean;

View File

@ -65,16 +65,13 @@ begin
try try
CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor); CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -93,16 +90,13 @@ begin
try try
CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor); CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -30,20 +30,17 @@ begin
CreateEditor('EditorElegirArticulosPresupuestosCliente', IEditorElegirArticulosPresupuestosCliente, AEditor); CreateEditor('EditorElegirArticulosPresupuestosCliente', IEditorElegirArticulosPresupuestosCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Articulos := AArticulos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Articulos := AArticulos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.ArticulosSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := ArticulosSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
end. end.

View File

@ -360,28 +360,25 @@ begin
CreateEditor('EditorPresupuestoCliente', IEditorPresupuestoCliente, AEditor); CreateEditor('EditorPresupuestoCliente', IEditorPresupuestoCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Presupuesto := APresupuesto;
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Presupuesto := APresupuesto;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(APresupuesto) then if not EsModificable(APresupuesto) then
begin begin
SetDataTableReadOnly(APresupuesto.DataTable, True); SetDataTableReadOnly(APresupuesto.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end;
ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then
SetDataTableReadOnly(APresupuesto.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end; end;
AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if AEditor.ReadOnly then
SetDataTableReadOnly(APresupuesto.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end; end;
end; end;
@ -395,15 +392,12 @@ begin
//RecuperarObjetos(APresupuesto); <- No descomentar. No hace falta //RecuperarObjetos(APresupuesto); <- No descomentar. No hace falta
CreateEditor('EditorDireccionEntregaPresupuestoCliente', IEditorDireccionEntregaPresupuestoCliente, AEditor); CreateEditor('EditorDireccionEntregaPresupuestoCliente', IEditorDireccionEntregaPresupuestoCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorDireccionEntregaPresupuestoCliente) do try
begin AEditor.Presupuesto := APresupuesto;
try AEditor.ShowModal;
Presupuesto := APresupuesto; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
} }
end; end;
@ -451,20 +445,17 @@ begin
CreateEditor('EditorElegirPresupuestosCliente', IEditorElegirPresupuestosCliente, AEditor); CreateEditor('EditorElegirPresupuestosCliente', IEditorElegirPresupuestosCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.Presupuestos := APresupuesto;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
Presupuestos := APresupuesto; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.PresupuestosClienteSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := PresupuestosClienteSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TPresupuestosClienteController.Eliminar(APresupuesto: IBizPresupuestoCliente; AllItems: Boolean = false): Boolean; function TPresupuestosClienteController.Eliminar(APresupuesto: IBizPresupuestoCliente; AllItems: Boolean = false): Boolean;

View File

@ -557,17 +557,14 @@ begin
RecuperarCliente(ARecibosCliente); RecuperarCliente(ARecibosCliente);
CreateEditor('EditorReciboCliente', IEditorReciboCliente, AEditor); CreateEditor('EditorReciboCliente', IEditorReciboCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Recibo := ARecibosCliente;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Recibo := ARecibosCliente; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TRecibosClienteController.VerTodos(ARecibosCliente: IBizRecibosCliente); procedure TRecibosClienteController.VerTodos(ARecibosCliente: IBizRecibosCliente);
@ -595,19 +592,16 @@ begin
CreateEditor('EditorElegirRecibosCliente', IEditorElegirRecibosCliente, AEditor); CreateEditor('EditorElegirRecibosCliente', IEditorElegirRecibosCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.RecibosCliente := ARecibos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
RecibosCliente := ARecibos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.RecibosClienteSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := RecibosClienteSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
end; end;

View File

@ -63,15 +63,12 @@ begin
try try
CreateEditor('EditorRecibosClientePreview', IEditorRecibosClientePreview, AEditor); CreateEditor('EditorRecibosClientePreview', IEditorRecibosClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
AEditor := Nil; AEditor := Nil;
@ -90,8 +87,6 @@ begin
try try
CreateEditor('EditorRecibosClientePreview', IEditorRecibosClientePreview, AEditor); CreateEditor('EditorRecibosClientePreview', IEditorRecibosClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
AEditor.LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
AEditor.Print; AEditor.Print;
@ -99,7 +94,6 @@ begin
AEditor.Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -550,17 +550,14 @@ begin
RecuperarProveedor(ARecibosProveedor); RecuperarProveedor(ARecibosProveedor);
CreateEditor('EditorReciboProveedor', IEditorReciboProveedor, AEditor); CreateEditor('EditorReciboProveedor', IEditorReciboProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.Recibo := ARecibosProveedor;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
Recibo := ARecibosProveedor; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TRecibosProveedorController.VerTodos(ARecibosProveedor: IBizRecibosProveedor); procedure TRecibosProveedorController.VerTodos(ARecibosProveedor: IBizRecibosProveedor);
@ -589,20 +586,17 @@ begin
CreateEditor('EditorElegirRecibosProveedor', IEditorElegirRecibosProveedor, AEditor); CreateEditor('EditorElegirRecibosProveedor', IEditorElegirRecibosProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self;
try AEditor.RecibosProveedor := ARecibos;
Controller := Self; AEditor.MultiSelect := AMultiSelect;
RecibosProveedor := ARecibos; AEditor.Mensaje := AMensaje;
MultiSelect := AMultiSelect; if IsPositiveResult(AEditor.ShowModal) then
Mensaje := AMensaje; Result := AEditor.RecibosProveedorSeleccionados;
if IsPositiveResult(ShowModal) then finally
Result := RecibosProveedorSeleccionados; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TRecibosProveedorController.ElegirRecibosCompensados(ARecibo: IBizRecibosProveedor): Boolean; function TRecibosProveedorController.ElegirRecibosCompensados(ARecibo: IBizRecibosProveedor): Boolean;

View File

@ -64,15 +64,12 @@ begin
try try
CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor); CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Preview;
LoadFromStream(AStream); finally
Preview; AEditor.Release;
finally AEditor := Nil;
Release;
AEditor := Nil;
end;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -91,15 +88,12 @@ begin
try try
CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor); CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.LoadFromStream(AStream);
try AEditor.Print;
LoadFromStream(AStream); finally
Print; AEditor.Release;
finally AEditor := NIL;
Release;
AEditor := NIL;
end;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);

View File

@ -135,16 +135,13 @@ begin
CreateEditor('EditorReferencias', IEditorReferencias, AEditor); CreateEditor('EditorReferencias', IEditorReferencias, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Referencias := AReferencias;
try AEditor.ShowModal;
Referencias := AReferencias; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
{ {

View File

@ -227,28 +227,25 @@ begin
CreateEditor('EditorRemesaCliente', IEditorRemesaCliente, AEditor); CreateEditor('EditorRemesaCliente', IEditorRemesaCliente, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorRemesaCliente) do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.RemesaCliente := ARemesaCliente;
Controller := Self; //OJO ORDEN MUY IMPORTANTE
RemesaCliente := ARemesaCliente;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(ARemesaCliente) then if not EsModificable(ARemesaCliente) then
begin begin
SetDataTableReadOnly(ARemesaCliente.DataTable, True); SetDataTableReadOnly(ARemesaCliente.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end;
ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then
SetDataTableReadOnly(ARemesaCliente.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end; end;
AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
if AEditor.ReadOnly then
SetDataTableReadOnly(ARemesaCliente.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end; end;
end; end;

View File

@ -64,16 +64,13 @@ begin
try try
CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor); CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -92,16 +89,13 @@ begin
try try
CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor); CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -226,29 +226,26 @@ begin
RecuperarObjetos(ARemesaProveedor); RecuperarObjetos(ARemesaProveedor);
CreateEditor('EditorRemesaProveedor', IEditorRemesaProveedor, AEditor); CreateEditor('EditorRemesaProveedor', IEditorRemesaProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with (AEditor as IEditorRemesaProveedor) do
begin
try try
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
RemesaProveedor := ARemesaProveedor; AEditor.RemesaProveedor := ARemesaProveedor;
//MODO CONSULTAR //MODO CONSULTAR
if not EsModificable(ARemesaProveedor) then if not EsModificable(ARemesaProveedor) then
begin begin
SetDataTableReadOnly(ARemesaProveedor.DataTable, True); SetDataTableReadOnly(ARemesaProveedor.DataTable, True);
ReadOnly := True; AEditor.ReadOnly := True;
end; end;
ShowModal; AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba) //MODO CONSULTAR (Se deja la tabla como estaba)
if ReadOnly then if AEditor.ReadOnly then
SetDataTableReadOnly(ARemesaProveedor.DataTable, False); SetDataTableReadOnly(ARemesaProveedor.DataTable, False);
finally finally
AEditor.Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
end; end;
procedure TRemesasProveedorController.VerTodos(ARemesasProveedor: IBizRemesaProveedor); procedure TRemesasProveedorController.VerTodos(ARemesasProveedor: IBizRemesaProveedor);

View File

@ -64,16 +64,13 @@ begin
try try
CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor); CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Preview; AEditor.Preview;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;
@ -92,16 +89,13 @@ begin
try try
CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor); CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin
try try
LoadFromStream(AStream); AEditor.LoadFromStream(AStream);
Print; AEditor.Print;
finally finally
Release; AEditor.Release;
AEditor := NIL; AEditor := NIL;
end; end;
end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
end; end;

View File

@ -236,16 +236,13 @@ begin
AEditor := NIL; AEditor := NIL;
CreateEditor('EditorTipoIVA', IEditorTipoIVA, AEditor); CreateEditor('EditorTipoIVA', IEditorTipoIVA, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.TipoIVA := ATipoIVA;
try AEditor.ShowModal;
TipoIVA := ATipoIVA; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
procedure TTiposIVAController.VerTodos(ATiposIVA: IBizTipoIVA); procedure TTiposIVAController.VerTodos(ATiposIVA: IBizTipoIVA);
@ -256,16 +253,13 @@ begin
CreateEditor('EditorTiposIVA', IEditorTiposIVA, AEditor); CreateEditor('EditorTiposIVA', IEditorTiposIVA, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.TiposIVA := ATiposIVA;
try AEditor.ShowModal;
TiposIVA := ATiposIVA; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TTiposIVAController.Eliminar(ATipoIVA: IBizTipoIVA): Boolean; function TTiposIVAController.Eliminar(ATipoIVA: IBizTipoIVA): Boolean;

View File

@ -141,16 +141,13 @@ begin
CreateEditor('EditorTiposVenta', IEditorTiposVenta, AEditor); CreateEditor('EditorTiposVenta', IEditorTiposVenta, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.TiposVenta := ATiposVenta;
try AEditor.ShowModal;
TiposVenta := ATiposVenta; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
{ {
procedure TTiposVentaController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); procedure TTiposVentaController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);

View File

@ -155,17 +155,14 @@ begin
CreateEditor('EditorUnidadesMedida', IEditorUnidadesMedida, AEditor); CreateEditor('EditorUnidadesMedida', IEditorUnidadesMedida, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do try
begin AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
try AEditor.UnidadesMedida := AUnidadesMedida;
Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.ShowModal;
UnidadesMedida := AUnidadesMedida; finally
ShowModal; AEditor.Release;
finally AEditor := NIL;
Release; end;
AEditor := NIL;
end;
end;
end; end;
function TUnidadesMedidaController.Eliminar(AUnidadMedida: IBizUnidadMedida): Boolean; function TUnidadesMedidaController.Eliminar(AUnidadMedida: IBizUnidadMedida): Boolean;

Binary file not shown.

View File

@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.2.4.0\0" VALUE "FileVersion", "2.2.4.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.2.4.0\0" VALUE "ProductVersion", "2.2.4.0\0"
VALUE "CompileDate", "viernes, 03 de octubre de 2008 20:35\0" VALUE "CompileDate", "jueves, 13 de noviembre de 2008 20:53\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"