#12 -> Enviar documentos por correo electrónico. Habilitado para presupuestos.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@523 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
5bce128d8a
commit
1b8f4b9978
BIN
Resources/Iconos/Generales/16x16/Mail.png
Normal file
BIN
Resources/Iconos/Generales/16x16/Mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 592 B |
BIN
Resources/Iconos/Generales/24x24/Mail.png
Normal file
BIN
Resources/Iconos/Generales/24x24/Mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 775 B |
BIN
Resources/Iconos/Generales/28x28/Mail.png
Normal file
BIN
Resources/Iconos/Generales/28x28/Mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 976 B |
@ -9,8 +9,8 @@ const
|
||||
{ Data table rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_Empresas = '{44B01133-DAC4-424A-9152-B369DB57858D}';
|
||||
RID_EmpresasDatosBanco = '{FA3FAB23-9A95-4DD2-8AF7-046B04689D22}';
|
||||
RID_Empresas = '{A8F0968B-4560-4FD7-BE09-BEC55C3721E1}';
|
||||
RID_EmpresasDatosBanco = '{98CA76B7-E2D1-40CA-B5A4-B6F4B99E2B5B}';
|
||||
|
||||
{ Data table names }
|
||||
nme_Empresas = 'Empresas';
|
||||
@ -99,7 +99,7 @@ const
|
||||
type
|
||||
{ IEmpresas }
|
||||
IEmpresas = interface(IDAStronglyTypedDataTable)
|
||||
['{1ACDCBE0-0B63-44A7-974E-40FB704DE038}']
|
||||
['{550BD567-4A92-49E1-BC8B-2F778AF6F0F9}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -422,7 +422,7 @@ type
|
||||
|
||||
{ IEmpresasDatosBanco }
|
||||
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
|
||||
['{5FEF9BFD-162A-4DBA-9B7B-6F99C3672E57}']
|
||||
['{FFBC96B5-51B6-4442-B217-46FF792D7D5C}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
|
||||
@ -9,13 +9,13 @@ const
|
||||
{ Delta rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_EmpresasDelta = '{56A33A56-CCD5-4F9C-A1AE-2A164D288BB2}';
|
||||
RID_EmpresasDatosBancoDelta = '{0B56774E-9818-404A-AB4E-F54B831D2794}';
|
||||
RID_EmpresasDelta = '{2FA42162-1747-4229-9EFB-41D49D7A0177}';
|
||||
RID_EmpresasDatosBancoDelta = '{AF1B9412-6CE5-479C-A1E3-FEFDF3EE87A6}';
|
||||
|
||||
type
|
||||
{ IEmpresasDelta }
|
||||
IEmpresasDelta = interface(IEmpresas)
|
||||
['{56A33A56-CCD5-4F9C-A1AE-2A164D288BB2}']
|
||||
['{2FA42162-1747-4229-9EFB-41D49D7A0177}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldNIF_CIFValue : String;
|
||||
@ -339,7 +339,7 @@ type
|
||||
|
||||
{ IEmpresasDatosBancoDelta }
|
||||
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
|
||||
['{0B56774E-9818-404A-AB4E-F54B831D2794}']
|
||||
['{AF1B9412-6CE5-479C-A1E3-FEFDF3EE87A6}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_EMPRESAValue : Integer;
|
||||
|
||||
@ -111,6 +111,7 @@ contains
|
||||
uRTFUtils in 'Utiles\uRTFUtils.pas',
|
||||
ClipboardUtils in 'Utiles\ClipboardUtils.pas',
|
||||
uGridClipboardUtils in 'Utiles\uGridClipboardUtils.pas',
|
||||
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas';
|
||||
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas',
|
||||
uEMailUtils in 'Utiles\uEMailUtils.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -53,57 +53,6 @@
|
||||
<DelphiCompile Include="Base.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\adortl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxIntl6D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxIntlPrintSys3D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\dclIndyCore.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\designide.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\dsnap.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\GUISDK_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\IndyCore.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\IndyProtocols.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\IndySystem.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\Jcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JclVcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JSDialog100.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvMMD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvNetD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\pckMD5.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\RemObjects_Indy_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\rtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\TB2k_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\vcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\vcldb.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\VclSmp.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\vclx.dcp" />
|
||||
<DCCReference Include="..\Modulos\Relaciones\Albaranes de cliente - Facturas de cliente\xmlrtl.dcp" />
|
||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||
<Form>fConfigurarConexion</Form>
|
||||
@ -128,18 +77,63 @@
|
||||
<Form>dmBase</Form>
|
||||
<DesignClass>TDataModule</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="Utiles\adortl.dcp" />
|
||||
<DCCReference Include="Utiles\ClassRegistry\uClassRegistryUtils.pas" />
|
||||
<DCCReference Include="Utiles\ClassRegistry\uEditorRegistryUtils.pas" />
|
||||
<DCCReference Include="Utiles\ClassRegistry\uInformeRegistryUtils.pas" />
|
||||
<DCCReference Include="Utiles\ClassRegistry\uViewRegistryUtils.pas" />
|
||||
<DCCReference Include="Utiles\ClipboardUtils.pas" />
|
||||
<DCCReference Include="Utiles\Ctltortf.pas" />
|
||||
<DCCReference Include="Utiles\cxDataD11.dcp" />
|
||||
<DCCReference Include="Utiles\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="Utiles\cxExportD11.dcp" />
|
||||
<DCCReference Include="Utiles\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="Utiles\cxGridD11.dcp" />
|
||||
<DCCReference Include="Utiles\cxIntl6D11.dcp" />
|
||||
<DCCReference Include="Utiles\cxIntlPrintSys3D11.dcp" />
|
||||
<DCCReference Include="Utiles\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="Utiles\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="Utiles\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="Utiles\dbrtl.dcp" />
|
||||
<DCCReference Include="Utiles\dclIndyCore.dcp" />
|
||||
<DCCReference Include="Utiles\designide.dcp" />
|
||||
<DCCReference Include="Utiles\dsnap.dcp" />
|
||||
<DCCReference Include="Utiles\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="Utiles\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="Utiles\dxThemeD11.dcp" />
|
||||
<DCCReference Include="Utiles\GUISDK_D11.dcp" />
|
||||
<DCCReference Include="Utiles\IndyCore.dcp" />
|
||||
<DCCReference Include="Utiles\IndyProtocols.dcp" />
|
||||
<DCCReference Include="Utiles\IndySystem.dcp" />
|
||||
<DCCReference Include="Utiles\Jcl.dcp" />
|
||||
<DCCReference Include="Utiles\JclVcl.dcp" />
|
||||
<DCCReference Include="Utiles\JSDialog100.dcp" />
|
||||
<DCCReference Include="Utiles\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvMMD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvNetD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="Utiles\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="Utiles\pckMD5.dcp" />
|
||||
<DCCReference Include="Utiles\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="Utiles\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="Utiles\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="Utiles\PNG_D10.dcp" />
|
||||
<DCCReference Include="Utiles\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="Utiles\RemObjects_Indy_D11.dcp" />
|
||||
<DCCReference Include="Utiles\rtl.dcp" />
|
||||
<DCCReference Include="Utiles\TB2k_D10.dcp" />
|
||||
<DCCReference Include="Utiles\tbx_d10.dcp" />
|
||||
<DCCReference Include="Utiles\uAppInfoUtils.pas" />
|
||||
<DCCReference Include="Utiles\uCalculosUtils.pas" />
|
||||
<DCCReference Include="Utiles\uDataTableUtils.pas" />
|
||||
<DCCReference Include="Utiles\uDateUtils.pas" />
|
||||
<DCCReference Include="Utiles\uDBSelectionListUtils.pas" />
|
||||
<DCCReference Include="Utiles\uDialogUtils.pas" />
|
||||
<DCCReference Include="Utiles\uEMailUtils.pas" />
|
||||
<DCCReference Include="Utiles\uGridClipboardUtils.pas" />
|
||||
<DCCReference Include="Utiles\uGridStatusUtils.pas" />
|
||||
<DCCReference Include="Utiles\uInfoProjectUtils.pas" />
|
||||
@ -151,6 +145,13 @@
|
||||
<DCCReference Include="Utiles\uRTFUtils.pas" />
|
||||
<DCCReference Include="Utiles\uSistemaFunc.pas" />
|
||||
<DCCReference Include="Utiles\uStringsUtils.pas" />
|
||||
<DCCReference Include="Utiles\vcl.dcp" />
|
||||
<DCCReference Include="Utiles\vclactnband.dcp" />
|
||||
<DCCReference Include="Utiles\vcldb.dcp" />
|
||||
<DCCReference Include="Utiles\vcljpg.dcp" />
|
||||
<DCCReference Include="Utiles\VclSmp.dcp" />
|
||||
<DCCReference Include="Utiles\vclx.dcp" />
|
||||
<DCCReference Include="Utiles\xmlrtl.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- EurekaLog First Line
|
||||
|
||||
156
Source/Base/Utiles/uEMailUtils.pas
Normal file
156
Source/Base/Utiles/uEMailUtils.pas
Normal file
@ -0,0 +1,156 @@
|
||||
unit uEMailUtils;
|
||||
|
||||
interface
|
||||
|
||||
function IsValidEmail(const Value: string): boolean;
|
||||
function SendMailMAPI(const Subject, Body, FileName, SenderName, SenderEMail,
|
||||
RecepientName, RecepientEMail: String) : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Windows, SysUtils, MAPI, Forms, Dialogs;
|
||||
|
||||
function IsValidEmail(const Value: string): boolean;
|
||||
function CheckAllowed(const s: string): boolean;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
Result:= false;
|
||||
for i:= 1 to Length(s) do
|
||||
begin
|
||||
// illegal char in s -> no valid address
|
||||
if not (s[i] in ['a'..'z','A'..'Z','0'..'9','_','-','.']) then
|
||||
Exit;
|
||||
end;
|
||||
Result:= true;
|
||||
end;
|
||||
var
|
||||
i: integer;
|
||||
namePart, serverPart: string;
|
||||
begin // of IsValidEmail
|
||||
Result:= false;
|
||||
i:= Pos('@', Value);
|
||||
if (i = 0) or (pos('..', Value) > 0) then
|
||||
Exit;
|
||||
namePart:= Copy(Value, 1, i - 1);
|
||||
serverPart:= Copy(Value, i + 1, Length(Value));
|
||||
if (Length(namePart) = 0) // @ or name missing
|
||||
or ((Length(serverPart) < 4)) // name or server missing or
|
||||
then Exit; // too short
|
||||
i:= Pos('.', serverPart);
|
||||
// must have dot and at least 3 places from end
|
||||
if (i < 2) or (i > (Length(serverPart) - 2)) then
|
||||
Exit;
|
||||
Result:= CheckAllowed(namePart) and CheckAllowed(serverPart);
|
||||
end;
|
||||
|
||||
function SendMailMAPI(const Subject, Body, FileName, SenderName, SenderEMail,
|
||||
RecepientName, RecepientEMail: String) : Boolean;
|
||||
var
|
||||
message: TMapiMessage;
|
||||
lpSender,
|
||||
lpRecepient: TMapiRecipDesc;
|
||||
FileAttach: TMapiFileDesc;
|
||||
SM: TFNMapiSendMail;
|
||||
MAPIModule: HModule;
|
||||
ErrorCode : Integer;
|
||||
begin
|
||||
FillChar(message, SizeOf(message), 0);
|
||||
with message do
|
||||
begin
|
||||
if (Subject<>'') then
|
||||
begin
|
||||
lpszSubject := PChar(Subject)
|
||||
end;
|
||||
if (Body<>'') then
|
||||
begin
|
||||
lpszNoteText := PChar(Body)
|
||||
end;
|
||||
if (SenderEMail<>'') then
|
||||
begin
|
||||
lpSender.ulRecipClass := MAPI_ORIG;
|
||||
if (SenderName='') then
|
||||
begin
|
||||
lpSender.lpszName := PChar(SenderEMail)
|
||||
end
|
||||
else
|
||||
begin
|
||||
lpSender.lpszName := PChar(SenderName)
|
||||
end;
|
||||
lpSender.lpszAddress := PChar('SMTP:'+SenderEMail);
|
||||
lpSender.ulReserved := 0;
|
||||
lpSender.ulEIDSize := 0;
|
||||
lpSender.lpEntryID := nil;
|
||||
lpOriginator := @lpSender;
|
||||
end;
|
||||
if (RecepientEMail<>'') then
|
||||
begin
|
||||
lpRecepient.ulRecipClass := MAPI_TO;
|
||||
if (RecepientName='') then
|
||||
begin
|
||||
lpRecepient.lpszName := PChar(RecepientEMail)
|
||||
end
|
||||
else
|
||||
begin
|
||||
lpRecepient.lpszName := PChar(RecepientName)
|
||||
end;
|
||||
lpRecepient.lpszAddress := PChar('SMTP:'+RecepientEMail);
|
||||
lpRecepient.ulReserved := 0;
|
||||
lpRecepient.ulEIDSize := 0;
|
||||
lpRecepient.lpEntryID := nil;
|
||||
nRecipCount := 1;
|
||||
lpRecips := @lpRecepient;
|
||||
end
|
||||
else
|
||||
begin
|
||||
lpRecips := nil
|
||||
end;
|
||||
if (FileName='') then
|
||||
begin
|
||||
nFileCount := 0;
|
||||
lpFiles := nil;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FillChar(FileAttach, SizeOf(FileAttach), 0);
|
||||
FileAttach.nPosition := Cardinal($FFFFFFFF);
|
||||
FileAttach.lpszPathName := PChar(FileName);
|
||||
nFileCount := 1;
|
||||
lpFiles := @FileAttach;
|
||||
end;
|
||||
end;
|
||||
MAPIModule := LoadLibrary(PChar(MAPIDLL));
|
||||
if MAPIModule=0 then
|
||||
begin
|
||||
ErrorCode := -1
|
||||
end
|
||||
else
|
||||
begin
|
||||
try
|
||||
@SM := GetProcAddress(MAPIModule, 'MAPISendMail');
|
||||
if @SM<>nil then
|
||||
begin
|
||||
ErrorCode := SM(0, Application.Handle, message, MAPI_DIALOG or MAPI_LOGON_UI, 0);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ErrorCode := 1
|
||||
end;
|
||||
|
||||
finally
|
||||
FreeLibrary(MAPIModule);
|
||||
end;
|
||||
end;
|
||||
|
||||
if ErrorCode <> 0 then
|
||||
begin
|
||||
MessageDlg('Error sending mail (' + IntToStr(ErrorCode) + ').', mtError, [mbOk], 0);
|
||||
Result := False;
|
||||
end
|
||||
else
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
@ -35,6 +35,8 @@ function DarFicheroBMPTemporal : String;
|
||||
function DarFicheroTIFFTemporal : String;
|
||||
function DarFicheroHTMLTemporal : String;
|
||||
function DarFicheroExcelTemporal : String;
|
||||
function DarFicheroPDFTemporal : String; overload;
|
||||
function DarFicheroPDFTemporal(const AFileName : String) : String; overload;
|
||||
function DarVersionFichero (Executable : String) : String;
|
||||
function DarFechaFichero (Executable : String) : String;
|
||||
procedure CopiarFichero(const Origen, Destino: string);
|
||||
@ -52,7 +54,7 @@ uses
|
||||
SysUtils, Windows, Dialogs, JclFileUtils,
|
||||
Messages, Classes, Graphics, Controls, Forms,
|
||||
StdCtrls, SHFolder, cxShellBrowserDialog,
|
||||
cxLookAndFeels;
|
||||
cxLookAndFeels, uStringsUtils;
|
||||
|
||||
|
||||
function GetSpecialFolderPath(folder : integer) : string;
|
||||
@ -143,6 +145,31 @@ begin
|
||||
Result := Copy(Cadena, 0, (Length(Cadena)-3)) + 'tif';
|
||||
end;
|
||||
|
||||
function DarFicheroPDFTemporal : String;
|
||||
var
|
||||
Cadena : String;
|
||||
begin
|
||||
Cadena := DarFicheroTemporal;
|
||||
Result := Copy(Cadena, 0, (Length(Cadena)-3)) + 'pdf';
|
||||
end;
|
||||
|
||||
function DarFicheroPDFTemporal(const AFileName : String) : String;
|
||||
var
|
||||
Cadena : String;
|
||||
RutaTmp : string;
|
||||
Buf: array [0..MAX_PATH] of Char;
|
||||
begin
|
||||
if not EsCadenaVacia(AFileName) then
|
||||
begin
|
||||
RutaTmp := DarRutaTemporal + PathDelim;
|
||||
Cadena := ExtractFileName(AFileName);
|
||||
Cadena := StringReplace(Cadena, ExtractFileExt(Cadena), '', []);
|
||||
Result := RutaTmp + Cadena + '.pdf';
|
||||
end
|
||||
else
|
||||
Result := DarFicheroPDFTemporal;
|
||||
end;
|
||||
|
||||
function DarFicheroBMPTemporal : String;
|
||||
var
|
||||
Cadena : String;
|
||||
|
||||
@ -96,6 +96,7 @@ contains
|
||||
uDialogBase in 'uDialogBase.pas' {fDialogBase},
|
||||
uViewFiltroBase in 'uViewFiltroBase.pas' {frViewFiltroBase: TFrame},
|
||||
uViewGrid in 'uViewGrid.pas' {frViewGrid: TFrame},
|
||||
uViewRichEditor in 'uViewRichEditor.pas' {frViewRichEditor: TCustomView};
|
||||
uViewRichEditor in 'uViewRichEditor.pas' {frViewRichEditor: TCustomView},
|
||||
uDialogElegirEMail in 'uDialogElegirEMail.pas' {fDialogElegirEMail};
|
||||
|
||||
end.
|
||||
|
||||
@ -58,55 +58,54 @@
|
||||
<DelphiCompile Include="GUIBase.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxBarD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxBarExtItemsD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxComnD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxPScxCommonD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxPScxGrid6LnkD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxPsPrVwAdvD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinBlackD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinBlueD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinCaramelD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinCoffeeD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinGlassOceansD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkiniMaginaryD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinLilianD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinLiquidSkyD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinLondonLiquidSkyD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinMcSkinD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinMoneyTwinsD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007BlackD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007BlueD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007GreenD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007PinkD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007SilverD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinsCoreD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinscxPCPainterD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinsdxLCPainterD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinSilverD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinStardustD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinValentineD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinXmas2008BlueD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\frx11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\frxe11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\fs11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvAppFrmD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
|
||||
<DCCReference Include="Base.dcp" />
|
||||
<DCCReference Include="cxLibraryD11.dcp" />
|
||||
<DCCReference Include="dbrtl.dcp" />
|
||||
<DCCReference Include="dxBarD11.dcp" />
|
||||
<DCCReference Include="dxBarExtItemsD11.dcp" />
|
||||
<DCCReference Include="dxComnD11.dcp" />
|
||||
<DCCReference Include="dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="dxPScxCommonD11.dcp" />
|
||||
<DCCReference Include="dxPScxGrid6LnkD11.dcp" />
|
||||
<DCCReference Include="dxPsPrVwAdvD11.dcp" />
|
||||
<DCCReference Include="dxSkinBlackD11.dcp" />
|
||||
<DCCReference Include="dxSkinBlueD11.dcp" />
|
||||
<DCCReference Include="dxSkinCaramelD11.dcp" />
|
||||
<DCCReference Include="dxSkinCoffeeD11.dcp" />
|
||||
<DCCReference Include="dxSkinGlassOceansD11.dcp" />
|
||||
<DCCReference Include="dxSkiniMaginaryD11.dcp" />
|
||||
<DCCReference Include="dxSkinLilianD11.dcp" />
|
||||
<DCCReference Include="dxSkinLiquidSkyD11.dcp" />
|
||||
<DCCReference Include="dxSkinLondonLiquidSkyD11.dcp" />
|
||||
<DCCReference Include="dxSkinMcSkinD11.dcp" />
|
||||
<DCCReference Include="dxSkinMoneyTwinsD11.dcp" />
|
||||
<DCCReference Include="dxSkinOffice2007BlackD11.dcp" />
|
||||
<DCCReference Include="dxSkinOffice2007BlueD11.dcp" />
|
||||
<DCCReference Include="dxSkinOffice2007GreenD11.dcp" />
|
||||
<DCCReference Include="dxSkinOffice2007PinkD11.dcp" />
|
||||
<DCCReference Include="dxSkinOffice2007SilverD11.dcp" />
|
||||
<DCCReference Include="dxSkinsCoreD11.dcp" />
|
||||
<DCCReference Include="dxSkinscxPCPainterD11.dcp" />
|
||||
<DCCReference Include="dxSkinsdxLCPainterD11.dcp" />
|
||||
<DCCReference Include="dxSkinSilverD11.dcp" />
|
||||
<DCCReference Include="dxSkinStardustD11.dcp" />
|
||||
<DCCReference Include="dxSkinValentineD11.dcp" />
|
||||
<DCCReference Include="dxSkinXmas2008BlueD11.dcp" />
|
||||
<DCCReference Include="dxThemeD11.dcp" />
|
||||
<DCCReference Include="frx11.dcp" />
|
||||
<DCCReference Include="frxe11.dcp" />
|
||||
<DCCReference Include="fs11.dcp" />
|
||||
<DCCReference Include="JvAppFrmD11R.dcp" />
|
||||
<DCCReference Include="JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="uDialogBase.pas">
|
||||
<Form>fDialogBase</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uDialogElegirEMail.pas">
|
||||
<Form>fDialogElegirEMail</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorBase.pas">
|
||||
<Form>fEditorBase</Form>
|
||||
<DesignClass>TCustomEditor</DesignClass>
|
||||
@ -194,6 +193,10 @@
|
||||
<Form>frViewTotales</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
<DCCReference Include="vcldb.dcp" />
|
||||
<DCCReference Include="vcljpg.dcp" />
|
||||
<DCCReference Include="vclx.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- EurekaLog First Line
|
||||
|
||||
@ -36,7 +36,9 @@ object fDialogBase: TfDialogBase
|
||||
Width = 75
|
||||
Height = 25
|
||||
Action = actCancelar
|
||||
TabOrder = 0
|
||||
Cancel = True
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
AlignWithMargins = True
|
||||
@ -49,7 +51,8 @@ object fDialogBase: TfDialogBase
|
||||
Margins.Right = 15
|
||||
Margins.Bottom = 0
|
||||
Action = actAceptar
|
||||
TabOrder = 1
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object FlowPanel1: TFlowPanel
|
||||
|
||||
108
Source/GUIBase/uDialogElegirEMail.dfm
Normal file
108
Source/GUIBase/uDialogElegirEMail.dfm
Normal file
@ -0,0 +1,108 @@
|
||||
inherited fDialogElegirEMail: TfDialogElegirEMail
|
||||
Caption = 'Elegir direcci'#243'n de correo electr'#243'nico'
|
||||
ClientHeight = 220
|
||||
ClientWidth = 533
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
ExplicitWidth = 539
|
||||
ExplicitHeight = 252
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited pnlBotones: TFlowPanel
|
||||
Top = 164
|
||||
Width = 533
|
||||
inherited Button1: TButton
|
||||
Left = 437
|
||||
TabOrder = 1
|
||||
ExplicitLeft = 437
|
||||
end
|
||||
inherited Button2: TButton
|
||||
Left = 347
|
||||
TabOrder = 0
|
||||
ExplicitLeft = 347
|
||||
end
|
||||
end
|
||||
inherited FlowPanel1: TFlowPanel
|
||||
Width = 533
|
||||
Height = 164
|
||||
ExplicitTop = -6
|
||||
inherited lblInstruccion: TLabel
|
||||
Width = 411
|
||||
Caption = 'Indique la direcci'#243'n de correo electr'#243'nico del destinatario:'
|
||||
ExplicitWidth = 411
|
||||
end
|
||||
inherited Label2: TLabel
|
||||
Height = 3
|
||||
Visible = False
|
||||
ExplicitHeight = 3
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 31
|
||||
Top = 73
|
||||
Width = 482
|
||||
Height = 80
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object rbCombo: TRadioButton
|
||||
Tag = 1
|
||||
Left = 10
|
||||
Top = 6
|
||||
Width = 170
|
||||
Height = 17
|
||||
Caption = 'Usar esta direcci'#243'n de correo:'
|
||||
TabOrder = 0
|
||||
OnClick = rbComboClick
|
||||
end
|
||||
object cbEMail: TComboBox
|
||||
Left = 211
|
||||
Top = 6
|
||||
Width = 262
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
TabOrder = 1
|
||||
end
|
||||
object rbEdit: TRadioButton
|
||||
Tag = 2
|
||||
Left = 10
|
||||
Top = 41
|
||||
Width = 202
|
||||
Height = 17
|
||||
Caption = 'Usar la siguiente direcci'#243'n de correo:'
|
||||
TabOrder = 2
|
||||
OnClick = rbEditClick
|
||||
end
|
||||
object edtEMail: TcxHyperLinkEdit
|
||||
Left = 211
|
||||
Top = 39
|
||||
Properties.UsePrefix = upNever
|
||||
Properties.ValidateOnEnter = True
|
||||
Properties.OnValidate = edtEMailPropertiesValidate
|
||||
Properties.Prefix = ''
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 3
|
||||
Width = 262
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ActionList1: TActionList
|
||||
Left = 8
|
||||
Top = 8
|
||||
inherited actAceptar: TAction
|
||||
OnExecute = actAceptarExecute
|
||||
end
|
||||
inherited actCancelar: TAction
|
||||
OnExecute = actCancelarExecute
|
||||
end
|
||||
end
|
||||
end
|
||||
178
Source/GUIBase/uDialogElegirEMail.pas
Normal file
178
Source/GUIBase/uDialogElegirEMail.pas
Normal file
@ -0,0 +1,178 @@
|
||||
unit uDialogElegirEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, dxSkinsCore, dxSkinBlue,
|
||||
dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian,
|
||||
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
|
||||
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust,
|
||||
dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue, cxControls,
|
||||
cxContainer, cxEdit, cxTextEdit, cxHyperLinkEdit;
|
||||
|
||||
type
|
||||
TfDialogElegirEMail = class(TfDialogBase)
|
||||
Panel1: TPanel;
|
||||
rbCombo: TRadioButton;
|
||||
cbEMail: TComboBox;
|
||||
rbEdit: TRadioButton;
|
||||
edtEMail: TcxHyperLinkEdit;
|
||||
procedure rbComboClick(Sender: TObject);
|
||||
procedure rbEditClick(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure edtEMailPropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actAceptarExecute(Sender: TObject);
|
||||
procedure actCancelarExecute(Sender: TObject);
|
||||
private
|
||||
FListaDirecciones: TStringList;
|
||||
function GetEMailElegido: String;
|
||||
procedure ActualizarOpciones;
|
||||
public
|
||||
property EMailElegido: String read GetEMailElegido;
|
||||
property ListaDirecciones : TStringList read FListaDirecciones write FListaDirecciones;
|
||||
end;
|
||||
|
||||
|
||||
function ElegirEMail(const AListaEMails : TStringList; var AEMailElegido : String): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uStringsUtils, uDialogUtils, uEMailUtils;
|
||||
|
||||
function ElegirEMail(const AListaEMails : TStringList; var AEMailElegido : String): Boolean;
|
||||
var
|
||||
AEditor : TfDialogElegirEMail;
|
||||
begin
|
||||
AEditor := TfDialogElegirEMail.Create(NIL);
|
||||
try
|
||||
AEditor.ListaDirecciones := AListaEMails;
|
||||
Result := (AEditor.ShowModal = mrOk);
|
||||
if Result then
|
||||
AEMailElegido := AEditor.EMailElegido;
|
||||
finally
|
||||
AEditor.Release;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TfDialogElegirEMail }
|
||||
|
||||
procedure TfDialogElegirEMail.actAceptarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrOk
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.actCancelarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrCancel;
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.ActualizarOpciones;
|
||||
begin
|
||||
if rbEdit.Checked then
|
||||
begin
|
||||
edtEMail.Enabled := True;
|
||||
rbCombo.Checked := False;
|
||||
cbEMail.Enabled := False;
|
||||
end
|
||||
else begin
|
||||
if rbCombo.Enabled then
|
||||
begin
|
||||
cbEMail.Enabled := True;
|
||||
edtEMail.Enabled := False;
|
||||
rbEdit.Checked := False;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.edtEMailPropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
begin
|
||||
if not VarIsNull(DisplayValue) then
|
||||
begin
|
||||
Error := not IsValidEmail(DisplayValue);
|
||||
ErrorText := 'La dirección de correo electrónica no es válida. Compruebe que está bien escrita.';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.FormCloseQuery(Sender: TObject;
|
||||
var CanClose: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
if rbEdit.Checked and EsCadenaVacia(edtEMail.Text) then
|
||||
begin
|
||||
ShowErrorMessage('Elegir dirección de correo electrónico', 'Debe indicar una dirección de correo electrónico.');
|
||||
edtEMail.SetFocus;
|
||||
CanClose := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
//FListaDirecciones := TStringList.Create; <- La lista se da mediante la propiedad.
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
//FreeAndNIL(FListaDirecciones) <- La lista se da mediante la propiedad.
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.FormShow(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
inherited;
|
||||
cbEMail.Items.Clear;
|
||||
cbEMail.Items := FListaDirecciones;
|
||||
|
||||
if cbEMail.Items.Count = 0 then
|
||||
begin
|
||||
rbCombo.Enabled := False;
|
||||
rbEdit.Checked;
|
||||
end;
|
||||
|
||||
if cbEMail.Items.Count > 0 then
|
||||
begin
|
||||
cbEMail.ItemIndex := 0;
|
||||
rbCombo.Checked := True;
|
||||
end;
|
||||
|
||||
ActualizarOpciones;
|
||||
end;
|
||||
|
||||
function TfDialogElegirEMail.GetEMailElegido: String;
|
||||
begin
|
||||
if rbCombo.Checked then
|
||||
Result := cbEMail.Text
|
||||
else
|
||||
Result := edtEMail.Text;
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.rbComboClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
rbEdit.Checked := False;
|
||||
ActualizarOpciones;
|
||||
end;
|
||||
|
||||
procedure TfDialogElegirEMail.rbEditClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
rbEdit.Checked := True;
|
||||
ActualizarOpciones;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -51,6 +51,7 @@ type
|
||||
|
||||
procedure Preview(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
||||
procedure Print(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
||||
procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente);
|
||||
function GenerarCertificados(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false): Boolean;
|
||||
function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean;
|
||||
end;
|
||||
@ -115,6 +116,7 @@ type
|
||||
procedure Preview(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
||||
procedure Print(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
||||
function GenerarCertificados(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false): Boolean;
|
||||
procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente);
|
||||
function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean;
|
||||
end;
|
||||
|
||||
@ -127,7 +129,7 @@ uses
|
||||
schPresupuestosClienteClient_Intf, uDAInterfaces, uDateUtils, uIEditorPresupuestoCliente,
|
||||
uIEditorElegirPresupuestosCliente, uIEditorDireccionEntregaPresupuestoCliente,
|
||||
schContactosClient_Intf, uPresupuestosClienteReportController,
|
||||
uSistemaFunc;
|
||||
uSistemaFunc, uEMailUtils, uDialogElegirEMail;
|
||||
|
||||
{ TPresupuestosClienteController }
|
||||
|
||||
@ -595,6 +597,47 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPresupuestosClienteController.EnviarPresupuestoPorEMail(
|
||||
APresupuesto: IBizPresupuestoCliente);
|
||||
var
|
||||
AReportController : IPresupuestosClienteReportController;
|
||||
AFicheroTMP : TFileName;
|
||||
AEMail : String;
|
||||
AListaEmail : TStringList;
|
||||
begin
|
||||
if not Assigned(APresupuesto) then
|
||||
raise Exception.Create ('Presupuesto no asignado (EnviarPresupuestoPorEMail)');
|
||||
|
||||
if APresupuesto.DataTable.Active then
|
||||
APresupuesto.DataTable.Active := True;
|
||||
|
||||
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(APresupuesto.REFERENCIA));
|
||||
|
||||
AListaEmail := TStringList.Create;
|
||||
try
|
||||
if not APresupuesto.Cliente.EMAIL_1IsNull then
|
||||
AListaEmail.Add(APresupuesto.Cliente.EMAIL_1);
|
||||
if not APresupuesto.Cliente.EMAIL_2IsNull then
|
||||
AListaEmail.Add(APresupuesto.Cliente.EMAIL_2);
|
||||
|
||||
if not ElegirEMail(AListaEmail, AEMail) then
|
||||
Exit;
|
||||
finally
|
||||
FreeANDNIL(AListaEmail);
|
||||
end;
|
||||
|
||||
ShowHourglassCursor;
|
||||
AReportController := TPresupuestosClienteReportController.Create;
|
||||
try
|
||||
AReportController.ExportToPDF(APresupuesto.ID, AFicheroTMP);
|
||||
SendMailMAPI('Presupuesto ' + APresupuesto.REFERENCIA, '', AFicheroTMP, '', '', APresupuesto.Cliente.NOMBRE, AEMail);
|
||||
finally
|
||||
DeleteFile(AFicheroTMP);
|
||||
AReportController := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPresupuestosClienteController.EsEliminable(APresupuesto: IBizPresupuestoCliente): Boolean;
|
||||
begin
|
||||
if not Assigned(APresupuesto) then
|
||||
|
||||
@ -13,6 +13,7 @@ type
|
||||
procedure Preview(const AListaID : String);
|
||||
procedure Print(const AListaID : String);
|
||||
function ExportToWord(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function GenerarCertificados(const AID: Integer; const AFileName : String): Boolean;
|
||||
end;
|
||||
|
||||
@ -27,6 +28,7 @@ type
|
||||
procedure Preview(const AListaID : String);
|
||||
procedure Print(const AListaID : String);
|
||||
function ExportToWord(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function GenerarCertificados(const AID: Integer; const AFileName : String): Boolean;
|
||||
end;
|
||||
|
||||
@ -58,6 +60,32 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TPresupuestosClienteReportController.ExportToPDF(const AID: Integer;
|
||||
const AFileName: String): Boolean;
|
||||
var
|
||||
AStream: Binary;
|
||||
ID_Presupuestos: TStringList;
|
||||
begin
|
||||
Result := False;
|
||||
if EsCadenaVacia(AFileName) then
|
||||
Exit;
|
||||
|
||||
ID_Presupuestos := TStringList.Create;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
ID_Presupuestos.Add(IntToStr(AID));
|
||||
AStream := FDataModule.GetRptPDFPresupuesto(ID_Presupuestos.CommaText);
|
||||
try
|
||||
AStream.SaveToFile(AFileName);
|
||||
Result := True;
|
||||
finally
|
||||
FreeAndNil(AStream);
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPresupuestosClienteReportController.ExportToWord(const AID: Integer; const AFileName : String) : Boolean;
|
||||
var
|
||||
AStream: Binary;
|
||||
@ -149,14 +177,14 @@ begin
|
||||
try
|
||||
CreateEditor('EditorPresupuestosClientePreview', IEditorPresupuestosClientePreview, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
with AEditor do
|
||||
begin
|
||||
AEditor.Controller := Self;
|
||||
AEditor.ListaID := AListaID;
|
||||
AEditor.LoadFromStream(AStream);
|
||||
AEditor.Print;
|
||||
AEditor.Release;
|
||||
end;
|
||||
with AEditor do
|
||||
begin
|
||||
AEditor.Controller := Self;
|
||||
AEditor.ListaID := AListaID;
|
||||
AEditor.LoadFromStream(AStream);
|
||||
AEditor.Print;
|
||||
AEditor.Release;
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(AStream);
|
||||
AEditor := Nil;
|
||||
|
||||
@ -38,7 +38,8 @@ type
|
||||
// Report
|
||||
function GetRptPresupuestos(const AListaID: String): Binary;
|
||||
function GetRptWordPresupuesto(const AID: Integer): Binary;
|
||||
function GetRptWordCertificadoTrabajos(const AID: Integer): Binary;
|
||||
function GetRptWordCertificadoTrabajos(const AID: Integer): Binary;
|
||||
function GetRptPDFPresupuesto(const AListaID: String): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -62,9 +63,15 @@ begin
|
||||
RORemoteService.Message := dmConexion.Message;
|
||||
end;
|
||||
|
||||
function TDataModulePresupuestosCliente.GetRptPDFPresupuesto(
|
||||
const AListaID: String): Binary;
|
||||
begin
|
||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInformeEnPDF(AListaID)
|
||||
end;
|
||||
|
||||
function TDataModulePresupuestosCliente.GetRptPresupuestos(const AListaID: String): Binary;
|
||||
begin
|
||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerateReport(AListaID)
|
||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInforme(AListaID)
|
||||
end;
|
||||
|
||||
function TDataModulePresupuestosCliente.GetRptWordCertificadoTrabajos(
|
||||
@ -76,7 +83,7 @@ end;
|
||||
function TDataModulePresupuestosCliente.GetRptWordPresupuesto(
|
||||
const AID: Integer): Binary;
|
||||
begin
|
||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerateReportEnWord(AID)
|
||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInformeEnWord(AID)
|
||||
end;
|
||||
|
||||
function TDataModulePresupuestosCliente.NewItem: IBizPresupuestoCliente;
|
||||
|
||||
@ -10,7 +10,8 @@ type
|
||||
['{70CEBB06-376F-4363-B80F-DDA4324E0F85}']
|
||||
function GetRptPresupuestos(const AListaID: String): Binary;
|
||||
function GetRptWordPresupuesto(const AID: Integer): Binary;
|
||||
function GetRptWordCertificadoTrabajos(const AID: Integer): Binary;
|
||||
function GetRptWordCertificadoTrabajos(const AID: Integer): Binary;
|
||||
function GetRptPDFPresupuesto(const AListaID: String): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
@ -1416,7 +1416,21 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
IndexDefs = <>
|
||||
Left = 352
|
||||
Left = 360
|
||||
Top = 192
|
||||
end
|
||||
object frxPDFExport1: TfrxPDFExport
|
||||
ShowDialog = False
|
||||
UseFileCache = True
|
||||
ShowProgress = False
|
||||
PrintOptimized = True
|
||||
Outline = False
|
||||
Author = 'FactuGES'
|
||||
Subject = 'FactuGES'
|
||||
Background = False
|
||||
Creator = 'FactuGES'
|
||||
HTMLTags = True
|
||||
Left = 528
|
||||
Top = 440
|
||||
end
|
||||
end
|
||||
|
||||
@ -8,7 +8,7 @@ uses
|
||||
uDADataTable, uDACDSDataTable, DB, uDAClasses, uDABINAdapter, uROTypes,
|
||||
uDAInterfaces, uDAMemDataTable, uDADataStreamer, uDABin2DataStreamer,
|
||||
frxGradient, frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDAEngine,
|
||||
IBSQL, IBDatabase, IBCustomDataSet, IBQuery;
|
||||
IBSQL, IBDatabase, IBCustomDataSet, IBQuery, frxExportPDF;
|
||||
|
||||
type
|
||||
TRptPresupuestosCliente = class(TDataModule)
|
||||
@ -77,12 +77,14 @@ type
|
||||
DAMemDataTable2: TDAMemDataTable;
|
||||
schReport: TDASchema;
|
||||
DataDictionary: TDADataDictionary;
|
||||
frxPDFExport1: TfrxPDFExport;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
procedure _GenerarPresupuesto(const AID : Integer);
|
||||
public
|
||||
function GenerarPresupuesto(const ListaID : String): Binary; overload;
|
||||
function GenerarPDF(const ListaID : String): Binary; overload;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -106,6 +108,30 @@ begin
|
||||
frxReport.EngineOptions.NewSilentMode := simReThrow;
|
||||
end;
|
||||
|
||||
function TRptPresupuestosCliente.GenerarPDF(const ListaID: String): Binary;
|
||||
var
|
||||
ID_Presupuestos: TStringList;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
|
||||
|
||||
try
|
||||
ID_Presupuestos := TStringList.Create;
|
||||
ID_Presupuestos.CommaText := ListaID;
|
||||
|
||||
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||
for i := 0 to ID_Presupuestos.Count - 1 do
|
||||
_GenerarPresupuesto(StrToInt(ID_Presupuestos.Strings[i]));
|
||||
|
||||
frxPDFExport1.Stream := Result;
|
||||
frxReport.Export(frxPDFExport1)
|
||||
finally
|
||||
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptPresupuestosCliente.GenerarPresupuesto(const ListaID: String): Binary;
|
||||
var
|
||||
ID_Presupuestos: TStringList;
|
||||
@ -124,7 +150,6 @@ begin
|
||||
_GenerarPresupuesto(StrToInt(ID_Presupuestos.Strings[i]));
|
||||
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
|
||||
finally
|
||||
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
|
||||
end;
|
||||
|
||||
@ -88,10 +88,7 @@ function TRptWordCertificadoTrabajo.Exportar(const AIDPresupuesto: Integer;
|
||||
const AFichero : String): Boolean;
|
||||
begin
|
||||
if EsCadenaVacia(AFichero) then
|
||||
begin
|
||||
Result := False;
|
||||
RaiseError('Falta indicar el fichero donde se exportará el listado.');
|
||||
end;
|
||||
|
||||
FNombreFichero := AFichero;
|
||||
FCodigoPresupuesto := AIDPresupuesto;
|
||||
@ -130,7 +127,6 @@ var
|
||||
NombreCapitulo : string;
|
||||
ADescripcion : string;
|
||||
ANombreFichero : string;
|
||||
AFicheroTemporal : string;
|
||||
begin
|
||||
with FDocumento, tbl_Cabecera do
|
||||
begin
|
||||
|
||||
@ -33,8 +33,9 @@ type
|
||||
procedure DARemoteServiceCreate(Sender: TObject);
|
||||
protected
|
||||
{ IsrvPresupuestosCliente methods }
|
||||
function GenerateReport(const ListaID: String): Binary;
|
||||
function GenerateReportEnWord(const ID: Integer): Binary;
|
||||
function GenerarInforme(const ListaID: String): Binary;
|
||||
function GenerarInformeEnWord(const ID: Integer): Binary;
|
||||
function GenerarInformeEnPDF(const ListaID: String): Binary;
|
||||
function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary;
|
||||
end;
|
||||
|
||||
@ -100,7 +101,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvPresupuestosCliente.GenerateReport(const ListaID: String): Binary;
|
||||
function TsrvPresupuestosCliente.GenerarInforme(const ListaID: String): Binary;
|
||||
var
|
||||
AReportGenerator : TRptPresupuestosCliente;
|
||||
begin
|
||||
@ -112,7 +113,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvPresupuestosCliente.GenerateReportEnWord(const ID: Integer): Binary;
|
||||
function TsrvPresupuestosCliente.GenerarInformeEnPDF(
|
||||
const ListaID: String): Binary;
|
||||
var
|
||||
AReportGenerator : TRptPresupuestosCliente;
|
||||
begin
|
||||
AReportGenerator := TRptPresupuestosCliente.Create(nil);
|
||||
try
|
||||
Result := AReportGenerator.GenerarPDF(ListaID);
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvPresupuestosCliente.GenerarInformeEnWord(const ID: Integer): Binary;
|
||||
var
|
||||
AReportGenerator : TRptWordPresupuestoCliente;
|
||||
AFicheroTMP : TFileName;
|
||||
|
||||
@ -129,7 +129,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
Width = 749
|
||||
ExplicitWidth = 749
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 613
|
||||
ExplicitWidth = 732
|
||||
inherited TBXItem2: TTBXItem
|
||||
Visible = False
|
||||
end
|
||||
@ -141,7 +141,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
end
|
||||
object TBXSeparatorItem6: TTBXSeparatorItem [11]
|
||||
end
|
||||
object TBXItem33: TTBXItem [12]
|
||||
object TBXItem35: TTBXItem [12]
|
||||
Action = actEnviarPorEMail
|
||||
DisplayMode = nbdmImageAndText
|
||||
end
|
||||
object TBXItem33: TTBXItem [13]
|
||||
Action = actGenerarCertificado
|
||||
DisplayMode = nbdmImageAndText
|
||||
end
|
||||
@ -150,6 +154,9 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
ExplicitWidth = 749
|
||||
object TBXSubmenuItem2: TTBXSubmenuItem [4]
|
||||
Caption = 'A&cciones'
|
||||
object TBXItem34: TTBXItem
|
||||
Action = actEnviarPorEMail
|
||||
end
|
||||
object TBXItem7: TTBXItem
|
||||
Action = actGenerarCertificado
|
||||
end
|
||||
@ -192,45 +199,29 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
ExplicitHeight = 386
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 735
|
||||
Height = 51
|
||||
Height = 73
|
||||
ExplicitWidth = 735
|
||||
ExplicitHeight = 51
|
||||
inherited ToolButton3: TToolButton
|
||||
ExplicitHeight = 73
|
||||
inherited ToolButton4: TToolButton [1]
|
||||
Left = 109
|
||||
Top = 0
|
||||
ExplicitLeft = 109
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton14: TToolButton [2]
|
||||
Left = 165
|
||||
Top = 0
|
||||
Wrap = False
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
Left = 278
|
||||
Top = 0
|
||||
ExplicitLeft = 278
|
||||
ExplicitLeft = 165
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton14: TToolButton [4]
|
||||
Left = 334
|
||||
inherited FontName: TJvFontComboBox [3]
|
||||
Left = 230
|
||||
Top = 0
|
||||
ExplicitLeft = 334
|
||||
ExplicitLeft = 230
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited FontName: TJvFontComboBox [5]
|
||||
Left = 399
|
||||
Top = 0
|
||||
ExplicitLeft = 399
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited FontSize: TEdit
|
||||
Left = 544
|
||||
Top = 0
|
||||
Width = 136
|
||||
ExplicitLeft = 544
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 136
|
||||
end
|
||||
inherited UpDown1: TUpDown
|
||||
Left = 680
|
||||
Top = 0
|
||||
ExplicitLeft = 680
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton13: TToolButton
|
||||
inherited ToolButton13: TToolButton [4]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Wrap = True
|
||||
@ -238,60 +229,75 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
ExplicitTop = 0
|
||||
ExplicitHeight = 27
|
||||
end
|
||||
inherited ToolButton6: TToolButton [9]
|
||||
inherited FontSize: TEdit [5]
|
||||
Left = 0
|
||||
Top = 27
|
||||
Width = 184
|
||||
ExplicitLeft = 0
|
||||
ExplicitWidth = 184
|
||||
end
|
||||
inherited UpDown1: TUpDown [6]
|
||||
Left = 184
|
||||
Top = 27
|
||||
ExplicitLeft = 184
|
||||
ExplicitTop = 27
|
||||
end
|
||||
inherited ToolButton2: TToolButton [7]
|
||||
Left = 201
|
||||
ExplicitLeft = 201
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
Left = 315
|
||||
Top = 27
|
||||
ExplicitLeft = 315
|
||||
ExplicitTop = 27
|
||||
end
|
||||
inherited ToolButton3: TToolButton [9]
|
||||
Left = 381
|
||||
ExplicitLeft = 381
|
||||
end
|
||||
inherited ToolButton7: TToolButton [10]
|
||||
Left = 66
|
||||
Top = 27
|
||||
ExplicitLeft = 66
|
||||
ExplicitTop = 27
|
||||
Left = 436
|
||||
Wrap = True
|
||||
ExplicitLeft = 436
|
||||
end
|
||||
inherited ToolButton8: TToolButton [11]
|
||||
Left = 133
|
||||
Top = 27
|
||||
ExplicitLeft = 133
|
||||
ExplicitTop = 27
|
||||
Left = 0
|
||||
ExplicitLeft = 0
|
||||
end
|
||||
inherited ToolButton12: TToolButton [12]
|
||||
Left = 216
|
||||
Top = 27
|
||||
ExplicitLeft = 216
|
||||
ExplicitTop = 27
|
||||
Left = 83
|
||||
Top = 49
|
||||
Wrap = False
|
||||
ExplicitLeft = 83
|
||||
ExplicitTop = 49
|
||||
ExplicitHeight = 22
|
||||
end
|
||||
inherited ToolButton9: TToolButton [13]
|
||||
Left = 224
|
||||
Top = 27
|
||||
ExplicitLeft = 224
|
||||
ExplicitTop = 27
|
||||
Left = 91
|
||||
Top = 49
|
||||
ExplicitLeft = 91
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton10: TToolButton [14]
|
||||
Left = 369
|
||||
Top = 27
|
||||
ExplicitLeft = 369
|
||||
ExplicitTop = 27
|
||||
Left = 236
|
||||
ExplicitLeft = 236
|
||||
end
|
||||
inherited ToolButton11: TToolButton [15]
|
||||
Left = 494
|
||||
Top = 27
|
||||
ExplicitLeft = 494
|
||||
ExplicitTop = 27
|
||||
Left = 361
|
||||
Wrap = False
|
||||
ExplicitLeft = 361
|
||||
end
|
||||
end
|
||||
inherited cxGrid: TcxGrid
|
||||
Top = 77
|
||||
Top = 99
|
||||
Width = 735
|
||||
Height = 309
|
||||
Height = 287
|
||||
ExplicitTop = 77
|
||||
ExplicitWidth = 735
|
||||
ExplicitHeight = 309
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
Top = 51
|
||||
Top = 73
|
||||
Width = 735
|
||||
ExplicitTop = 51
|
||||
ExplicitWidth = 735
|
||||
@ -996,10 +1002,19 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
object actGenerarCertificado: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Generar certificado'
|
||||
Hint = 'Generar certificado de trabajos'
|
||||
ImageIndex = 21
|
||||
OnExecute = actGenerarCertificadoExecute
|
||||
OnUpdate = actGenerarCertificadoUpdate
|
||||
end
|
||||
object actEnviarPorEMail: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Enviar por e-mail...'
|
||||
Hint = 'Enviar presupuesto por e-mail'
|
||||
ImageIndex = 22
|
||||
OnExecute = actEnviarPorEMailExecute
|
||||
OnUpdate = actEnviarPorEMailUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList [6]
|
||||
PngImages = <
|
||||
@ -1502,6 +1517,27 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
00000049454E44AE426082}
|
||||
Name = 'PngImage21'
|
||||
Background = clWindow
|
||||
end
|
||||
item
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000000970485973000017120000171201679FD252000001964944415478DA
|
||||
63FCFFFF3F03232323033A58BCE9F87F647EAC9F258622B05E6C068034873B8A
|
||||
80D92019C62F8F194C1356339CDF399D91A0014B361FFB1FE6208AA299E1F323
|
||||
306D52F90CC5100C03566E3DFC3FD04E02A2F9F727064690462066006A66FC02
|
||||
64FFFAC8603451096E088A01CB361FFDFF8F819981183077D11A86FDAB7B18E1
|
||||
062CDD7CE27F14573FC3B2EF450CD13E86181ABE7DFFCDF0F5DB6F866FDFFE30
|
||||
1CB97897218AB38FC1B85B98E1DC8E698C600396000D8861696058FAB7116CC0
|
||||
94C5FBB0DAEC6CAECF70EED6238668E67AB057500CF8F0E10383A0A0208A0B90
|
||||
6D06B1BF01D9379E3C67387AFE09C389A37BD15CE06B01B47907434EAC13C3EF
|
||||
3F7F19662E3F8862BB898606C3EFDFFF1896EF3DCFA0A5C0CD306FE9265403FC
|
||||
9D20362F5CB71F4CE7C47AA01890D5BC164C7716F980D56018606BAC0656B079
|
||||
EF2986F82047AC6150DEB785A13CD911AC06C300234D05867DC72F30B8D818E1
|
||||
8DC2494B0E63F702281075D455884A07576EDEC134404A5480E1DAED07441900
|
||||
021806F44D5D44B46618801B400900007F4518F05E90AAF20000000049454E44
|
||||
AE426082}
|
||||
Name = 'PngImage22'
|
||||
Background = clWindow
|
||||
end>
|
||||
Top = 72
|
||||
Bitmap = {}
|
||||
@ -2295,6 +2331,32 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
454E44AE426082}
|
||||
Name = 'PngImage21'
|
||||
Background = clWindow
|
||||
end
|
||||
item
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D4948445200000018000000180806000000E0773D
|
||||
F80000000970485973000017120000171201679FD252000002434944415478DA
|
||||
B593DB6B13411C85CFA8AF0A11C5BED882977AA11A8A86A64AB5DA68ABB4DA17
|
||||
9B071B94824F5510FF9022D8B4A2226AEA5DA434822951BC556D55225544E905
|
||||
A448895048369562B6D9ACFB1BC9CA38BBEB46D203CB4C7667BEEF4CD865BAAE
|
||||
6321C348C018B35D101978EDD82074A8D67633673B09081EDCB3426CA42A40D6
|
||||
B88C91E6BE536FF07EB097152D7003879A416FA21297AF0F584A6C056EE1BF47
|
||||
053D63014B89A540826B3F0D5086C30B406859735E18C3D31D924412B8827368
|
||||
4680334348E99E392D480401C19DDE26B75114059722FD5C620AFAA2C3FAFED9
|
||||
E3882FBB8AA3CD358E80F9790D2ABF727F8D1A129FBF625FE618EE6867F94912
|
||||
B11E662BE88EC45CB76ED8518DAC9AC3A7C96FF682743A0D8FC7637B02A7E604
|
||||
CF1ABF27A692285FBE1213E33F70EEE67951D0DEE247B86F109DED8D459FC0E7
|
||||
DD04D5904C2567904AA5103C5C8FC6B633A2A0ADC9C7175FB81547CBAE1A5454
|
||||
7890CFEBBCE1F7E4AC25383537C79B131C2AC3E8E4184E869A7839E92F6ADD5B
|
||||
6D6EBC72FF0997AC2A5BCAE1D1E7239602EFDA4A684BF2589C5BC4E12782017E
|
||||
FFE2ED47B2E060DD1661F38DE80B2E2138B5B20A352509C143ADBBCDFB91FE67
|
||||
B220E0DF2C01EEC55E99ADEC426D8F1CD829DCBBFBF0A52CA8DBB64158147D3C
|
||||
22B4720A356E6EF8F3F63D30F64A025FD51A73417C2821B5FA57A875BDDFCBE7
|
||||
4F87476541D5FAD5FCE1D0DB8F429B6242CDB76FDD88771FBEC88275E565FC41
|
||||
A1C5FF86DA532CBF64B297228E272855244157F85AC9E085988285CC2F0A951A
|
||||
EF05170AF90000000049454E44AE426082}
|
||||
Name = 'PngImage22'
|
||||
Background = clWindow
|
||||
end>
|
||||
Left = 435
|
||||
Top = 72
|
||||
|
||||
@ -41,6 +41,9 @@ type
|
||||
TBXItem7: TTBXItem;
|
||||
TBXSeparatorItem6: TTBXSeparatorItem;
|
||||
TBXItem33: TTBXItem;
|
||||
actEnviarPorEMail: TAction;
|
||||
TBXItem34: TTBXItem;
|
||||
TBXItem35: TTBXItem;
|
||||
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
||||
@ -49,6 +52,8 @@ type
|
||||
procedure actGenerarCertificadoExecute(Sender: TObject);
|
||||
procedure actGenerarCertificadoUpdate(Sender: TObject);
|
||||
procedure pgPaginasChanging(Sender: TObject; var AllowChange: Boolean);
|
||||
procedure actEnviarPorEMailExecute(Sender: TObject);
|
||||
procedure actEnviarPorEMailUpdate(Sender: TObject);
|
||||
private
|
||||
procedure RecalcularPortePorUnidad;
|
||||
|
||||
@ -100,6 +105,18 @@ uses
|
||||
{
|
||||
**************************** TfEditorPresupuestoCliente ****************************
|
||||
}
|
||||
procedure TfEditorPresupuestoCliente.actEnviarPorEMailExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FController.EnviarPresupuestoPorEMail(Presupuesto);
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestoCliente.actEnviarPorEMailUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := HayDatos;
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestoCliente.actGenerarCertificadoExecute(
|
||||
Sender: TObject);
|
||||
begin
|
||||
|
||||
@ -124,7 +124,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
|
||||
Width = 674
|
||||
ExplicitWidth = 674
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 632
|
||||
ExplicitWidth = 674
|
||||
end
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 674
|
||||
@ -138,6 +138,9 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
|
||||
end
|
||||
object TBXSeparatorItem17: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem45: TTBXItem
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
object TBXItem41: TTBXItem
|
||||
Action = actGenerarCertificado
|
||||
end
|
||||
@ -215,6 +218,13 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
|
||||
OnExecute = actAnularExecute
|
||||
OnUpdate = actAnularUpdate
|
||||
end
|
||||
object actEnviarEMail: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Enviar por e-mail...'
|
||||
Hint = 'Enviar el presupuesto por correo electr'#243'nico'
|
||||
OnExecute = actEnviarEMailExecute
|
||||
OnUpdate = actEnviarEMailUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList
|
||||
PngImages = <
|
||||
@ -1958,6 +1968,9 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
|
||||
object N4: TMenuItem [8]
|
||||
Caption = '-'
|
||||
end
|
||||
object Enviarporemail1: TMenuItem [9]
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
end
|
||||
object JsGenerarDialog: TJSDialog
|
||||
Content.Strings = (
|
||||
|
||||
@ -39,6 +39,9 @@ type
|
||||
TBXItem43: TTBXItem;
|
||||
TBXItem44: TTBXItem;
|
||||
TBXSeparatorItem18: TTBXSeparatorItem;
|
||||
actEnviarEMail: TAction;
|
||||
TBXItem45: TTBXItem;
|
||||
Enviarporemail1: TMenuItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actGenerarAlbaranCliExecute(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
@ -52,6 +55,8 @@ type
|
||||
procedure actAceptarUpdate(Sender: TObject);
|
||||
procedure actAnularExecute(Sender: TObject);
|
||||
procedure actAnularUpdate(Sender: TObject);
|
||||
procedure actEnviarEMailExecute(Sender: TObject);
|
||||
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||
|
||||
protected
|
||||
FPresupuestos: IBizPresupuestoCliente;
|
||||
@ -208,6 +213,21 @@ begin
|
||||
(Sender as TAction).Enabled := (FPresupuestos.SITUACION = SITUACION_PRESUPUESTO_PENDIENTE);
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestosCliente.actEnviarEMailExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FController.EnviarPresupuestoPorEMail(FPresupuestos);
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestosCliente.actEnviarEMailUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := HayDatos
|
||||
and not (ViewGrid.NumSeleccionados > 1)
|
||||
and ViewGrid.esSeleccionCeldaDatos;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestosCliente.actGenerarAlbaranCliExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -282,7 +282,7 @@
|
||||
<Interfaces>
|
||||
<Interface Name="Default" UID="{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}">
|
||||
<Operations>
|
||||
<Operation Name="GenerateReport" UID="{4B11FE7D-44AE-4674-9DA7-6FB6B63FC620}">
|
||||
<Operation Name="GenerarInforme" UID="{4B11FE7D-44AE-4674-9DA7-6FB6B63FC620}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
@ -290,7 +290,7 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerateReportEnWord" UID="{7C3C767B-41AC-42EC-925D-ECAE03BD8F58}">
|
||||
<Operation Name="GenerarInformeEnWord" UID="{7C3C767B-41AC-42EC-925D-ECAE03BD8F58}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
@ -306,6 +306,14 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarInformeEnPDF" UID="{ECDF8B1D-0967-4006-86FD-AE8A5D244067}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
<Parameter Name="ListaID" DataType="String" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
</Operations>
|
||||
</Interface>
|
||||
</Interfaces>
|
||||
|
||||
@ -500,9 +500,10 @@ type
|
||||
{ IsrvPresupuestosCliente }
|
||||
IsrvPresupuestosCliente = interface(IDataAbstractService)
|
||||
['{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}']
|
||||
function GenerateReport(const ListaID: String): Binary;
|
||||
function GenerateReportEnWord(const ID: Integer): Binary;
|
||||
function GenerarInforme(const ListaID: String): Binary;
|
||||
function GenerarInformeEnWord(const ID: Integer): Binary;
|
||||
function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary;
|
||||
function GenerarInformeEnPDF(const ListaID: String): Binary;
|
||||
end;
|
||||
|
||||
{ CosrvPresupuestosCliente }
|
||||
@ -515,9 +516,10 @@ type
|
||||
protected
|
||||
function __GetInterfaceName:string; override;
|
||||
|
||||
function GenerateReport(const ListaID: String): Binary;
|
||||
function GenerateReportEnWord(const ID: Integer): Binary;
|
||||
function GenerarInforme(const ListaID: String): Binary;
|
||||
function GenerarInformeEnWord(const ID: Integer): Binary;
|
||||
function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary;
|
||||
function GenerarInformeEnPDF(const ListaID: String): Binary;
|
||||
end;
|
||||
|
||||
{ IsrvPedidosProveedor }
|
||||
@ -1467,11 +1469,11 @@ begin
|
||||
result := 'srvPresupuestosCliente';
|
||||
end;
|
||||
|
||||
function TsrvPresupuestosCliente_Proxy.GenerateReport(const ListaID: String): Binary;
|
||||
function TsrvPresupuestosCliente_Proxy.GenerarInforme(const ListaID: String): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport');
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInforme');
|
||||
__Message.Write('ListaID', TypeInfo(String), ListaID, []);
|
||||
__Message.Finalize;
|
||||
|
||||
@ -1484,11 +1486,11 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvPresupuestosCliente_Proxy.GenerateReportEnWord(const ID: Integer): Binary;
|
||||
function TsrvPresupuestosCliente_Proxy.GenerarInformeEnWord(const ID: Integer): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReportEnWord');
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord');
|
||||
__Message.Write('ID', TypeInfo(Integer), ID, []);
|
||||
__Message.Finalize;
|
||||
|
||||
@ -1518,6 +1520,23 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvPresupuestosCliente_Proxy.GenerarInformeEnPDF(const ListaID: String): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF');
|
||||
__Message.Write('ListaID', TypeInfo(String), ListaID, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
|
||||
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||
finally
|
||||
__Message.UnsetAttributes(__TransportChannel);
|
||||
__Message.FreeStream;
|
||||
end
|
||||
end;
|
||||
|
||||
{ CosrvPedidosProveedor }
|
||||
|
||||
class function CosrvPedidosProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvPedidosProveedor;
|
||||
|
||||
@ -148,9 +148,10 @@ type
|
||||
private
|
||||
protected
|
||||
published
|
||||
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerateReportEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarCertificadoTrabajosEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
end;
|
||||
|
||||
TsrvPedidosProveedor_Invoker = class(TDataAbstractService_Invoker)
|
||||
@ -636,8 +637,8 @@ end;
|
||||
|
||||
{ TsrvPresupuestosCliente_Invoker }
|
||||
|
||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerateReport(const ListaID: String): Binary; }
|
||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInforme(const ListaID: String): Binary; }
|
||||
var
|
||||
ListaID: String;
|
||||
lResult: Binary;
|
||||
@ -647,9 +648,9 @@ begin
|
||||
try
|
||||
__Message.Read('ListaID', TypeInfo(String), ListaID, []);
|
||||
|
||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerateReport(ListaID);
|
||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInforme(ListaID);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerateReportResponse');
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
@ -664,8 +665,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerateReportEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerateReportEnWord(const ID: Integer): Binary; }
|
||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInformeEnWord(const ID: Integer): Binary; }
|
||||
var
|
||||
ID: Integer;
|
||||
lResult: Binary;
|
||||
@ -675,9 +676,9 @@ begin
|
||||
try
|
||||
__Message.Read('ID', TypeInfo(Integer), ID, []);
|
||||
|
||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerateReportEnWord(ID);
|
||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInformeEnWord(ID);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerateReportEnWordResponse');
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeEnWordResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
@ -720,6 +721,34 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInformeEnPDF(const ListaID: String): Binary; }
|
||||
var
|
||||
ListaID: String;
|
||||
lResult: Binary;
|
||||
__lObjectDisposer: TROObjectDisposer;
|
||||
begin
|
||||
lResult := nil;
|
||||
try
|
||||
__Message.Read('ListaID', TypeInfo(String), ListaID, []);
|
||||
|
||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInformeEnPDF(ListaID);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeEnPDFResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
|
||||
finally
|
||||
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||
try
|
||||
__lObjectDisposer.Add(lResult);
|
||||
finally
|
||||
__lObjectDisposer.Free();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TsrvPedidosProveedor_Invoker }
|
||||
|
||||
procedure TsrvPedidosProveedor_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "FileVersion", "1.2.3.0\0"
|
||||
VALUE "ProductVersion", "1.2.3.0\0"
|
||||
VALUE "CompileDate", "jueves, 21 de agosto de 2008 17:06\0"
|
||||
VALUE "CompileDate", "jueves, 21 de agosto de 2008 18:49\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user