Tecsitel_FactuGES2/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesClienteReport.pas
2013-03-11 16:10:38 +00:00

78 lines
2.4 KiB
ObjectPascal

unit uEditorAlbaranesClienteReport;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uEditorPreview, frxExportImage, frxExportPDF, frxDCtrl, frxClass,
// frxDMPExport, frxGradient, frxChBox, frxCross, frxRich, frxChart, frxOLE,
// frxBarcode, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
JvFormPlacement, ImgList, PngImageList, StdActns, ActnList, ComCtrls,
TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage,
ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorAlbaranesClientePreview,
JvExComCtrls, JvStatusBar, frxDMPExport, frxGradient, frxChBox, frxCross,
frxRich, frxOLE, frxBarcode, JvAppStorage, JvAppRegistryStorage,
JvComponentBase, frxExportText, frxExportRTF, frxExportMail, frxExportXLS;
type
TfEditorAlbaranesClientePreview = class(TfEditorPreview, IEditorAlbaranesClientePreview)
TBXItem58: TTBXItem;
procedure actExportarRTFExecute(Sender: TObject);
private
FVerPrecios : Boolean;
FVerRef : Boolean;
function GetVerPrecios: Boolean;
function GetVerRef: Boolean;
procedure SetVerPrecios(const Value: Boolean);
procedure SetVerRef(const Value: Boolean);
published
public
property VerPrecios : Boolean read GetVerPrecios write SetVerPrecios;
property VerRef : Boolean read GetVerRef write SetVerRef;
end;
implementation
{$R *.dfm}
uses
uAlbaranesClienteReportController, uDialogUtils;
procedure TfEditorAlbaranesClientePreview.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 IAlbaranesClienteReportController).ExportToWord(ListaID[I], '', FVerPrecios, FVerRef) then
ShowInfoMessage('El albarán se ha exportado correctamente.');
end;
function TfEditorAlbaranesClientePreview.GetVerPrecios: Boolean;
begin
Result := FVerPrecios;
end;
function TfEditorAlbaranesClientePreview.GetVerRef: Boolean;
begin
Result := FVerRef;
end;
procedure TfEditorAlbaranesClientePreview.SetVerPrecios(const Value: Boolean);
begin
FVerPrecios := Value;
end;
procedure TfEditorAlbaranesClientePreview.SetVerRef(const Value: Boolean);
begin
FVerRef := Value;
end;
end.