Exemplo n.º 1
0
 public Microsoft.Web.UI.WebControls.TreeNode  GetNode(string nodedata, Microsoft.Web.UI.WebControls.TreeView tv)
 {
     Stack.Clear();
     foreach (Microsoft.Web.UI.WebControls.TreeNode node in tv.Nodes)
     {
         QueryAllNode(node, nodedata);
     }
     Microsoft.Web.UI.WebControls.TreeNode StackNode = null;
     for (int i = 0; i < Stack.Count; i++)
     {
         StackNode = (Microsoft.Web.UI.WebControls.TreeNode)Stack[i];
         if (StackNode.Text == nodedata)
         {
             break;
         }
     }
     if (Stack != null)
     {
         Stack.Clear();
     }
     if (StackNode != null)
     {
         return(StackNode);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 2
0
 private void getTree()
 {
     DocsPAWA.DocsPaWR.Fascicolo fascicolo;
     try
     {
         fascicolo = FascicoliManager.getFascicoloSelezionato(this);
         if (fascicolo != null)
         {
             DocsPAWA.DocsPaWR.FascicolazioneClassifica[] FascClass;
             FascClass = FascicoliManager.getGerarchia(this, fascicolo.idClassificazione, UserManager.getUtente(this).idAmministrazione);
             caricaGerarchiaFascicolazioneClassifica(FascClass);
         }
         else
         {
             this.Gerarchia = null;
         }
     }
     catch (System.Exception es)
     {
         ErrorManager.redirect(this, es);
     }
 }
Exemplo n.º 3
0
 public OrganigrammaHandler(Microsoft.Web.UI.WebControls.TreeView treeView,
                            Label lbl_messaggio,
                            Label lbl_avviso,
                            DropDownList ddl_ricTipo,
                            HtmlInputHidden hd_returnValueModal,
                            ImageButton btn_find,
                            Button btn_conferma,
                            TextBox txt_ricDesc,
                            string js_function,
                            Page page)
 {
     this.treeView            = treeView;
     this.lbl_messaggio       = lbl_messaggio;
     this.lbl_avviso          = lbl_avviso;
     this.ddl_ricTipo         = ddl_ricTipo;
     this.hd_returnValueModal = hd_returnValueModal;
     this.btn_find            = btn_find;
     this.btn_conferma        = btn_conferma;
     this.txt_ricDesc         = txt_ricDesc;
     this.js_function         = js_function;
     this.page         = page;
     this.httpFullPath = DocsPAWA.Utils.getHttpFullPath(this.page);
 }
Exemplo n.º 4
0
        private static Microsoft.Web.UI.WebControls.TreeNode getSelectedNodeFolder(Page page, Microsoft.Web.UI.WebControls.TreeView Folders)
        {
            Microsoft.Web.UI.WebControls.TreeNode nodeToSelect;
            if (page.Session["fascDocumenti.nodoSelezionato"] != null)
            {
                nodeToSelect = (Microsoft.Web.UI.WebControls.TreeNode)page.Session["fascDocumenti.nodoSelezionato"];
            }
            else
            {
                if (Folders.Nodes.Count > 0)
                {
                    nodeToSelect = Folders.GetNodeFromIndex(Folders.SelectedNodeIndex);
                }
                else
                {
                    nodeToSelect = null;
                }
                page.Session["fascDocumenti.nodoSelezionato"] = nodeToSelect;
            }

            return(nodeToSelect);
        }
Exemplo n.º 5
0
        public static void verificaCampiPersonalizzati(Page page, SAAdminTool.DocsPaWR.Fascicolo fascicolo, Microsoft.Web.UI.WebControls.TreeView Folders, bool editMode)
        {
            System.Web.UI.WebControls.DropDownList ddl_tipoFasc            = (System.Web.UI.WebControls.DropDownList)page.FindControl("ddl_tipologiaFasc");
            System.Web.UI.WebControls.ImageButton  btn_CampiPersonalizzati = (System.Web.UI.WebControls.ImageButton)page.FindControl("img_btnDettagliProf");
            System.Web.UI.WebControls.TextBox      txt_fascdesc            = (System.Web.UI.WebControls.TextBox)page.FindControl("txt_fascdesc");

            //Fascicolo senza tipologia (Apro la lista documenti in fascicolo)
            if (fascicolo != null && (fascicolo.template == null || fascicolo.template.SYSTEM_ID == 0) && string.IsNullOrEmpty(ddl_tipoFasc.SelectedValue))
            {
                ddl_tipoFasc.Enabled            = editMode;
                btn_CampiPersonalizzati.Enabled = editMode;

                page.Session["ListaDocs-CampiProf"] = "ListaDocs";
                string urlFormattata = System.Text.RegularExpressions.Regex.Replace(txt_fascdesc.Text, @"[\000\010\011\012\015\032\042\047\134\140]", "\\$0");
                string newUrl        = "tabPulsantiDoc.aspx?idFolder=" + getSelectedNodeFolder(page, Folders).ID.ToString() + "&AclRevocata=" + GetControlAclFascicolo(page).AclRevocata.ToString();// + "&codFasc=" + urlFormattata;
                page.ClientScript.RegisterStartupScript(page.GetType(), "apriPopUp", "top.principale.iFrame_dx.document.location='" + newUrl + "';", true);
            }

            //Fascicolo con tipologia (Apro i campi profilati del fascicolo)
            if (System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamicaFasc"] != null && System.Configuration.ConfigurationManager.AppSettings["ProfilazioneDinamicaFasc"] == "1" && fascicolo.tipo.Equals("P"))
            {
                //Fasciolo con template salvato
                if (fascicolo != null && fascicolo.template != null && fascicolo.template.SYSTEM_ID != 0)
                {
                    ddl_tipoFasc.Enabled            = false;
                    btn_CampiPersonalizzati.Enabled = true;

                    System.Web.UI.WebControls.ListItem item = new System.Web.UI.WebControls.ListItem(fascicolo.template.DESCRIZIONE, fascicolo.template.SYSTEM_ID.ToString());
                    if (!ddl_tipoFasc.Items.Contains(item))
                    {
                        ddl_tipoFasc.Items.Add(item);
                        ddl_tipoFasc.SelectedValue = item.Value;
                    }

                    page.Session["Template"]            = fascicolo.template;
                    page.Session["ListaDocs-CampiProf"] = "CampiProf";
                    string newUrl = "tabPulsantiDoc.aspx?tipoFascicolo=" + fascicolo.tipo + "&codTipologiaFasc=" + ddl_tipoFasc.SelectedValue.ToString() + "&editMode=" + editMode.ToString() + "&AclRevocata=" + GetControlAclFascicolo(page).AclRevocata.ToString();// + "&codFasc=" + txt_fascdesc.Text;
                    page.ClientScript.RegisterStartupScript(page.GetType(), "apriPopUp", "top.principale.iFrame_dx.document.location='" + newUrl + "';", true);
                }

                //Fasciolo con template appena selezionato
                if (fascicolo != null && fascicolo.template != null && fascicolo.template.SYSTEM_ID == 0 && !string.IsNullOrEmpty(ddl_tipoFasc.SelectedValue))
                {
                    ddl_tipoFasc.Enabled            = true;
                    btn_CampiPersonalizzati.Enabled = true;

                    page.Session["ListaDocs-CampiProf"] = "CampiProf";
                    string newUrl = "tabPulsantiDoc.aspx?tipoFascicolo=" + fascicolo.tipo + "&codTipologiaFasc=" + ddl_tipoFasc.SelectedValue.ToString() + "&editMode=" + editMode.ToString() + "&AclRevocata=" + GetControlAclFascicolo(page).AclRevocata.ToString();// + "&codFasc=" + txt_fascdesc.Text;
                    page.ClientScript.RegisterStartupScript(page.GetType(), "apriPopUp", "top.principale.iFrame_dx.document.location='" + newUrl + "';", true);
                }
            }
            else
            {
                if (fascicolo != null)
                {
                    string newUrl = "tabPulsantiDoc.aspx?tipoFascicolo=" + fascicolo.tipo + "&editMode=" + editMode.ToString() + "&AclRevocata=" + GetControlAclFascicolo(page).AclRevocata.ToString();
                    page.ClientScript.RegisterStartupScript(page.GetType(), "apriPopUp", "top.principale.iFrame_dx.document.location='" + newUrl + "';", true);
                }
            }
        }