示例#1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                #region gestione delle voci di menù tramite chiave su web.config
                if (System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamica"] != null && System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamica"] == "1")
                {
                    this.hd_prof_dinamic.Value = "1";
                }
                else
                {
                    this.hd_prof_dinamic.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamicaFasc"] != null && System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamicaFasc"] == "1")
                {
                    this.hd_prof_dinamicFasc.Value = "1";
                }
                else
                {
                    this.hd_prof_dinamicFasc.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["LISTE_DISTRIBUZIONE"] != null && System.Configuration.ConfigurationManager.AppSettings["LISTE_DISTRIBUZIONE"] == "1")
                {
                    this.hd_liste_distr.Value = "1";
                }
                else
                {
                    this.hd_liste_distr.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["DiagrammiStato"] != null && System.Configuration.ConfigurationManager.AppSettings["DiagrammiStato"] == "1")
                {
                    this.hd_diagra_stato.Value = "1";
                }
                else
                {
                    this.hd_diagra_stato.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["IMPORT_OGGETTARIO"] != null && System.Configuration.ConfigurationManager.AppSettings["IMPORT_OGGETTARIO"] == "1")
                {
                    this.hd_import_oggettario.Value = "1";
                }
                else
                {
                    this.hd_import_oggettario.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["MEZZO_SPEDIZIONE"] != null && System.Configuration.ConfigurationManager.AppSettings["MEZZO_SPEDIZIONE"] == "1")
                {
                    this.hd_mezzo_spedizione.Value = "1";
                }
                else
                {
                    this.hd_mezzo_spedizione.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["GESTIONE_ASSERZIONI"] != null && System.Configuration.ConfigurationManager.AppSettings["GESTIONE_ASSERZIONI"] == "1")
                {
                    this.hd_gestione_asserzioni.Value = "1";
                }
                else
                {
                    this.hd_gestione_asserzioni.Value = "0";
                }
                if (System.Configuration.ConfigurationManager.AppSettings["GESTIONE_GRAFICA"] != null && System.Configuration.ConfigurationManager.AppSettings["GESTIONE_GRAFICA"] == "1")
                {
                    this.hd_abilita_gestione_grafica.Value = "1";
                }
                else
                {
                    this.hd_abilita_gestione_grafica.Value = "0";
                }



                //Nuova gestione chiavi di configurazione

                string valoreChiave;

                // Gestione documenti in stato finale, attivabile solamente per gli utenti amministratori di amministrazioni
                valoreChiave = DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_ABILITA_GEST_DOCS_ST_FINALE");
                if (!string.IsNullOrEmpty(valoreChiave) && valoreChiave.Equals("1"))
                {
                    hd_gestione_Docum_Stato_Finale.Value = valoreChiave;
                }

                if (!string.IsNullOrEmpty(DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_ENABLE_VIS_INFO_DOC_AMM")) && DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_ENABLE_VIS_INFO_DOC_AMM").Equals("1"))
                {
                    this.hd_info_documento.Value = "1";
                }
                else
                {
                    this.hd_info_documento.Value = "0";
                }

                // Verifica se la gestione dei formati documenti è abilitata o meno
                if (DocsPAWA.FormatiDocumento.Configurations.SupportedFileTypesEnabled)
                {
                    this.hd_formati_documenti.Value = "1";
                }
                else
                {
                    this.hd_formati_documenti.Value = "0";
                }

                DocsPAWA.AdminTool.Manager.AmministrazioneManager am = new DocsPAWA.AdminTool.Manager.AmministrazioneManager();
                if (am.IsEnabledRF(null))
                {
                    this.hd_abilita_gestione_rf.Value = "1";
                }
                else
                {
                    this.hd_abilita_gestione_rf.Value = "0";
                }

                if (this.GestioneRubricaComuneAbilitata())
                {
                    this.hd_gestione_rubrica_comune.Value = "1";
                }
                else
                {
                    this.hd_gestione_rubrica_comune.Value = "0";
                }


                //--- case GESTIONE QUALIFICHE
                string chiaveQualifiche = DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "GESTIONE_QUALIFICHE");
                this.hd_abilita_gestione_qualifiche.Value = "0";
                if (!string.IsNullOrEmpty(chiaveQualifiche) && chiaveQualifiche.Equals("1"))
                {
                    this.hd_abilita_gestione_qualifiche.Value = chiaveQualifiche;
                }


                this.hd_abilita_gestione_importazione.Value = "1";

                #endregion


                #region gestione delle voci di menù da visualizzare
                this.impostaLista();

                #endregion

                //solo il super amministratore
                //if (this.getTipoAmministratore() == "1")
                Manager.UtentiManager theManager = new Amministrazione.Manager.UtentiManager();
                if (theManager.AmmVerificaGestioneChiavi(this._datiAmministratore.idPeople))
                {
                    this.hd_abilita_gestione_chiaviConfigurazione.Value = "1";
                }
                else
                {
                    this.hd_abilita_gestione_chiaviConfigurazione.Value = "0";
                }

                if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["USE_CACHE"]) &&
                    System.Configuration.ConfigurationManager.AppSettings["USE_CACHE"].ToUpper() == "TRUE")
                {
                    this.hd_abilita_gestione_cache.Value = "1";
                }
                else
                {
                    this.hd_abilita_gestione_cache.Value = "0";
                }

                //Disservizio
                string valoreChiave2;
                valoreChiave2 = DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_GESTIONE_DISSERVIZIO");
                if (!string.IsNullOrEmpty(valoreChiave2) && valoreChiave2.Equals("1"))
                {
                    if (this.getTipoAmministratore() == "1")
                    {
                        this.hd_gestione_indisponibilita.Value = "1";
                    }
                    else
                    {
                        this.hd_gestione_indisponibilita.Value = "0";
                    }
                }
                else
                {
                    this.hd_gestione_indisponibilita.Value = "0";
                }

                //Import pregressi
                string valoreChiave3;
                valoreChiave3 = DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_IMPORT_PREGRESSI");
                if (!string.IsNullOrEmpty(valoreChiave3) && valoreChiave3.Equals("1"))
                {
                    this.hd_import_pregressi.Value = "1";
                }
                else
                {
                    this.hd_import_pregressi.Value = "0";
                }

                // Autenticazione Sistemi Esterni R.1 per ora è senza chiave
                //string gestSistemiEsterni;
                //gestSistemiEsterni= DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_GEST_SYS_EXT");
                //if (!string.IsNullOrEmpty(gestSistemiEsterni) && gestSistemiEsterni.Equals("1"))
                //{
                //    this.hd_gestione_sistemi_esterni.Value = "1";
                //}
                //else
                //{
                //    this.hd_gestione_sistemi_esterni.Value = "0";
                //}

                // Autenticazione Sistemi Esterni R.1, chiave di webconfig
                //if (string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["AUTH_SYS_EXT_FE_ADMIN"]) || System.Configuration.ConfigurationManager.AppSettings["AUTH_SYS_EXT_FE_ADMIN"] == "0")
                if (string.IsNullOrEmpty(DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_AUTH_SYS_EXT_FE_ADMIN")) || DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_AUTH_SYS_EXT_ADMIN") == "0")
                {
                    this.hd_gestione_sistemi_esterni.Value = "0";
                }

                if (string.IsNullOrEmpty(DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_PROJECT_LEVEL")) || DocsPAWA.utils.InitConfigurationKeys.GetValue("0", "FE_PROJECT_LEVEL") == "0")
                {
                    this.hd_gestione_struttura_sottofascicoli.Value = "0";
                }
                else
                {
                    this.hd_gestione_struttura_sottofascicoli.Value = "1";
                }
            }
        }