569 lines
23 KiB
C#
569 lines
23 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Data;
|
||
using System.Web;
|
||
using System.Web.UI;
|
||
using ClassLibraryWS.bancafideuram.nac.profilazione;
|
||
|
||
|
||
public partial class reportRischioNew : System.Web.UI.Page
|
||
{
|
||
private Cliente _cliente;
|
||
public string pathNav;
|
||
public int idReport; //indica il modello (fixed) COMPLETO di QUESTO report da cui costruire la treeview iniziale
|
||
private string sUtente;
|
||
public string codiceFiscale;
|
||
public static int tpReport = 7; //valore proprietario (fixed) di QUESTO report //DA VALUTARE!!
|
||
public static int idReportAlbero = 15; //valore proprietario (fixed) di QUESTO report //DA VALUTARE!!
|
||
public static int idReportBase = 15;
|
||
public static int idReportCompleto = 15;
|
||
public string codiceRete;
|
||
public string codicePB;
|
||
public string ambiente;
|
||
public int lastSavedReportId;
|
||
public static string nomeReport = "RISCHIO"; //valore proprietario (fixed) di QUESTO report
|
||
public static string nomeReportCompleto = "Rischio completo"; //valore proprietario (fixed) di QUESTO report
|
||
public static string nomeReportRischio = "RISCHIO"; //valore proprietario (fixed) di QUESTO report
|
||
public static string nomeReportBaseRischio = "Rischio base"; //valore proprietario (fixed) di QUESTO report
|
||
public static string nomeReportCompletoRischio = "Rischio completo"; //valore proprietario (fixed) di QUESTO report
|
||
|
||
string nomeReportPerLabel;
|
||
string descrizioneReportPerLabel;
|
||
public int reportIdToLoadBack = -1;
|
||
public string endOfjob = "0";
|
||
private string token;
|
||
private bool reportNominativo = false;
|
||
int IDReportToLoad = -1;
|
||
public string baseCompleto;
|
||
public string reportName;
|
||
private int idCliente;
|
||
private int IdModello;
|
||
private GestReport m = new GestReport();
|
||
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
|
||
|
||
|
||
#region Add attribute to controls
|
||
|
||
rbl_Privacy.Attributes.Add("OnClick", "CallCheck_all_in_document()");
|
||
|
||
#endregion
|
||
|
||
token = Request.QueryString.Get("token");
|
||
codiceRete = Request.QueryString.Get("tipoRete");
|
||
codicePB = Request.QueryString.Get("codPB");
|
||
codiceFiscale = Request.QueryString.Get("codCliente");
|
||
baseCompleto = Request.QueryString.Get("baseCompleto");
|
||
IdModello = codiceRete.Equals("S") ? 2 : 1;
|
||
|
||
_cliente = Cliente.getCliente(codiceRete + codicePB, codiceFiscale);
|
||
|
||
if (Request.QueryString["lastReportPrinted"] != null)
|
||
IDReportToLoad = Convert.ToInt32(Request.QueryString.Get("lastReportPrinted"));
|
||
|
||
ambiente = Request.QueryString.Get("ambiente");
|
||
pathNav = Request.QueryString.Get("pathNav");
|
||
reportName = Request.QueryString.Get("nomeInizialeReport");
|
||
|
||
if (!Page.IsPostBack)
|
||
HFidCliente.Value = _cliente.IdCliente_SEIReport.ToString();
|
||
|
||
idCliente = int.Parse(HFidCliente.Value);
|
||
|
||
if (!Page.IsPostBack)
|
||
{
|
||
#region From Gestione Modelli
|
||
string loadingReport = Request.QueryString.Get("idReportToLoad");
|
||
nomeReportPerLabel = Request.QueryString.Get("nomeInizialeReport");
|
||
descrizioneReportPerLabel = Request.QueryString.Get("descrizioneInizialeReport");
|
||
#endregion
|
||
|
||
#region Controllo su profilo del cliente
|
||
|
||
DataTable dtQuestionario;
|
||
|
||
#region Recupero dati dal WS Profilazione
|
||
|
||
ProfilazioneWS profiloQuestionario = new ProfilazioneWS();
|
||
ParametriChiamataWS paramWS = new ParametriChiamataWS();
|
||
|
||
// Chiave
|
||
ChiaveCliente chiave = new ChiaveCliente();
|
||
chiave.codiceAgente = codicePB;
|
||
chiave.codiceRete = codiceRete;
|
||
//ISPB chiave.potenzialeClienteNAC = true;
|
||
//ISPB chiave.codicefiscale = _cliente.Definizione == Cliente.TipoDefinizione.Fiduciaria ? _cliente.PIVAFiduciaria : codiceFiscale;
|
||
chiave.codiceMandato = _cliente.Definizione == Cliente.TipoDefinizione.Fiduciaria ? _cliente.CodiceMandatoFiduciaria : string.Empty;
|
||
|
||
|
||
// InfoClient
|
||
InfoClient info = new InfoClient();
|
||
info.codiceApplicazione = WebConfigParameter.getParameter("CODICEAPPLICAZIONE");
|
||
info.codiceRete = codiceRete;
|
||
info.versioneDatabaseSIMPB = Convert.ToInt32(token);
|
||
|
||
paramWS.ChiaveClienteProperty_Profilazione = chiave;
|
||
paramWS.InfoClienteProperty_Profilazione = info;
|
||
|
||
dtQuestionario = profiloQuestionario.GetQuestionariClienteMiFIDAll(paramWS);
|
||
dtQuestionario.TableName = "QUESTIONARIOCLIENTE";
|
||
|
||
bool? questionarioMiFIDAttivo = false;
|
||
|
||
if (dtQuestionario.Rows.Count <= 0)
|
||
questionarioMiFIDAttivo = null;
|
||
else
|
||
if (dtQuestionario.Rows[0]["stato"] != DBNull.Value && int.Parse(dtQuestionario.Rows[0]["stato"].ToString()) == 1)
|
||
questionarioMiFIDAttivo = true;
|
||
else
|
||
questionarioMiFIDAttivo = false;
|
||
|
||
#endregion
|
||
|
||
#region Recupero le autorizzazioni a stampare il Report di Rischio
|
||
|
||
HFERRORMSG.Value = RecuperaAutorizzazioni(Utente.DeserializeMessage(Session["UtenteLoggatoDiSessione"].ToString()), Utente.DeserializeMessage(Session["UtenteImpersonificatoDiSessione"].ToString()), _cliente, questionarioMiFIDAttivo);
|
||
|
||
#endregion
|
||
|
||
#endregion
|
||
|
||
if (HFERRORMSG.Value.Equals(""))
|
||
{
|
||
if (Session["DatiHidden"] != null)
|
||
{
|
||
m.SetHtmlClient(Session["DatiHidden"].ToString());
|
||
DatiHidden.Value = m.GetHtmlClient();
|
||
HFNomeTemplate.Value = Session["HFNomeTemplate"].ToString();
|
||
HDMENU.Value = Session["HDMENU"].ToString();
|
||
Session["DatiHidden"] = null;
|
||
Session["HFNomeTemplate"] = null;
|
||
Session["HDMENU"] = null;
|
||
}
|
||
else
|
||
{
|
||
if (Session["HFNomeTemplate"] != null)
|
||
{
|
||
HFNomeTemplate.Value = Session["HFNomeTemplate"].ToString();
|
||
Session["HFNomeTemplate"] = null;
|
||
}
|
||
|
||
m.TipoRete = codiceRete.Equals("I") ? "Intesa Sanpaolo Private Banking" : "SanPaolo Invest";
|
||
m.AcquisisciModello(IdModello);
|
||
|
||
}
|
||
|
||
m.SetEnableSchedeRischio(codiceRete, codicePB, codiceFiscale);
|
||
|
||
if (m.PatrimonioTerzi)
|
||
{
|
||
rbl_Privacy.Items[1].Enabled = true;
|
||
rbl_Privacy.Items[1].Selected = true;
|
||
}
|
||
else
|
||
{
|
||
rbl_Privacy.Items[1].Enabled = false;
|
||
rbl_Privacy.Items[1].Selected = false;
|
||
}
|
||
if (_cliente.SottoscrizioneContrattoSei)
|
||
{
|
||
rbl_Privacy.Items[0].Enabled = true;
|
||
rbl_Privacy.Items[0].Selected = true;
|
||
}
|
||
else
|
||
{
|
||
rbl_Privacy.Items[0].Enabled = false;
|
||
rbl_Privacy.Items[0].Selected = false;
|
||
}
|
||
|
||
CaricaTemplate();
|
||
DatiHidden.Value = m.GetHtmlClient();
|
||
|
||
if (Session["HFOPZTerzi"] != null && Session["HFOPZNominat"] != null)
|
||
{
|
||
|
||
if (Session["HFOPZNominat"].Equals("S")
|
||
&& _cliente.SottoscrizioneContrattoSei)
|
||
rbl_Privacy.Items[0].Selected = true;
|
||
else
|
||
rbl_Privacy.Items[0].Selected = false;
|
||
|
||
if (Session["HFOPZTerzi"].Equals("S") &&
|
||
m.PatrimonioTerzi)
|
||
rbl_Privacy.Items[1].Selected = true;
|
||
else
|
||
rbl_Privacy.Items[1].Selected = false;
|
||
|
||
Session["HFOPZTerzi"] = null;
|
||
Session["HFOPZNominat"] = null;
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
|
||
private int scriviNuovoModelloReportIntoDB(string reportName, int idCliente)
|
||
{
|
||
int rc = -1;
|
||
|
||
List<Parametro> parametri = new List<Parametro>();
|
||
|
||
Parametro parametro = new Parametro();
|
||
parametro.DbType = DbType.String;
|
||
parametro.Value = reportName;
|
||
parametro.ParameterName = "nome";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.String;
|
||
parametro.Value = string.Empty;
|
||
parametro.ParameterName = "descrizione";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.Boolean;
|
||
parametro.Value = false;
|
||
parametro.ParameterName = "flgModello";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.Int16;
|
||
parametro.Value = idReportAlbero;
|
||
parametro.ParameterName = "idReportModello";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.Int16;
|
||
parametro.Value = tpReport;
|
||
parametro.ParameterName = "tpReport";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.String;
|
||
parametro.Value = sUtente;
|
||
parametro.ParameterName = "utente";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.Int32;
|
||
parametro.Value = idCliente;
|
||
parametro.ParameterName = "idCliente";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.Int16;
|
||
parametro.Value = rbl_Privacy.Items[0].Selected ? 0 : 1;
|
||
parametro.ParameterName = "Privacy";
|
||
parametri.Add(parametro);
|
||
|
||
|
||
|
||
|
||
|
||
rc = DataAccess.ExecuteNonQueryStoredProcedure(DBProvider.SqlServer, "sp_insertNewReportModelNew", parametri);
|
||
|
||
return rc;
|
||
}
|
||
|
||
private int InsertDatiInReportSezioniPers(int idReport, string delimiter, string hiddensezioniselezionate, string utente)
|
||
{
|
||
|
||
#region Salvataggio Modello
|
||
SezioneVincolo vincoli = (SezioneVincolo)Session["VINCOLIRISCHIO"];
|
||
|
||
int rc = 0;
|
||
List<Parametro> parametri = new List<Parametro>();
|
||
|
||
Parametro parametro = new Parametro();
|
||
parametro.DbType = DbType.Int32;
|
||
parametro.Value = idReport;
|
||
parametro.ParameterName = "pIdReport";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.String;
|
||
parametro.Value = delimiter;
|
||
parametro.ParameterName = "delimiter";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.String;
|
||
parametro.Value = hiddensezioniselezionate;
|
||
parametro.ParameterName = "splitstring";
|
||
parametri.Add(parametro);
|
||
|
||
parametro = new Parametro();
|
||
parametro.DbType = DbType.String;
|
||
parametro.Value = utente;
|
||
parametro.ParameterName = "utente";
|
||
parametri.Add(parametro);
|
||
|
||
|
||
rc = DataAccess.ExecuteNonQueryStoredProcedure(DBProvider.SqlServer, "sp_InsertIdSezioniIntoReportSezioniPers", parametri);
|
||
|
||
return rc;
|
||
#endregion
|
||
}
|
||
|
||
protected void ButCarica_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
if (!DDLTemplate.Text.Equals("Seleziona"))
|
||
{
|
||
m.SetHtmlClient(DatiHidden.Value);
|
||
CaricaTemplate();
|
||
}
|
||
}
|
||
catch { }
|
||
finally
|
||
{
|
||
DatiHidden.Value = m.GetHtmlClient();
|
||
}
|
||
}
|
||
|
||
protected void ButElimina_Click(object sender, EventArgs e)
|
||
{
|
||
string alertMsg = "1";
|
||
|
||
try
|
||
{
|
||
if (!DDLTemplate.Text.Equals("Seleziona"))
|
||
{
|
||
m.SetHtmlClient(DatiHidden.Value);
|
||
m.CancellaTemplate(int.Parse(DDLTemplate.Text));
|
||
CaricaTemplate();
|
||
}
|
||
else
|
||
{
|
||
alertMsg = "2";
|
||
}
|
||
}
|
||
catch { alertMsg = "3"; }
|
||
finally
|
||
{
|
||
DatiHidden.Value = m.GetHtmlClient();
|
||
}
|
||
HFERRORMSG.Value = alertMsg;
|
||
|
||
}
|
||
|
||
protected void ButSalva_Click(object sender, EventArgs e)
|
||
{
|
||
string alertMsg = "4";
|
||
try
|
||
{
|
||
|
||
m.SetHtmlClient(DatiHidden.Value);
|
||
int[] idSez = new int[m.Template.Length];
|
||
for (int i = 0; i < m.Template.Length; i++)
|
||
idSez[i] = m.Template[i].Id;
|
||
foreach (DataRow dr in m.AcquisisciTemplate(codicePB, codiceRete, IdModello).Rows)
|
||
{
|
||
if (dr["NOMETEMPLATE"].ToString().Equals(HFNomeTemplate.Value) &&
|
||
dr["DEFAULT"].ToString().Equals("N") &&
|
||
!dr["codicePB"].ToString().Equals(""))
|
||
{
|
||
m.CancellaTemplate(int.Parse(dr["IDTEMPLATE"].ToString()));
|
||
m.SetHtmlClient(DatiHidden.Value);
|
||
alertMsg = "5";
|
||
break;
|
||
}
|
||
}
|
||
m.SalvaTemplate(HFNomeTemplate.Value, codicePB, codiceRete, IdModello, idSez, rbl_Privacy.Items[0].Selected, rbl_Privacy.Items[1].Selected);
|
||
CaricaTemplate();
|
||
}
|
||
catch { alertMsg = "6"; }
|
||
finally
|
||
{
|
||
DatiHidden.Value = m.GetHtmlClient();
|
||
}
|
||
HFERRORMSG.Value = alertMsg;
|
||
}
|
||
|
||
protected void ButStampa_Click(object sender, EventArgs e)
|
||
{
|
||
|
||
m.SetHtmlClient(DatiHidden.Value);
|
||
#region Generator.aspx
|
||
|
||
if (idCliente != -1)
|
||
{
|
||
int rc = 0;
|
||
//inizializzo il cookie che segnala la possibilita' di mostrare la pagina di inserimento note (reportStampa.aspx)
|
||
HttpCookie ck_endOfJob = new HttpCookie("endOfJob");
|
||
ck_endOfJob.Value = "0";
|
||
Response.Cookies.Add(ck_endOfJob);
|
||
|
||
reportNominativo = this.rbl_Privacy.Items[0].Selected ? true : false;
|
||
idReport = scriviNuovoModelloReportIntoDB("LAST USED CONFIG" + "_" + idCliente.ToString(), idCliente);
|
||
|
||
string s345 = "";
|
||
if (rbl_Privacy.Items[1].Selected) s345 = "|345";
|
||
// il modello è prefissato
|
||
rc = InsertDatiInReportSezioniPers(idReport, "|", m.GetSchedeReport() + s345, codiceRete + codicePB);
|
||
|
||
if (rc > 0)
|
||
{
|
||
Session["DatiHidden"] = DatiHidden.Value;
|
||
Session["HFNomeTemplate"] = HFNomeTemplate.Value;
|
||
Session["HFOPZTerzi"] = rbl_Privacy.Items[1].Selected ? "S" : "N";
|
||
Session["HFOPZNominat"] = rbl_Privacy.Items[0].Selected ? "S" : "N";
|
||
Session["HDMENU"] = HDMENU.Value;
|
||
Session["HIDDENFIELD"] = HiddenFieldStampa.Value;
|
||
HFRETURN.Value = Request.QueryString.ToString();
|
||
HFGENERAPDF.Value = "tipoReport=RISCHIO&isnew=1&action=createRischio&codicePB=" + codicePB + "&codiceFiscale=" + codiceFiscale + "&token=" + token + "&codiceRete=" + codiceRete + "&idReport=" + idReport.ToString() + "&ambiente=" + ambiente + "&nomeInizialeReport=" + nomeReport + "&descrizioneInizialeReport=" + nomeReportCompleto + "&baseCompleto=" + baseCompleto + "&checkPrivacy=" + reportNominativo;
|
||
|
||
}
|
||
}
|
||
|
||
#endregion
|
||
|
||
}
|
||
|
||
private void CaricaTemplate()
|
||
{
|
||
DataTable dt = m.AcquisisciTemplate(codicePB, codiceRete, IdModello);
|
||
DDLTemplate.DataSource = dt;
|
||
DDLTemplate.DataTextField = "NOMETEMPLATE";
|
||
DDLTemplate.DataValueField = "IDTEMPLATE";
|
||
DDLTemplate.DataBind();
|
||
|
||
for (int r = 0; r < dt.Rows.Count; r++)
|
||
{
|
||
if (dt.Rows[r]["default"].ToString().Equals("S"))
|
||
{
|
||
DDLTemplate.Items[r].Text = "* - " + dt.Rows[r]["NOMETEMPLATE"];
|
||
}
|
||
string DDL = DDLTemplate.Items[r].Text;
|
||
string HF = HFNomeTemplate.Value;
|
||
if (DDL.Equals(HF))
|
||
{
|
||
DDLTemplate.Items[r].Selected = true;
|
||
if (rbl_Privacy.Items[0].Enabled)
|
||
rbl_Privacy.Items[0].Selected = bool.Parse(dt.Rows[r]["opznominativa"].ToString());
|
||
if (rbl_Privacy.Items[1].Enabled)
|
||
rbl_Privacy.Items[1].Selected = bool.Parse(dt.Rows[r]["opzterzi"].ToString());
|
||
m.SetTamplate(int.Parse(dt.Rows[r]["IDTEMPLATE"].ToString()), dt.Rows[r]["default"].ToString());
|
||
}
|
||
}
|
||
|
||
DDLTemplate.Items.Insert(0, "Seleziona");
|
||
}
|
||
|
||
/// <summary>
|
||
/// Ritorna una stringa che rappresenta la motivazione per l'autorizzazione negata a stampare il report di rischio.
|
||
/// </summary>
|
||
/// <param name="utenteLoggato">Utente che si è loggato al sistema</param>
|
||
/// <param name="utenteImpersonificato">Utente che si sta impersonificando (Private Banker) </param>
|
||
/// <param name="cliente">Cliente</param>
|
||
/// <returns></returns>
|
||
private string RecuperaAutorizzazioni(Utente utenteLoggato, Utente utenteImpersonificato, Cliente cliente, bool? questionarioMiFIDAttivo)
|
||
{
|
||
// vedi C:\inetpub\wwwroot\SeiReportEvoluzione\reportRischioNew.aspx
|
||
|
||
/*
|
||
L’abilitazione alla stampa del Report di rischio viene inibita se utenteImpersonificato ricade nelle seguenti tipologie:
|
||
|
||
Non attivo
|
||
Mai attivato
|
||
User (ed il cliente non è contrattualizzato SEI)
|
||
Starting User (ed il cliente non è contrattualizzato SEI)
|
||
|
||
Nel caso in cui l’utente che si è loggato al SEI è un Manager il Report di rischio può essere stampato anche se il PB ricade nelle casistiche sopra indicate.
|
||
*/
|
||
|
||
string stringAutorizzazioneNegataStampaReport = string.Empty;
|
||
|
||
// i Supervisor (SPV) sono classificati come "MG" e non devono essere esclusi da questa categoria.
|
||
if (utenteLoggato.ProfiloUtenteLoggato == ProfiloUtenteLoggato.MG || utenteLoggato.GradoManagerUtenteLoggato == GradoManagerUtenteLoggato.GM_SPV || utenteLoggato.ProfiloUtenteLoggato == ProfiloUtenteLoggato.US || utenteLoggato.ProfiloUtenteLoggato == ProfiloUtenteLoggato.AP)
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = string.Empty;
|
||
}
|
||
else
|
||
{
|
||
if (utenteImpersonificato.TipologiaUtenteImpersonificato == TipologiaUtenteImpersonificato.NonAttivo || utenteImpersonificato.TipologiaUtenteImpersonificato == TipologiaUtenteImpersonificato.MaiAttivato)
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio per utenti non attivi o mai attivati.";
|
||
}
|
||
else if (utenteImpersonificato.TipologiaUtenteImpersonificato == TipologiaUtenteImpersonificato.User)
|
||
{
|
||
if (cliente.SottoscrizioneContrattoSei == false)
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha firmato il contratto di consulenza evoluta ‘Sei’. Il Report di Rischio è disponibile per i soli clienti ‘Sei’.";
|
||
else
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = string.Empty;
|
||
}
|
||
}
|
||
else if (utenteImpersonificato.TipologiaUtenteImpersonificato == TipologiaUtenteImpersonificato.StartingUser)
|
||
{
|
||
if (cliente.SottoscrizioneContrattoSei == false)
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha firmato il contratto di consulenza evoluta ‘Sei’. Il Report di Rischio è disponibile per i soli clienti ‘Sei’.";
|
||
else
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = string.Empty;
|
||
}
|
||
}
|
||
|
||
|
||
if (stringAutorizzazioneNegataStampaReport.Equals(string.Empty))
|
||
{
|
||
// Ho superato i controlli precedenti.
|
||
// Ora faccio un controllo sul questionario del cliente e la sua sottoscrizione SEI.
|
||
|
||
if (utenteImpersonificato.TipologiaUtenteImpersonificato == TipologiaUtenteImpersonificato.FrequentUser)
|
||
{
|
||
// Se utenteImpersonificato (PB) è FrequentUser lascio solo i controlli sul profilo (questionarioMiFIDAttivo)
|
||
if (questionarioMiFIDAttivo == null) // profilo non presente
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha il profilo di rischio"; // SN
|
||
}
|
||
else
|
||
{
|
||
if (questionarioMiFIDAttivo == true) // profilo attivo
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = string.Empty;
|
||
}
|
||
else // profilo non attivo
|
||
{
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente ha il profilo di rischio scaduto.";
|
||
}
|
||
}
|
||
}
|
||
else
|
||
{
|
||
|
||
if (questionarioMiFIDAttivo == null) // profilo non presente
|
||
{
|
||
if (_cliente.SottoscrizioneContrattoSei)
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha il profilo di rischio"; // SN
|
||
else
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha firmato il contratto di consulenza evoluta ‘Sei’ e non ha il profilo di rischio."; // NN
|
||
}
|
||
else
|
||
{
|
||
if (questionarioMiFIDAttivo == true) // profilo attivo
|
||
{
|
||
if (_cliente.SottoscrizioneContrattoSei)
|
||
stringAutorizzazioneNegataStampaReport = string.Empty;
|
||
else
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha firmato il contratto di consulenza evoluta ‘Sei’. Il Report di Rischio è disponibile per i soli clienti ‘Sei’."; // NS
|
||
}
|
||
else
|
||
{
|
||
if (_cliente.SottoscrizioneContrattoSei) // profilo scaduto
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente ha il profilo di rischio scaduto.";
|
||
else
|
||
stringAutorizzazioneNegataStampaReport = "Attenzione. Non è possibile stampare il Report di Rischio in quanto il cliente non ha firmato il contratto di consulenza evoluta ‘Sei’ e ha il profilo di rischio scaduto.";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return stringAutorizzazioneNegataStampaReport;
|
||
|
||
}
|
||
} |