Ejemplo n.º 1
0
        /// <summary>
        /// Predisposizione per un nuovo inserimento
        /// </summary>
        private void SetInsertMode()
        {
            this.ClearData();

            pnl_info.Visible = true;
            this.impostaBlocchiRispettoCessione(false);
            btn_aggiungi.Text  = "Aggiungi";
            txt_codice.Visible = true;
            lbl_cod.Visible    = false;
            txt_codice.Enabled = true;

            // Se è attiva la cessione diritti, vengono visualizzati i pannelli relativi
            if (this.isCessioneAbilitata())
            {
                this.pnl_cessione.Visible = true;
            }

            if (InitConfigurationKeys.GetValue("0", "ENABLE_TASK") != null && InitConfigurationKeys.GetValue("0", "ENABLE_TASK").Equals("1"))
            {
                this.pnlPrevedeRisposta.Visible = false;
                this.pnlEUnaRisposta.Visible    = false;
                this.pnlTipoAttivita.Visible    = true;
                this.pnlColonnaVuota.Visible    = true;
            }
            else
            {
                this.pnlPrevedeRisposta.Visible = true;
                this.pnlEUnaRisposta.Visible    = true;
                this.pnlTipoAttivita.Visible    = false;
                this.pnlColonnaVuota.Visible    = false;
            }

            this.SetFocus(this.txt_codice);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                if (!this.IsPostBack)
                {
                    this.InitializeLanguage();
                    DocsPaWR.InfoUtente info = new DocsPaWR.InfoUtente();
                    info = UserManager.GetInfoUser();

                    string valoreChiave = InitConfigurationKeys.GetValue(info.idAmministrazione, FE_MAX_LENGTH_NOTE);
                    if (!string.IsNullOrEmpty(valoreChiave) && int.Parse(valoreChiave) <= maxLength)
                    {
                        maxLength = int.Parse(valoreChiave);
                    }
                    VersionDescription.MaxLength = maxLength;
                    if (this.Request.QueryString["modifyVersion"] != null && this.Request.QueryString["modifyVersion"].Equals("t"))
                    {
                        this.VersionDescription.Text = DescriptionVersion;
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 3
0
 private List <string> GET_TIPI_ATTI_CUSTOM()
 {
     if (InitConfigurationKeys.GetValue("0", "BE_CUSTOM_TIPI_ATTO") != null)
     {
         return(new List <string>(InitConfigurationKeys.GetValue("0", "BE_CUSTOM_TIPI_ATTO").Split('|')));
     }
     return(null);
 }
Ejemplo n.º 4
0
 private bool GET_XML_ATTACH()
 {
     if (InitConfigurationKeys.GetValue("0", "BE_ATTACH_XML") != null && InitConfigurationKeys.GetValue("0", "BE_ATTACH_XML").Equals("1"))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                if (!this.IsPostBack)
                {
                    this.InitializeLanguage();

                    DocsPaWR.InfoUtente info = new DocsPaWR.InfoUtente();
                    info = UserManager.GetInfoUser();

                    string valoreChiave = InitConfigurationKeys.GetValue(info.idAmministrazione, "FE_MAX_LENGTH_DESC_ALLEGATO");
                    if (!string.IsNullOrEmpty(valoreChiave))
                    {
                        maxLength = int.Parse(valoreChiave);
                    }
                    AttachmentDescription.MaxLength = maxLength;

                    string versionId = String.Empty;

                    // Reperimento allegato selezionato
                    if (Request.QueryString["t"] == null)
                    {
                        versionId = DocumentManager.getSelectedAttachId();
                        DocumentManager.setSelectedAttachId(null);
                    }
                    else
                    {
                        DocumentManager.setSelectedAttachId(VersionIdAttachSelected);
                    }
                    Allegato allegato = DocumentManager.GetSelectedAttachment();

                    if (!string.IsNullOrEmpty(versionId))
                    {
                        DocumentManager.setSelectedAttachId(versionId);
                    }

                    if (!this._isCheckedOutDocument)
                    {
                        if (allegato == null)
                        {
                            // Modalità di inserimento
                            AttachmentCode.Text        = string.Empty;
                            AttachmentDescription.Text = string.Empty;
                            AttachmentPagesCount.Text  = string.Empty;
                        }
                        else
                        {
                            // Modalità di modifica dati
                            AttachmentCode.Text        = allegato.versionLabel;
                            AttachmentDescription.Text = allegato.descrizione;
                            AttachmentPagesCount.Text  = allegato.numeroPagine.ToString();
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 6
0
        private void InitializePage()
        {
            // Popolamento dei campi Memento
            this.popolaCampiMemento();

            DocsPaWR.FileRequest fileReq = null;

            fileReq = FileManager.getSelectedFile();

            #region CONVERSIONE PDF LATO SERVER SINCRONA
            // Verfico la presenza della conversione lato server sincrona
            bool enabledConvertPdfServerSinc = false;
            try
            {
                if (!string.IsNullOrEmpty(InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "CONVERSIONE_PDF_SINCRONA_LC")))
                {
                    // verifico la presenza della chiave di DB 'CONVERSIONE_PDF_SINCRONA_LC'
                    enabledConvertPdfServerSinc = (InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "CONVERSIONE_PDF_SINCRONA_LC").Equals("1") ? true : false);
                }
                else
                {
                    // Verifico la presenza della chiave di web.config
                    enabledConvertPdfServerSinc = (!string.IsNullOrEmpty(Utils.IsEbabledConversionePdfLatoServerSincrona()) &&
                                                   Utils.IsEbabledConversionePdfLatoServerSincrona().Equals("true") ? true : false);
                }
            }
            catch (Exception exc)
            {
                enabledConvertPdfServerSinc = false;
            }

            if (enabledConvertPdfServerSinc)
            {
                // Gestione checkbox
                this.chkConverti.Visible = true;
                this.chkConverti.Enabled = true;
                this.upChConverti.Update();
            }
            #endregion


            if (enabledConvertPdfServerSinc)
            {
                // Gestione flag di conversione
                if (!string.IsNullOrEmpty(InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_REQ_CONV_PDF")) &&
                    InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_REQ_CONV_PDF").Equals("1"))
                {
                    //DocsPaWR.FileRequest fileReq = null;

                    //fileReq = FileManager.getSelectedFile();

                    bool isPdf = (FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToUpper() == "PDF");

                    if (!isPdf)
                    {
                        this.chkConverti.Checked = true;

                        if (Utils.IsEnabledSupportedFileTypes())
                        {
                            this.FileTypes = Utils.GetSupportedFileTypes(Int32.Parse(UserManager.getInfoUtente().idAmministrazione));

                            bool retVal = true;

                            int count = this.FileTypes.Count(e => e.FileExtension.ToLowerInvariant() == FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToLowerInvariant() &&
                                                             e.FileTypeUsed && e.FileTypeSignature);
                            retVal = (count > 0);

                            this.chkConverti.Checked = !retVal;
                        }
                    }

                    this.chkConverti.Enabled = false;
                    this.upChConverti.Update();
                }
                else
                {
                    // Piccola correzione - da riportare su Sviluppo
                    //// Conversione obbligatoria non abilitata
                    if (!System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"))
                    {
                        this.chkConverti.Enabled = true;
                        this.upChConverti.Update();
                    }
                    else
                    {
                        this.chkConverti.Enabled = false;
                        this.upChConverti.Update();
                    }
                    //this.chkConverti.Enabled = false;
                    //this.upChConverti.Update();
                }
            }
            else
            {
                // Conversione non abilitata
                this.chkConverti.Visible = false;
                this.chkConverti.Enabled = false;
                this.upChConverti.Update();
            }

            // Gestione Cofirma
            setCofirma(fileReq.firmato == "1" ? true : false, fileReq);

            // Gestione PADES
            // OLD CODE

            /*if (!System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"))
             * {
             *  this.rbPades.Enabled = false;
             *  this.upTipoFirma.Update();
             * }*/

            // NEW CODE
            // Solo se la conversione pdf non è possibile allora la firma Pades deve essere inibita
            if (!System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf") && !enabledConvertPdfServerSinc)
            {
                this.rbPades.Enabled = false;
                this.upTipoFirma.Update();
            }

            // 2. Gestione Flag Pades in caso di PDF (default)
            if (System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"))
            {
                this.rbPades.Checked = true;
                this.rbPades.Enabled = true;
                this.rbCades.Checked = false;
                this.upTipoFirma.Update();
            }

            // Intervento richiesta ENAC
            // 30-06-2014
            #region FE_DISABLE_CADES_HSM - Diabilitazione CADES
            // Gestione tramite chiave di DB disabilitazione CADES
            // In Presenza di questa chiave alcuni vecchi comportamenti sono inibiti
            if (!string.IsNullOrEmpty(InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_DISABLE_CADES_HSM")) &&
                InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_DISABLE_CADES_HSM").Equals("1"))
            {
                this.lblUserMess.Visible = false;
                // 1. DEFAULT per chiave accesa
                this.rbCades.Checked = false;
                this.rbCades.Enabled = false;
                this.upTipoFirma.Update();

                // 2. Gestione Flag Pades in caso di PDF (default)
                if (System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"))
                {
                    this.rbPades.Checked = true;
                    this.rbPades.Enabled = true;
                    this.rbCades.Checked = false;
                    this.upTipoFirma.Update();
                }

                // 3. Gestione Conversione PDF - Forzo la conversione
                if (enabledConvertPdfServerSinc)
                {
                    #region Old Code

                    /*
                     * // Conversione PDF Lato Server Sincrona Attiva
                     * if (!string.IsNullOrEmpty(InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_REQ_CONV_PDF")) &&
                     * InitConfigurationKeys.GetValue(UserManager.getInfoUtente().idAmministrazione, "FE_REQ_CONV_PDF").Equals("1"))
                     * {
                     *  // Conversione PDF Obbligatoria
                     *  bool isPdf = (FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToUpper() == "PDF" || System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"));
                     *
                     *  if (!isPdf)
                     *  {
                     *      this.chkConverti.Checked = true;
                     *
                     *      if (Utils.IsEnabledSupportedFileTypes())
                     *      {
                     *          this.FileTypes = Utils.GetSupportedFileTypes(Int32.Parse(UserManager.getInfoUtente().idAmministrazione));
                     *
                     *          bool retVal = true;
                     *
                     *          int count = this.FileTypes.Count(e => e.FileExtension.ToLowerInvariant() == FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToLowerInvariant() &&
                     *                                                  e.FileTypeUsed && e.FileTypeSignature);
                     *          retVal = (count > 0);
                     *
                     *          this.chkConverti.Checked = !retVal;
                     *      }
                     *  }
                     *
                     *  this.chkConverti.Enabled = false;
                     *  this.upChConverti.Update();
                     *
                     *  // Se flag conversione pdf acceso --> unica firma possibile è PADES
                     *  if (this.chkConverti.Checked)
                     *  {
                     *      this.rbPades.Checked = true;
                     *      this.upTipoFirma.Update();
                     *  }
                     * }
                     * else
                     * {
                     *  // Conversione PDF Non obbligatoria
                     *  // Cades Spento ---> obbligo l'utente a Convertire
                     *  bool isPdf = (FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToUpper() == "PDF" || System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"));
                     *
                     *  if (!isPdf)
                     *  {
                     *      this.chkConverti.Checked = true;
                     *
                     *      if (Utils.IsEnabledSupportedFileTypes())
                     *      {
                     *          this.FileTypes = Utils.GetSupportedFileTypes(Int32.Parse(UserManager.getInfoUtente().idAmministrazione));
                     *
                     *          bool retVal = true;
                     *
                     *          int count = this.FileTypes.Count(e => e.FileExtension.ToLowerInvariant() == FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToLowerInvariant() &&
                     *                                                  e.FileTypeUsed && e.FileTypeSignature);
                     *          retVal = (count > 0);
                     *
                     *          this.chkConverti.Checked = !retVal;
                     *
                     *      }
                     *      this.chkConverti.Enabled = false;
                     *      this.upChConverti.Update();
                     *
                     *      // Se flag conversione pdf acceso --> unica firma possibile è PADES
                     *      if (this.chkConverti.Checked)
                     *      {
                     *          this.rbPades.Checked = true;
                     *          this.upTipoFirma.Update();
                     *      }
                     *  }
                     *
                     * }
                     */
                    #endregion

                    // Conversione PDF Lato Server Sincrona Attiva
                    // Conversione PDF Diventa Obbligatoria
                    bool isPdf = (FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToUpper() == "PDF" || System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"));

                    if (!isPdf)
                    {
                        this.chkConverti.Checked = true;

                        if (Utils.IsEnabledSupportedFileTypes())
                        {
                            this.FileTypes = Utils.GetSupportedFileTypes(Int32.Parse(UserManager.getInfoUtente().idAmministrazione));

                            bool retVal = true;

                            int count = this.FileTypes.Count(e => e.FileExtension.ToLowerInvariant() == FileManager.getEstensioneIntoSignedFile(this.Page, fileReq.fileName).ToLowerInvariant() &&
                                                             e.FileTypeUsed && e.FileTypeSignature);
                            retVal = (count > 0);

                            this.chkConverti.Checked = !retVal;
                        }
                    }

                    this.chkConverti.Enabled = false;
                    this.upChConverti.Update();

                    // Se flag conversione pdf acceso --> unica firma possibile è PADES
                    if (this.chkConverti.Checked)
                    {
                        this.rbPades.Checked = true;
                        this.rbPades.Enabled = true;
                        this.upTipoFirma.Update();
                    }
                }
                else
                {
                    // Conversione PDF Lato Server Sincrona Non Attiva - Non è possibile convertire PDF
                    if (!System.IO.Path.GetExtension(fileReq.fileName).ToLower().Equals(".pdf"))
                    {
                        // Cades disattivato, Conversione Inibita --> Impossibile Firmare
                        btnFirma.Enabled = false;

                        // Radio button Pades
                        this.rbPades.Checked = true;
                        this.rbPades.Enabled = false;
                        this.upTipoFirma.Update();

                        // Messaggio Utente:
                        // Formato non compatibile con la firma PDF(PADES)
                        this.lblUserMess.Text    = "Formato file non compatibile con la firma PDF(PADES)";
                        this.lblUserMess.Visible = true;
                        this.upUserMess.Update();
                    }
                }
            }
            #endregion
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string qs = Request.QueryString.ToString();
                string f  = Request.Form.ToString();

                if (Request.Form != null && Request.Form.Count > 0)
                {
                    if (Request.Form["id"] != null)
                    {
                        string          folderId = Request.Form["id"].Replace("node_", "").Replace("root_", "");
                        DocsPaWR.Folder folder   = new DocsPaWR.Folder();
                        if (!string.IsNullOrEmpty(folderId) && folderId.IndexOf("doc") < 0)
                        {
                            folder = ProjectManager.getFolder(this, folderId);
                            folder = ProjectManager.getFolder(this, folder);
                        }

                        switch (Request.Form["operation"])
                        {
                        case "create_node":
                            // id=node_12595771
                            // position=1
                            // title=gggg
                            // type=default
                            Session["dataentry_node_folder"] = folder;
                            this.html_data.Text = "<" + "script type=\"text/javascript\">ajaxModalPopupCreateNode();<" + "/script>";
                            break;

                        case "rename_node":
                            // operation=rename_node
                            // title=ffffff
                            // id=rootnode_12595773

                            //ABBATANGELI - EVITA DI VISUALIZZARE NELLA DESCRIZIONE ANCHE IL LIVELLO
                            if (!string.IsNullOrEmpty(InitConfigurationKeys.GetValue("0", "FE_PROJECT_LEVEL")) &&
                                InitConfigurationKeys.GetValue("0", "FE_PROJECT_LEVEL").Equals("1") &&
                                !string.IsNullOrEmpty(folder.codicelivello) && !string.IsNullOrEmpty(folder.livello))
                            {
                                if (int.Parse(folder.livello) > 0)
                                {
                                    int indiceChar = folder.descrizione.IndexOf("-") + 1;
                                    folder.descrizione = folder.descrizione.Substring(indiceChar).TrimStart();
                                }
                            }

                            Session["dataentry_node_folder"] = folder;
                            this.html_data.Text = "<" + "script type=\"text/javascript\">ajaxModalPopupModifyNode();<" + "/script>";
                            break;

                        case "move_node":
                            // id=node_34342324
                            // parent=node_35366466
                            string parentId = Request.Form["parent"].Replace("node_", "").Replace("root_", "");
                            this.MoveFolder(folder, parentId);
                            break;

                        case "remove_node":
                            // id=node_12595771
                            Session["remove_node_folder"] = folder;
                            this.html_data.Text           = "<" + "script type=\"text/javascript\">ajaxConfirmModal('ConfirmProjectDeleteSubset', 'HiddenRemoveNode', '');<" + "/script>";
                            break;

                        case "drag_documents":
                            folderId = Request.Form["ref"].Replace("node_", "").Replace("root_", "");
                            folder   = new DocsPaWR.Folder();
                            if (!string.IsNullOrEmpty(folderId) && folderId.IndexOf("doc") < 0)
                            {
                                folder = ProjectManager.getFolder(this, folderId);
                                folder = ProjectManager.getFolder(this, folder);
                            }

                            string docsId = Request.Form["ids"];
                            this.MoveDocuments(docsId, UIManager.ProjectManager.getProjectInSession().folderSelezionato, folder);
                            break;
                        }
                    }
                    else
                    {
                        this.html_data.Text += "<" + "script type=\"text/javascript\">if (parent.fra_main) {parent.fra_main.ajaxDialogModal('AlertLink', 'warning', '');} else {parent.ajaxDialogModal('AlertLink', 'warning', '');}" + "$('#BtnRebindGrid').click();\n" + "<" + "/script>\n";
                        return;
                    }
                }
                else
                {
                    //Se ACL rimossa, allora visualizzo un messaggio di warning all'utente per poi reindirizzarlo alla HOME.
                    Fascicolo Prj = UIManager.ProjectManager.getProjectInSession();
                    if ((Prj.systemID != null && !string.IsNullOrEmpty(Prj.systemID)) && ProjectManager.CheckRevocationAcl())
                    {
                        this.html_data.Text = "<" + "script type=\"text/javascript\">function RedirectHome(){$(location).attr('href','" + this.ResolveUrl("~/Index.aspx") + "');} if (parent.fra_main) {parent.fra_main.ajaxDialogModal('RevocationAcl', 'warning', '','',null,null,'RedirectHome()')} else {parent.parent.ajaxDialogModal('RevocationAcl', 'warning', '','',null,null,'RedirectHome()');}<" + "/script>\n";
                        return;
                    }

                    if (Request.QueryString["id"] == "0")
                    {
                        Fascicolo       Fasc   = ProjectManager.getProjectInSession();
                        DocsPaWR.Folder folder = ProjectManager.getFolder(this, Fasc);
                        this.caricaFoldersFascicolo(folder);
                    }
                    else if (Request.QueryString["q"] != null && Request.QueryString["q"].Length > 0)
                    {
                        string    descrizione     = Request.QueryString["q"].Trim();
                        Fascicolo fascSelezionato = ProjectManager.getProjectInSession();
                        string    idFascicolo     = fascSelezionato.systemID;
                        if (descrizione != string.Empty)
                        {
                            Folder[] risultatiFolder = ProjectManager.getFolderByDescrizione(this, idFascicolo, descrizione);

                            if (risultatiFolder != null)
                            {
                                for (int i = 0; i < risultatiFolder.Length; i++)
                                {
                                    if (this.html_data.Text.Length > 0)
                                    {
                                        this.html_data.Text += ", ";
                                    }
                                    this.html_data.Text += "	{ \"id\": \"node_"+ ((Folder)risultatiFolder[i]).systemID + "\" , \"isResult\": \"true\" }";
                                }

                                this.html_data.Text = "[\n"
                                                      + html_data.Text
                                                      + "]\n";
                            }
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Associazione dati ragione trasmissione alla UI
        /// </summary>
        private void BindUI(DocsPAWA.DocsPaWR.OrgRagioneTrasmissione ragione)
        {
            this.ClearData();

            this.CurrentIDRagioneTrasmissione = ragione.ID;

            this.txt_codice.Text = ragione.Codice;
            this.lbl_cod.Text    = this.txt_codice.Text;
            this.txt_note.Text   = ragione.Descrizione;

            this.SelectComboItem(this.ddl_tipo, ragione.Tipo.ToString());
            this.DdlTipo_SelectedIndexChanged(null, null);
            this.ddl_classificazioneObbligatoria.SelectedValue = ragione.ClassificazioneObbligatoria ? "Si" : "No";

            this.SelectComboItem(this.ddl_diritti, ragione.TipoDiritto.ToString());
            this.SelectComboItem(this.ddl_notifica, ragione.TipoNotifica.ToString());
            this.SelectComboItem(this.ddl_destinatario, ragione.TipoDestinatario.ToString());
            this.SelectComboItem(this.ddl_tipoRisposta, ragione.PrevedeRisposta.ToString());
            this.SelectComboItem(this.ddl_visibilita, ragione.Visibilita.ToString());
            this.SelectComboItem(this.ddl_risposta, ragione.Risposta.ToString());
            this.SelectComboItem(this.ddl_eredita, ragione.Eredita.ToString());

            if (this.isCessioneAbilitata())
            {
                this.pnl_cessione.Visible = true;
                this.SelectComboItem(this.ddl_cedeDiritti, ragione.PrevedeCessione.ToString());

                //
                // Nuova Logica: *******************************************************************************************
                // Se ragione.MantieniLettura == true && ragione.MantieniScrittura == true allora mantiene Scrittura
                // Se ragione.MantieniLettura == true && ragione.MantieniScrittura == false allora mantiene Lettura
                // Se ragione.MantieniLettura == false && ragione.MantieniScrittura == false allora nessun diritto mantenuto
                // *********************************************************************************************************
                this.SelectComboItemMantieniDiritti(this.ddl_mantieniLettura, ragione.MantieniLettura, ragione.MantieniScrittura);
                // End
                //

                //this.SelectComboItem(this.ddl_mantieniLettura, ragione.MantieniLettura.ToString());
                this.ddl_cedeDiritti_SelectedIndexChanged(null, null);
            }

            //Gestione Task
            if (InitConfigurationKeys.GetValue("0", "ENABLE_TASK") != null && InitConfigurationKeys.GetValue("0", "ENABLE_TASK").Equals("1"))
            {
                this.pnlPrevedeRisposta.Visible = false;
                this.pnlEUnaRisposta.Visible    = false;
                this.pnlTipoAttivita.Visible    = true;
                if (ragione.TipoTask)
                {
                    this.DdlTipoAttivita.SelectedValue = "Si";
                    this.DdlTipoAttivita_SelectedIndexChanged(null, null);
                    this.ddlTipologia.SelectedValue = ragione.IdTipoAtto;
                    this.ddl_contributo_obbligatorio.SelectedValue = ragione.ContributoTaskObbligatorio ? "Si" : "No";
                }
                else
                {
                    this.DdlTipoAttivita.SelectedValue = "No";
                    this.DdlTipoAttivita_SelectedIndexChanged(null, null);
                }
            }
            else
            {
                this.pnlPrevedeRisposta.Visible = true;
                this.pnlEUnaRisposta.Visible    = true;
                this.pnlTipoAttivita.Visible    = false;
                this.pnlColonnaVuota.Visible    = false;
            }
            if (CurrentIDRagioneTrasmissione != null && CurrentIDRagioneTrasmissione != String.Empty)
            {
                this.imgModMsgNotifica.Attributes.Add("onclick", "apriGestioneMsgNotifica(" + this.CurrentIDRagioneTrasmissione + "," + this.GetIDAmministrazione() + ");");
            }

            this.impostaBlocchiRispettoRagioniDiSistema(ragione);
        }