75 lines
2.4 KiB
C#
75 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
public partial class wucMenu : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
GestioneStampe gs = new GestioneStampe();
|
|
|
|
GestioneDocumenti.Visible = true;
|
|
ArchivioModelli.Visible = true;
|
|
RicercaDocumentiC6Massivi.Visible = false;
|
|
|
|
if (GetUtenteAutorizzato.getAccessoPortaleAutorizzato())
|
|
{
|
|
GestioneDocumenti.Visible = false;
|
|
ArchivioModelli.Visible = false;
|
|
RicercaDocumentiC6Massivi.Visible = true;
|
|
}
|
|
else if (gs.datiNavigazione.isNotCliente)
|
|
{
|
|
|
|
Disable(LinkReportcliente);
|
|
Disable(butDiagnosi);
|
|
Disable(butPianificazione);
|
|
Disable(butProposta);
|
|
Disable(butMonitoraggio);
|
|
Disable(butRischio);
|
|
Disable(butSchedeDiLavoro);
|
|
}
|
|
else
|
|
{
|
|
|
|
if (gs.datiCliente.Tipologia == Cliente.TipoCliente.Prospect && !gs.datiNavigazione.checkPrivacy)
|
|
{
|
|
|
|
Disable(butDiagnosi);
|
|
Disable(butPianificazione);
|
|
Disable(butProposta);
|
|
Disable(butMonitoraggio);
|
|
Disable(butRischio);
|
|
Disable(butDocumentiClienti);
|
|
Disable(butDocumentiNuclei);
|
|
Disable(butArchivioModelli);
|
|
Disable(butSchedeDiLavoro);
|
|
}
|
|
}
|
|
|
|
if (gs.datiUtente.UtenteAutorizzatoApplicazione && gs.datiUtente.ProfiloUtenteLoggato != ProfiloUtenteLoggato.MG)
|
|
{
|
|
GetUtenteAutorizzato.setUtenteGestioneControlli(gs.datiUtente);
|
|
PanelGestioneControlli.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
PanelGestioneControlli.Visible = false;
|
|
}
|
|
}
|
|
|
|
private void Disable(System.Web.UI.HtmlControls.HtmlControl htmlControl)
|
|
{
|
|
htmlControl.Attributes.Clear();
|
|
htmlControl.Style.Add("color", "Silver");
|
|
}
|
|
private void Disable(LinkButton linkButton)
|
|
{
|
|
linkButton.Attributes.Clear();
|
|
linkButton.Enabled = false;
|
|
linkButton.ForeColor = System.Drawing.Color.Silver;
|
|
}
|
|
} |