using System.Web.Services; using Consulenza.Base.Business; namespace Consulenza.Base.Services { /// /// Summary description for WSProposta /// [WebService(Namespace = "http://it.bancafideuram.report.propostaservice/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class WSProposta : System.Web.Services.WebService { #region PROPOSTA BASE CB /// /// Crea il report di Proposta per ConsulenzaBase. /// /// Chiave del cliente /// Chiave della proposta /// [WebMethod(MessageName = "CreaReport_ConsulenzaBase_Proposta_ChiaveCliente")] public byte[] CreaReport_ConsulenzaBase_Proposta_ChiaveCliente(int chiaveCliente, int chiaveProposta) { return GeneratorService.CreaReport_Proposta(chiaveCliente, chiaveProposta, false); } /// /// Crea il report di Proposta per ConsulenzaBase. /// /// Codice della Rete cui il PB (Private Banker) è associato /// Codice del Private Banker /// Codice Fiscale /// Partita IVA /// Codice Mandato(nel caso di una Fiduciaria) /// Chiave della proposta /// [WebMethod(MessageName = "CreaReport_ConsulenzaBase_Proposta_CodiceFiscale_PIVA_Mandato")] public byte[] CreaReport_ConsulenzaBase_Proposta_CodiceFiscale_PIVA_Mandato(string codiceRete, string codicePb, string codiceFiscale, string partitaIVA, string codiceMandato, int chiaveProposta) { return GeneratorService.CreaReport_Proposta(codiceRete, codicePb, codiceFiscale, partitaIVA, codiceMandato, chiaveProposta, false); } /// /// Crea e salva il report di Proposta per ConsulenzaBase nel database. /// /// Chiave del cliente /// Chiave della proposta /// [WebMethod(MessageName = "SalvaReport_ConsulenzaBase_Proposta_ChiaveCliente")] public bool SalvaReport_ConsulenzaBase_Proposta_ChiaveCliente(int chiaveCliente, int chiaveProposta) { // Recupero il flusso dati del report byte[] report = CreaReport_ConsulenzaBase_Proposta_ChiaveCliente(chiaveCliente, chiaveProposta); //Inserire il flusso dati sul database. if (report == null) return false; else { if (report.Length > 0) return DataService.SalvaReport(chiaveCliente, chiaveProposta, "PROPOSTA", report, false); else return false; } } #endregion [WebMethod(MessageName = "CreaReport_ConsulenzaBaseCU_Proposta_ChiaveCliente")] public byte[] CreaReport_ConsulenzaBaseCU_Proposta_ChiaveCliente(int chiaveCliente, int chiaveProposta) { return GeneratorService.CreaReport_Proposta(chiaveCliente, chiaveProposta, true); } [WebMethod(MessageName = "CreaReport_CU_Proposta_CodiceFiscale_PIVA_Mandato")] public byte[] CreaReport_CU_Proposta_CodiceFiscale_PIVA_Mandato(string codiceRete, string codicePb, string codiceFiscale, string partitaIVA, string codiceMandato, int chiaveProposta) { return GeneratorService.CreaReport_Proposta(codiceRete, codicePb, codiceFiscale, partitaIVA, codiceMandato, chiaveProposta, true); } [WebMethod(MessageName = "SalvaReport_ConsulenzaBaseCU_Proposta_ChiaveCliente")] public bool SalvaReport_ConsulenzaBaseCU_Proposta_ChiaveCliente(int chiaveCliente, int chiaveProposta) { // Recupero il flusso dati del report byte[] report = CreaReport_ConsulenzaBaseCU_Proposta_ChiaveCliente(chiaveCliente, chiaveProposta); //Inserire il flusso dati sul database. if (report == null) return false; else { if (report.Length > 0) return DataService.SalvaReport(chiaveCliente, chiaveProposta, "PROPOSTA", report, true); else return false; } } } }