Segundo y ultimo repaso de creación de editores de informes y objetos

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@144 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2007-11-18 20:08:55 +00:00
parent f632f134a3
commit d9295361df
37 changed files with 529 additions and 442 deletions

View File

@ -224,15 +224,25 @@ end;
procedure TEmpresasController.VerTodos(AEmpresas: IBizEmpresa); procedure TEmpresasController.VerTodos(AEmpresas: IBizEmpresa);
{var {var
AEditor : IEditorClientes;} AEditor : IEditorEmpresas;}
begin begin
{ CreateEditor('EditorEmpresas', IEditorClientes, AEditor); {
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorEmpresas', IEditorClientes, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Contactos := AContactos; Contactos := AContactos;
Controller := Self; Controller := Self;
ShowEmbedded; ShowEmbedded;
end;} end;
finally
AEditor := NIL;
HideHourglassCursor;
end;
}
end; end;
end. end.

View File

@ -200,20 +200,16 @@ begin
ShowHourglassCursor; ShowHourglassCursor;
try try
CreateEditor('EditorLogin', IEditorLogin, AEditor); CreateEditor('EditorLogin', IEditorLogin, AEditor);
with AEditor do
Controller := Self;
finally
HideHourglassCursor;
end;
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do
begin begin
try Controller := Self;
Result := (AEditor.ShowModal = mrOk); Result := (AEditor.ShowModal = mrOk);
AEditor.Release; Release;
end;
finally finally
AEditor := NIL; AEditor := NIL;
end; HideHourglassCursor;
end; end;
end; end;

View File

@ -58,14 +58,6 @@
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\PluginSDK_D10R.bpl">PluginSDK for Delphi 10 (Runtime)</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\PluginSDK_D10R.bpl">PluginSDK for Delphi 10 (Runtime)</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages> <Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>

View File

@ -666,9 +666,10 @@ var
AEditor : IEditorElegirAlbaranesCliente; AEditor : IEditorElegirAlbaranesCliente;
begin begin
Result := NIL; Result := NIL;
ShowHourglassCursor;
CreateEditor('EditorElegirAlbaranesCliente', IEditorElegirAlbaranesCliente, AEditor);
try try
CreateEditor('EditorElegirAlbaranesCliente', IEditorElegirAlbaranesCliente, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -681,6 +682,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -72,9 +72,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Preview; Preview;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -99,9 +99,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Print; Print;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -126,9 +126,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Preview; Preview;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -153,9 +153,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Print; Print;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);

View File

