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);
{var
AEditor : IEditorClientes;}
AEditor : IEditorEmpresas;}
begin
{ CreateEditor('EditorEmpresas', IEditorClientes, AEditor);
{
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorEmpresas', IEditorClientes, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
Contactos := AContactos;
Controller := Self;
ShowEmbedded;
end;}
end;
finally
AEditor := NIL;
HideHourglassCursor;
end;
}
end;
end.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN
VALUE "FileVersion", "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
BLOCK "VarFileInfo"