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);
if Assigned(AEditor) then
with (AEditor as IEditorEjercicio) do
begin
try
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Ejercicio := AEjercicio;
ShowModal;
finally
Release;
AEditor := NIL
end;
try
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.Ejercicio := AEjercicio;
AEditor.ShowModal;
finally
AEditor.Release;
AEditor := NIL
end;
end;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,4 +13,4 @@ BEGIN
END
/* 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\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);
if Assigned(AEditor) then
with AEditor do
begin
try
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Articulos := AArticulos;
HistoricoMovimientos := AHistoricoMovimientos;
ShowModal;
Result := ResultadoModalOK;
finally
Release;
AEditor := NIL;
end;
end;
try
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.Articulos := AArticulos;
AEditor.HistoricoMovimientos := AHistoricoMovimientos;
AEditor.ShowModal;
Result := AEditor.ResultadoModalOK;
finally
AEditor.Release;
AEditor := NIL;
end;
end;}
procedure THistoricoMovimientosController.VerTodos(AHistoricoMovimientos: IBizHistoricoMovimientos);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -155,17 +155,14 @@ begin
CreateEditor('EditorUnidadesMedida', IEditorUnidadesMedida, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
try
Controller := Self; //OJO ORDEN MUY IMPORTANTE
UnidadesMedida := AUnidadesMedida;
ShowModal;
finally
Release;
AEditor := NIL;
end;
end;
try
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.UnidadesMedida := AUnidadesMedida;
AEditor.ShowModal;
finally
AEditor.Release;
AEditor := NIL;
end;
end;
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 "ProductName", "FactuGES (Servidor)\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
BLOCK "VarFileInfo"