@ -3,7 +3,7 @@ unit uArticulosAlbaranClienteController;
interface interface
uses uses
uDADataTable, uArticulosController, uBizArticulos; uDADataTable, cxControls, uArticulosController, uBizArticulos;
type type
IArticulosAlbaranClienteController = interface(IArticulosController) IArticulosAlbaranClienteController = interface(IArticulosController)
@ -27,8 +27,10 @@ var
AEditor : IEditorElegirArticulosAlbaranesCliente; AEditor : IEditorElegirArticulosAlbaranesCliente;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosAlbaranesCliente', IEditorElegirArticulosAlbaranesCliente, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosAlbaranesCliente', IEditorElegirArticulosAlbaranesCliente, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -41,6 +43,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -731,9 +731,10 @@ var
AEditor : IEditorElegirAlbaranesProveedor; AEditor : IEditorElegirAlbaranesProveedor;
begin begin
Result := NIL; Result := NIL;
ShowHourglassCursor;
CreateEditor('EditorElegirAlbaranesProveedor', IEditorElegirAlbaranesProveedor, AEditor);
try try
CreateEditor('EditorElegirAlbaranesProveedor', IEditorElegirAlbaranesProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -746,6 +747,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -59,22 +59,25 @@ var
AEditor : IEditorAlbaranesProveedorPreview; AEditor : IEditorAlbaranesProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AID); AStream := FDataModule.GetReport(AID);
try try
CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor); CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TAlbaranesProveedorReportController.Print(const AID : String); procedure TAlbaranesProveedorReportController.Print(const AID : String);
@ -83,22 +86,25 @@ var
AEditor : IEditorAlbaranesProveedorPreview; AEditor : IEditorAlbaranesProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AID); AStream := FDataModule.GetReport(AID);
try try
CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor); CreateEditor('EditorAlbaranesProveedorPreview', IEditorAlbaranesProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -20,15 +20,17 @@ implementation
{ TArticulosAlbaranProveedorController } { TArticulosAlbaranProveedorController }
uses Controls, uIEditorElegirArticulosAlbaranesProveedor, uIEditorElegirArticulos; uses Controls, cxControls, uIEditorElegirArticulosAlbaranesProveedor, uIEditorElegirArticulos;
function TArticulosAlbaranProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo; function TArticulosAlbaranProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
var var
AEditor : IEditorElegirArticulosAlbaranesProveedor; AEditor : IEditorElegirArticulosAlbaranesProveedor;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosAlbaranesProveedor', IEditorElegirArticulosAlbaranesProveedor, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosAlbaranesProveedor', IEditorElegirArticulosAlbaranesProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -42,6 +44,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -226,7 +226,7 @@ var
begin begin
AEditor := NIL; AEditor := NIL;
Result := NIL; Result := NIL;
ShowHourglassCursor;
try try
CreateEditor('EditorListaAlmacenes', IEditorListaAlmacenes, AEditor); CreateEditor('EditorListaAlmacenes', IEditorListaAlmacenes, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
@ -239,6 +239,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -436,6 +436,7 @@ begin
ShowEmbedded; ShowEmbedded;
end; end;
finally finally
AEditor := Nil;
HideHourglassCursor; HideHourglassCursor;
end; end;
end; end;
@ -463,8 +464,10 @@ var
AEditor : IEditorElegirArticulos; AEditor : IEditorElegirArticulos;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulos', IEditorElegirArticulos, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulos', IEditorElegirArticulos, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -477,6 +480,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

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

View File

@ -59,23 +59,26 @@ var
AEditor : IEditorComisionesPreview; AEditor : IEditorComisionesPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AComisionID, DesglosadoProv,'', '', Null); AStream := FDataModule.GetReport(AComisionID, DesglosadoProv,'', '', Null);
try try
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor); CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
AEditor.DataModule := FDataModule; if Assigned(AEditor) then
AEditor.LoadFromStream(AStream); with AEditor do
begin
DataModule := FDataModule;
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TComisionesReportController.Print(const AComisionID : Variant; const DesglosadoProv: Boolean); procedure TComisionesReportController.Print(const AComisionID : Variant; const DesglosadoProv: Boolean);
@ -84,23 +87,25 @@ var
AEditor : IEditorComisionesPreview; AEditor : IEditorComisionesPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AComisionID, DesglosadoProv, '', '', Null); AStream := FDataModule.GetReport(AComisionID, DesglosadoProv, '', '', Null);
try try
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor); CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
AEditor.DataModule := FDataModule; if Assigned(AEditor) then
AEditor.LoadFromStream(AStream); with AEditor do
begin
DataModule := FDataModule;
LoadFromStream(AStream);
Print;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -65,9 +65,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Preview; Preview;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -92,9 +92,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Print; Print;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);

View File

