示例#1
0
        public ArrayList ListaIDUOParent(string idUO)
        {
            Amministrazione.Manager.OrganigrammaManager ammMng = new Amministrazione.Manager.OrganigrammaManager();
            ammMng.ListaIDParentRicerca(idUO, "U");
            ArrayList lista = ammMng.getListaIDParentRicerca();

            return(lista);
        }
示例#2
0
        public void RicercaNodo(string returnValue, string tipo)
        {
            try
            {
                //this.hd_returnValueModal.Value = "";
                string[] appo          = returnValue.Split('_');
                string   idCorrGlobale = appo[0];
                string   idParent      = appo[1];
                if (string.IsNullOrEmpty(tipo))
                {
                    tipo = this.ddl_ricTipo.SelectedValue;
                }
                string idAmm = UserManager.getInfoUtente().idAmministrazione;
                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.ListaUOLivelloZero(idAmm);
                this.LoadTreeviewLivelloZero(theManager.getListaUO());
                theManager.ListaIDParentRicerca(idParent, tipo);
                if (theManager.getListaIDParentRicerca() != null && theManager.getListaIDParentRicerca().Count > 0)
                {
                    ArrayList lista = new ArrayList();
                    theManager.getListaIDParentRicerca().Reverse();
                    lista = theManager.getListaIDParentRicerca();
                    lista.Add(Convert.ToInt32(idCorrGlobale));

                    for (int n = 1; n <= lista.Count - 1; n++)
                    {
                        OrganigrammaTreeNode TreeNodo;
                        TreeNodo = (OrganigrammaTreeNode)this.treeView.GetNodeFromIndex(treeView.SelectedNodeIndex);
                        foreach (OrganigrammaTreeNode nodo in TreeNodo.Nodes)
                        {
                            if (nodo.ID.Equals(lista[n].ToString()) && nodo.ID != idCorrGlobale)
                            {
                                if (nodo.getTipoNodo().Equals("U"))
                                {
                                    this.LoadTreeViewLivelloFigli(nodo.GetNodeIndex(), nodo.getTipoNodo());
                                }
                                else
                                {
                                    nodo.Expanded = true;
                                }
                                treeView.SelectedNodeIndex = nodo.GetNodeIndex();
                                break;
                            }
                            if (nodo.ID.Equals(lista[n].ToString()) && nodo.ID.Equals(idCorrGlobale))
                            {
                                treeView.SelectedNodeIndex = nodo.GetNodeIndex();
                                break;
                            }
                        }
                    }
                }
                this.hd_returnValueModal.Value = "";
            }
            catch
            {
                this.lbl_avviso.Text = "Attenzione! si è verificato un errore";
            }
        }
示例#3
0
        /// <summary>
        /// Ritorna la UO padre
        /// </summary>
        /// <param name="idCorrGlobRuolo"></param>
        /// <param name="tipo"></param>
        /// <returns></returns>
        private string GetUOPadre(string idCorrGlobRuolo, string tipo)
        {
            string idCorrGlob = string.Empty;

            Amministrazione.Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();
            manager.ListaIDParentRicerca(idCorrGlobRuolo, tipo);
            if (manager.getListaIDParentRicerca() != null && manager.getListaIDParentRicerca().Count > 0)
            {
                ArrayList lista = manager.getListaIDParentRicerca();
                idCorrGlob = lista[1].ToString();
            }
            return(idCorrGlob);
        }
示例#4
0
        /// <summary>
        /// Ricerca il nodo in Treeview
        /// </summary>
        /// <param name="returnValue"></param>
        private void RicercaNodo(string returnValue)
        {
            bool       finded         = false;
            myTreeNode TreeNodoFinded = new myTreeNode();

            try
            {
                this.hd_returnValueModal.Value = "";

                string[] appo = returnValue.Split('_');

                string idCorrGlobale = appo[0];
                string idParent      = appo[1];

                string tipo = this.ddl_ricTipo.SelectedValue;

                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.ListaUOLivelloZero(this.hd_idAmm.Value);

                this.LoadTreeviewLivelloZero(theManager.getListaUO());

                this.SelezionaPrimo();

                theManager.ListaIDParentRicerca(idParent, tipo);

                if (theManager.getListaIDParentRicerca() != null && theManager.getListaIDParentRicerca().Count > 0)
                {
                    ArrayList lista = new ArrayList();
                    theManager.getListaIDParentRicerca().Reverse();
                    lista = theManager.getListaIDParentRicerca();

                    lista.Add(Convert.ToInt32(idCorrGlobale));

                    for (int n = 1; n <= lista.Count - 1; n++)
                    {
                        myTreeNode TreeNodo;
                        TreeNodo = (myTreeNode)treeViewUO.GetNodeFromIndex(treeViewUO.SelectedNodeIndex);

                        foreach (myTreeNode nodo in TreeNodo.Nodes)
                        {
                            if (nodo.ID.Equals(lista[n].ToString()) && nodo.ID != idCorrGlobale)
                            {
                                if (nodo.getTipoNodo().Equals("U"))
                                {
                                    this.LoadTreeViewLivelloFigli(nodo.GetNodeIndex(), nodo.getTipoNodo());
                                }
                                else
                                {
                                    nodo.Expanded = true;
                                }
                                treeViewUO.SelectedNodeIndex = nodo.GetNodeIndex();
                                break;
                            }
                            if (nodo.ID.Equals(lista[n].ToString()) && nodo.ID.Equals(idCorrGlobale))
                            {
                                treeViewUO.SelectedNodeIndex = nodo.GetNodeIndex();
                                finded         = true;
                                TreeNodoFinded = nodo;
                                break;
                            }
                        }
                    }

                    if (finded && !this.GetReadOnly())
                    {
                        this.TornaAllaWndChiamante(TreeNodoFinded);
                    }
                }
            }
            catch
            {
                this.executeJS("<SCRIPT>alert('Attenzione, si è verificato un errore di sistema');</SCRIPT>");
            }
        }