git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@26 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
77 lines
2.4 KiB
ObjectPascal
77 lines
2.4 KiB
ObjectPascal
unit uEditorPedidosProveedorReport;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uEditorPreview, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
|
|
JvFormPlacement, ImgList, PngImageList, StdActns, ActnList, ComCtrls,
|
|
TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage,
|
|
ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorPedidosProveedorPreview,
|
|
JvExComCtrls, JvStatusBar, frxExportImage, frxExportPDF, frxDCtrl, frxClass,
|
|
frxDMPExport, frxGradient, frxChBox, frxCross, frxRich, frxOLE, frxBarcode,
|
|
frxExportText, frxExportRTF, frxExportMail, frxExportXLS;
|
|
|
|
type
|
|
TfEditorPedidosProveedorPreview = class(TfEditorPreview, IEditorPedidosProveedorPreview)
|
|
TBXItem58: TTBXItem;
|
|
procedure actExportarRTFExecute(Sender: TObject);
|
|
private
|
|
FVerPrecios : Boolean;
|
|
FVerRefProveedor : Boolean;
|
|
function GetVerPrecios: Boolean;
|
|
function GetVerRefProveedor: Boolean;
|
|
procedure SetVerPrecios(const Value: Boolean);
|
|
procedure SetVerRefProveedor(const Value: Boolean);
|
|
{ Private declarations }
|
|
public
|
|
property VerPrecios : Boolean read GetVerPrecios write SetVerPrecios;
|
|
property VerRefProveedor : Boolean read GetVerRefProveedor write SetVerRefProveedor;
|
|
end;
|
|
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
uses
|
|
uPedidosProveedorReportController, uDialogUtils;
|
|
|
|
procedure TfEditorPedidosProveedorPreview.actExportarRTFExecute(
|
|
Sender: TObject);
|
|
var
|
|
I: Integer;
|
|
begin
|
|
// inherited; <- No llamar al padre
|
|
if not Assigned(Controller) then
|
|
raise Exception.Create('No se ha asignado el controlador necesario');
|
|
|
|
for I := 0 to ListaID.Count - 1 do
|
|
if (Controller as IPedidosProveedorReportController).ExportToWord(ListaID[I], '',
|
|
FVerPrecios, FVerRefProveedor) then
|
|
ShowInfoMessage('El pedido se ha exportado correctamente.');
|
|
end;
|
|
|
|
function TfEditorPedidosProveedorPreview.GetVerPrecios: Boolean;
|
|
begin
|
|
Result := FVerPrecios;
|
|
end;
|
|
|
|
function TfEditorPedidosProveedorPreview.GetVerRefProveedor: Boolean;
|
|
begin
|
|
Result := FVerRefProveedor;
|
|
end;
|
|
|
|
procedure TfEditorPedidosProveedorPreview.SetVerPrecios(const Value: Boolean);
|
|
begin
|
|
FVerPrecios := Value;
|
|
end;
|
|
|
|
procedure TfEditorPedidosProveedorPreview.SetVerRefProveedor(
|
|
const Value: Boolean);
|
|
begin
|
|
FVerRefProveedor := Value;
|
|
end;
|
|
|
|
end.
|