@ -57,22 +57,25 @@ var
AEditor : IEditorFichasEmpleadoPreview; AEditor : IEditorFichasEmpleadoPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AFichaID); AStream := FDataModule.GetReport(AFichaID);
try try
CreateEditor('EditorFichasEmpleadoPreview', IEditorFichasEmpleadoPreview, AEditor); CreateEditor('EditorFichasEmpleadoPreview', IEditorFichasEmpleadoPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TFichasEmpleadoReportController.Print(const AFichaID : String); procedure TFichasEmpleadoReportController.Print(const AFichaID : String);
@ -87,16 +90,20 @@ begin
AStream := FDataModule.GetReport(AFichaID); AStream := FDataModule.GetReport(AFichaID);
try try
CreateEditor('EditorFichasEmpleadoPreview', IEditorFichasEmpleadoPreview, AEditor); CreateEditor('EditorFichasEmpleadoPreview', IEditorFichasEmpleadoPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -89,9 +89,10 @@ var
AEditor : IEditorElegirProveedores; AEditor : IEditorElegirProveedores;
begin begin
Result := NIL; Result := NIL;
ShowHourglassCursor;
CreateEditor('EditorElegirProveedores', IEditorElegirProveedores, AEditor);
try try
CreateEditor('EditorElegirProveedores', IEditorElegirProveedores, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Contactos := AContactos; Contactos := AContactos;
@ -104,19 +105,20 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;
function TProveedoresController.ElegirDireccionEntrega( function TProveedoresController.ElegirDireccionEntrega(ADirecciones: IBizDireccionesContacto;
ADirecciones: IBizDireccionesContacto;
AMensaje: String): IBizDireccionesContacto; AMensaje: String): IBizDireccionesContacto;
var var
AEditor : IEditorElegirDireccionEntrega; AEditor : IEditorElegirDireccionEntrega;
begin begin
Result := NIL; Result := NIL;
ShowHourglassCursor;
CreateEditor('EditorElegirDireccionEntrega', IEditorElegirDireccionEntrega, AEditor);
try try
CreateEditor('EditorElegirDireccionEntrega', IEditorElegirDireccionEntrega, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Direccion := ADirecciones; Direccion := ADirecciones;
@ -127,6 +129,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -19,7 +19,7 @@ implementation
{ TArticulosFacturaClienteController } { TArticulosFacturaClienteController }
uses Controls, uIEditorElegirArticulosFacturasCliente, uIEditorElegirArticulos; uses Controls, cxControls, uIEditorElegirArticulosFacturasCliente, uIEditorElegirArticulos;
function TArticulosFacturaClienteController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; function TArticulosFacturaClienteController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
AMultiSelect: Boolean): IBizArticulo; AMultiSelect: Boolean): IBizArticulo;
@ -27,8 +27,10 @@ var
AEditor : IEditorElegirArticulosFacturasCliente; AEditor : IEditorElegirArticulosFacturasCliente;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosFacturaCliente', IEditorElegirArticulosFacturasCliente, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosFacturaCliente', IEditorElegirArticulosFacturasCliente, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -41,6 +43,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -691,8 +691,10 @@ var
AEditor : IEditorElegirFacturasCliente; AEditor : IEditorElegirFacturasCliente;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirFacturasCliente', IEditorElegirFacturasCliente, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirFacturasCliente', IEditorElegirFacturasCliente, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -705,6 +707,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -68,9 +68,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Preview; Preview;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);
@ -95,9 +95,9 @@ begin
if Assigned(AEditor) then if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
AEditor.LoadFromStream(AStream); LoadFromStream(AStream);
AEditor.Print; Print;
AEditor.Release; Release;
end; end;
finally finally
FreeAndNil(AStream); FreeAndNil(AStream);

View File

@ -48,14 +48,14 @@
<DelphiCompile Include="FacturasProveedor_controller.dpk"> <DelphiCompile Include="FacturasProveedor_controller.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\Lib\AlbaranesProveedor_controller.dcp" /> <DCCReference Include="..\AlbaranesProveedor_controller.dcp" />
<DCCReference Include="..\..\Lib\AlbaranesProveedor_model.dcp" /> <DCCReference Include="..\AlbaranesProveedor_model.dcp" />
<DCCReference Include="..\..\Lib\Articulos_controller.dcp" /> <DCCReference Include="..\Articulos_controller.dcp" />
<DCCReference Include="..\..\Lib\Contactos_controller.dcp" /> <DCCReference Include="..\Contactos_controller.dcp" />
<DCCReference Include="..\..\Lib\FacturasProveedor_data.dcp" /> <DCCReference Include="..\FacturasProveedor_data.dcp" />
<DCCReference Include="..\..\Lib\FacturasProveedor_model.dcp" /> <DCCReference Include="..\FacturasProveedor_model.dcp" />
<DCCReference Include="..\..\Lib\FormasPago_controller.dcp" /> <DCCReference Include="..\FormasPago_controller.dcp" />
<DCCReference Include="..\..\Lib\RecibosProveedor_controller.dcp" /> <DCCReference Include="..\RecibosProveedor_controller.dcp" />
<DCCReference Include="uArticulosFacturaProveedorController.pas" /> <DCCReference Include="uArticulosFacturaProveedorController.pas" />
<DCCReference Include="uDetallesFacturaProveedorController.pas" /> <DCCReference Include="uDetallesFacturaProveedorController.pas" />
<DCCReference Include="uFacturasProveedorController.pas" /> <DCCReference Include="uFacturasProveedorController.pas" />
@ -66,7 +66,6 @@
<DCCReference Include="View\uIEditorFacturasProveedorPreview.pas" /> <DCCReference Include="View\uIEditorFacturasProveedorPreview.pas" />
</ItemGroup> </ItemGroup>
</Project> </Project>
<!-- EurekaLog First Line <!-- EurekaLog First Line
[Exception Log] [Exception Log]
EurekaLog Version=6006 EurekaLog Version=6006

View File

@ -20,7 +20,7 @@ implementation
{ TArticulosFacturaProveedorController } { TArticulosFacturaProveedorController }
uses Controls, uIEditorElegirArticulosFacturasProveedor, uIEditorElegirArticulos; uses Controls, cxControls, uIEditorElegirArticulosFacturasProveedor, uIEditorElegirArticulos;
function TArticulosFacturaProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; function TArticulosFacturaProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
@ -28,8 +28,10 @@ var
AEditor : IEditorElegirArticulosFacturasProveedor; AEditor : IEditorElegirArticulosFacturasProveedor;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosFacturaProveedor', IEditorElegirArticulosFacturasProveedor, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosFacturaProveedor', IEditorElegirArticulosFacturasProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -43,6 +45,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -681,8 +681,11 @@ function TFacturasProveedorController.ElegirFacturas(AFacturas: IBizFacturaProve
AEditor : IEditorElegirFacturasProveedor;} AEditor : IEditorElegirFacturasProveedor;}
begin begin
Result := NIL; Result := NIL;
{ CreateEditor('EditorElegirFacturasProveedor', IEditorElegirFacturasProveedor, AEditor); {
ShowHourglassCursor;
try try
CreateEditor('EditorElegirFacturasProveedor', IEditorElegirFacturasProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -695,6 +698,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
} }
end; end;

View File

@ -58,22 +58,25 @@ var
AEditor : IEditorFacturasProveedorPreview; AEditor : IEditorFacturasProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AFacturaID); AStream := FDataModule.GetReport(AFacturaID);
try try
CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor); CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TFacturasProveedorReportController.Print(const AFacturaID : String); procedure TFacturasProveedorReportController.Print(const AFacturaID : String);
@ -88,16 +91,20 @@ begin
AStream := FDataModule.GetReport(AFacturaID); AStream := FDataModule.GetReport(AFacturaID);
try try
CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor); CreateEditor('EditorFacturasProveedorPreview', IEditorFacturasProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -27,8 +27,10 @@ var
AEditor : IEditorElegirArticulosCatalogo; AEditor : IEditorElegirArticulosCatalogo;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosCatalogo', IEditorElegirArticulosCatalogo, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosCatalogo', IEditorElegirArticulosCatalogo, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -40,6 +42,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -325,8 +325,10 @@ var
AEditor : IEditorElegirArticulosAlmacen; AEditor : IEditorElegirArticulosAlmacen;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosAlmacen', IEditorElegirArticulosAlmacen, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosAlmacen', IEditorElegirArticulosAlmacen, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -339,6 +341,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -20,7 +20,7 @@ implementation
{ TArticulosPedidoProveedorController } { TArticulosPedidoProveedorController }
uses Controls, uIEditorElegirArticulosPedidosProveedor, uIEditorElegirArticulos; uses Controls, cxControls, uIEditorElegirArticulosPedidosProveedor, uIEditorElegirArticulos;
function TArticulosPedidoProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; function TArticulosPedidoProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
@ -28,8 +28,10 @@ var
AEditor : IEditorElegirArticulosPedidosProveedor; AEditor : IEditorElegirArticulosPedidosProveedor;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosPedidoProveedor', IEditorElegirArticulosPedidosProveedor, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosPedidoProveedor', IEditorElegirArticulosPedidosProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -43,6 +45,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -243,26 +243,21 @@ begin
try try
RecuperarProveedor(APedido); RecuperarProveedor(APedido);
CreateEditor('EditorSituacionPedidoProveedor', IEditorSituacionPedidoProveedor, AEditor); CreateEditor('EditorSituacionPedidoProveedor', IEditorSituacionPedidoProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE Controller := Self; //OJO ORDEN MUY IMPORTANTE
PedidoProveedor := APedido; PedidoProveedor := APedido;
end; ShowModal;
finally Release;
HideHourglassCursor;
end;
if Assigned(AEditor) then
try
AEditor.ShowModal;
AEditor.Release;
Result := True; Result := True;
end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;
destructor TPedidosProveedorController.Destroy; destructor TPedidosProveedorController.Destroy;
begin begin
FDataModule := Nil; FDataModule := Nil;
@ -471,9 +466,10 @@ var
AEditor : IEditorElegirPedidosProveedor; AEditor : IEditorElegirPedidosProveedor;
begin begin
Result := NIL; Result := NIL;
ShowHourglassCursor;
CreateEditor('EditorElegirPedidosProveedor', IEditorElegirPedidosProveedor, AEditor);
try try
CreateEditor('EditorElegirPedidosProveedor', IEditorElegirPedidosProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -486,6 +482,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -59,22 +59,25 @@ var
AEditor : IEditorPedidosProveedorPreview; AEditor : IEditorPedidosProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AID); AStream := FDataModule.GetReport(AID);
try try
CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor); CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TPedidosProveedorReportController.Print(const AID : String); procedure TPedidosProveedorReportController.Print(const AID : String);
@ -83,22 +86,25 @@ var
AEditor : IEditorPedidosProveedorPreview; AEditor : IEditorPedidosProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(AID); AStream := FDataModule.GetReport(AID);
try try
CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor); CreateEditor('EditorPedidosProveedorPreview', IEditorPedidosProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -19,7 +19,7 @@ implementation
{ TArticulosPresupuestoClienteController } { TArticulosPresupuestoClienteController }
uses Controls, uIEditorElegirArticulosPresupuestosCliente, uIEditorElegirArticulos; uses Controls, cxControls, uIEditorElegirArticulosPresupuestosCliente, uIEditorElegirArticulos;
function TArticulosPresupuestoClienteController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; function TArticulosPresupuestoClienteController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
AMultiSelect: Boolean): IBizArticulo; AMultiSelect: Boolean): IBizArticulo;
@ -27,8 +27,10 @@ var
AEditor : IEditorElegirArticulosPresupuestosCliente; AEditor : IEditorElegirArticulosPresupuestosCliente;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirArticulosPresupuestosCliente', IEditorElegirArticulosPresupuestosCliente, AEditor); ShowHourglassCursor;
try try
CreateEditor('EditorElegirArticulosPresupuestosCliente', IEditorElegirArticulosPresupuestosCliente, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -41,6 +43,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -432,9 +432,10 @@ var
AEditor : IEditorElegirPresupuestosCliente; AEditor : IEditorElegirPresupuestosCliente;
begin begin
Result := NIL; Result := NIL;
ShowHourglassCursor;
CreateEditor('EditorElegirPresupuestosCliente', IEditorElegirPresupuestosCliente, AEditor);
try try
CreateEditor('EditorElegirPresupuestosCliente', IEditorElegirPresupuestosCliente, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -447,6 +448,7 @@ begin
end; end;
finally finally
AEditor := NIL; AEditor := NIL;
HideHourglassCursor;
end; end;
end; end;

View File

@ -754,10 +754,10 @@ var
AEditor : IEditorFechaPago; AEditor : IEditorFechaPago;
FechaPago: String; FechaPago: String;
begin begin
try
//Pedimos la fecha del pago //Pedimos la fecha del pago
CreateEditor('EditorFechaPago', IEditorFechaPago, AEditor); CreateEditor('EditorFechaPago', IEditorFechaPago, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
try
FechaPago:= ''; FechaPago:= '';
if (AEditor.ShowModal = mrOk) then if (AEditor.ShowModal = mrOk) then
FechaPago := DateToStr(AEditor.FechaPago); FechaPago := DateToStr(AEditor.FechaPago);

View File

@ -162,9 +162,9 @@ begin
//Pedimos la fecha del pago //Pedimos la fecha del pago
if (Length(FechaPago) = 0) then if (Length(FechaPago) = 0) then
begin begin
try
CreateEditor('EditorFechaPagoProveedor', IEditorFechaPagoProveedor, AEditor); CreateEditor('EditorFechaPagoProveedor', IEditorFechaPagoProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
try
if (AEditor.ShowModal = mrOk) then if (AEditor.ShowModal = mrOk) then
FechaPago := DateToStr(AEditor.FechaPago); FechaPago := DateToStr(AEditor.FechaPago);
AEditor.Release; AEditor.Release;
@ -546,8 +546,9 @@ var
AEditor : IEditorElegirRecibosProveedor; AEditor : IEditorElegirRecibosProveedor;
begin begin
Result := NIL; Result := NIL;
CreateEditor('EditorElegirRecibosProveedor', IEditorElegirRecibosProveedor, AEditor);
try try
CreateEditor('EditorElegirRecibosProveedor', IEditorElegirRecibosProveedor, AEditor);
if Assigned(AEditor) then
with AEditor do with AEditor do
begin begin
Controller := Self; Controller := Self;
@ -724,10 +725,10 @@ var
AEditor : IEditorFechaPagoProveedor; AEditor : IEditorFechaPagoProveedor;
FechaPago: String; FechaPago: String;
begin begin
try
//Pedimos la fecha del pago //Pedimos la fecha del pago
CreateEditor('EditorFechaPagoProveedor', IEditorFechaPagoProveedor, AEditor); CreateEditor('EditorFechaPagoProveedor', IEditorFechaPagoProveedor, AEditor);
if Assigned(AEditor) then if Assigned(AEditor) then
try
FechaPago:= ''; FechaPago:= '';
if (AEditor.ShowModal = mrOk) then if (AEditor.ShowModal = mrOk) then
FechaPago := DateToStr(AEditor.FechaPago); FechaPago := DateToStr(AEditor.FechaPago);

View File

@ -58,22 +58,25 @@ var
AEditor : IEditorRecibosProveedorPreview; AEditor : IEditorRecibosProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(ID); AStream := FDataModule.GetReport(ID);
try try
CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor); CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TRecibosProveedorReportController.Print(const ID : integer); procedure TRecibosProveedorReportController.Print(const ID : integer);
@ -82,22 +85,25 @@ var
AEditor : IEditorRecibosProveedorPreview; AEditor : IEditorRecibosProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(ID); AStream := FDataModule.GetReport(ID);
try try
CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor); CreateEditor('EditorRecibosProveedorPreview', IEditorRecibosProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -58,22 +58,25 @@ var
AEditor : IEditorRemesasClientePreview; AEditor : IEditorRemesasClientePreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(ID); AStream := FDataModule.GetReport(ID);
try try
CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor); CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TRemesasClienteReportController.Print(const ID : String); procedure TRemesasClienteReportController.Print(const ID : String);
@ -82,22 +85,25 @@ var
AEditor : IEditorRemesasClientePreview; AEditor : IEditorRemesasClientePreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(ID); AStream := FDataModule.GetReport(ID);
try try
CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor); CreateEditor('EditorRemesasClientePreview', IEditorRemesasClientePreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

View File

@ -58,22 +58,25 @@ var
AEditor : IEditorRemesasProveedorPreview; AEditor : IEditorRemesasProveedorPreview;
begin begin
AEditor := NIL; AEditor := NIL;
ShowHourglassCursor; ShowHourglassCursor;
try try
AStream := FDataModule.GetReport(ID); AStream := FDataModule.GetReport(ID);
try try
CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor); CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Preview;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
AEditor := Nil;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Preview;
end; end;
procedure TRemesasProveedorReportController.Print(const ID : String); procedure TRemesasProveedorReportController.Print(const ID : String);
@ -88,16 +91,20 @@ begin
AStream := FDataModule.GetReport(ID); AStream := FDataModule.GetReport(ID);
try try
CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor); CreateEditor('EditorRemesasProveedorPreview', IEditorRemesasProveedorPreview, AEditor);
AEditor.LoadFromStream(AStream); if Assigned(AEditor) then
with AEditor do
begin
LoadFromStream(AStream);
Print;
Release;
end;
finally finally
AStream.Free; FreeAndNil(AStream);
Release;
end; end;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
if Assigned(AEditor) then
AEditor.Print
end; end;
end. end.

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN BEGIN
VALUE "FileVersion", "3.0.0.0\0" VALUE "FileVersion", "3.0.0.0\0"
VALUE "ProductVersion", "3.0.0.0\0" VALUE "ProductVersion", "3.0.0.0\0"
VALUE "CompileDate", "domingo, 18 de noviembre de 2007 19:38\0" VALUE "CompileDate", "domingo, 18 de noviembre de 2007 21:05\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"