106 lines
4.2 KiB
C#
106 lines
4.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
//ISPB using bancafideuram.nac.ads4ws;
|
|
using System.Configuration;
|
|
|
|
public partial class wucTop : System.Web.UI.UserControl
|
|
{
|
|
private string nomeCliente = string.Empty;
|
|
private string cognomeCliente = string.Empty;
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
GestioneStampe gs = new GestioneStampe();
|
|
|
|
lblNavPath.Text = "Gestione stampe" + (!gs.datiNavigazione.CaptionNav.Equals("") ? " > " + gs.datiNavigazione.CaptionNav : "");
|
|
lbl_AppVersion.Text = "ver. " + WebConfigParameter.getParameter("Version");
|
|
btnLogout.ToolTip = "Click per USCIRE dall'applicazione";
|
|
lbl_dataOdierna.Text = DateTime.Now.ToLongDateString();
|
|
|
|
if (gs.datiNavigazione.Rete.Equals("S"))
|
|
this.imgLogo.Src = "~/Images/logoSeiNEWspi.gif";
|
|
else
|
|
this.imgLogo.Src = " Images/logoBancaFideuram.gif";
|
|
|
|
if (gs.datiNavigazione.isNotCliente)
|
|
{
|
|
|
|
Label1.Text = "";
|
|
lblCF.Text = "";
|
|
lblImpersonificazione.Visible = false;
|
|
|
|
}
|
|
else
|
|
{
|
|
nomeCliente = gs.datiCliente.Nome;
|
|
cognomeCliente = gs.datiCliente.Cognome;
|
|
|
|
|
|
Utente utenteImpersonificato = Utente.DeserializeMessage(Session["UtenteImpersonificatoDiSessione"].ToString());
|
|
Utente utenteAssistente = null;
|
|
|
|
if (gs.datiNavigazione.isUtenteAssistente)
|
|
utenteAssistente = Utente.GetProfiloUtente(gs.datiNavigazione.Rete + gs.datiNavigazione.CodiceAssistente, null); // utente assistente
|
|
|
|
|
|
if (utenteImpersonificato.IsUtenteImpersonificato)
|
|
{
|
|
Utente utenteLoggato = Utente.DeserializeMessage(Session["UtenteLoggatoDiSessione"].ToString());
|
|
|
|
lbl_Utente.Text = utenteLoggato.Nome + " " + utenteLoggato.Cognome;
|
|
|
|
lblImpersonificazione.Visible = true;
|
|
lblAgente.Visible = true;
|
|
lblAgente.Text = gs.datiNavigazione.isUtenteAssistente ? utenteAssistente.Cognome + " " + utenteAssistente.Nome : utenteImpersonificato.Cognome + " " + utenteImpersonificato.Nome;
|
|
}
|
|
else
|
|
{
|
|
// Utente non Impersonificato
|
|
lbl_Utente.Text = gs.datiNavigazione.isUtenteAssistente ? utenteAssistente.Nome + " " + utenteAssistente.Cognome : utenteImpersonificato.Nome + " " + utenteImpersonificato.Cognome;
|
|
lblImpersonificazione.Visible = false;
|
|
lblAgente.Visible = false;
|
|
}
|
|
|
|
|
|
if (gs.datiCliente.Definizione == Cliente.TipoDefinizione.PersonaGiuridica || gs.datiCliente.Definizione == Cliente.TipoDefinizione.Fiduciaria)
|
|
{
|
|
if (gs.datiCliente.Definizione == Cliente.TipoDefinizione.Fiduciaria)
|
|
{
|
|
lbl_Cliente.Text = cognomeCliente + " " + nomeCliente.Replace("$", "") + " - " + gs.datiCliente.CodiceMandatoFiduciaria;
|
|
lblCF.Text = "Cod. fiscale / P. IVA";
|
|
lbl_CodFiscaleCliente.Style["left"] = "790px";
|
|
lbl_CodFiscaleCliente.Text = gs.datiCliente.PIVAFiduciaria;
|
|
}
|
|
else
|
|
{
|
|
lbl_Cliente.Text = cognomeCliente + " " + nomeCliente;
|
|
lbl_CodFiscaleCliente.Text = gs.datiNavigazione.CfIva;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
lbl_Cliente.Text = nomeCliente + " " + cognomeCliente;
|
|
lbl_CodFiscaleCliente.Text = gs.datiNavigazione.CfIva;
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void lnkBtnEsci_Click(object sender, EventArgs e)
|
|
{
|
|
Session.RemoveAll();
|
|
Response.Redirect(ConfigurationManager.AppSettings["URL_CLOSING_REPORTMANGER"].ToString());
|
|
|
|
}
|
|
} |