Пример #1
0
        private void LoadUoAttualiRF(string tipoRicerca, string ricerca)
        {
            try
            {
                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();

                //Cerco solo UO della AOO COLLEGATA: idAooColl
                //theManager.ListaUOInReg(Request.QueryString["idAooColl"].ToString(), tipoRicerca, ricerca);

                //Cerco tutte le UO dell'amministrazione
                theManager.ListaUO("", "", Request.QueryString["idAmm"].ToString());

                //if (theManager.getListaUOInReg() != null && theManager.getListaUOInReg().Count > 0)
                if (theManager.getListaUO() != null && theManager.getListaUO().Count > 0)
                {
                    this.dg_ruoli.Visible             = true;
                    this.dg_ruoliTrovatiInRF.Visible  = false;
                    this.dg_UOTrovatiInRF.Visible     = true;
                    this.lbl_risultatoRuoliRF.Visible = false;

                    this.InitializeDataSetUO();

                    DataRow row;

                    //foreach (DocsPAWA.DocsPaWR.OrgUO uo in theManager.getListaUOInReg())
                    foreach (DocsPAWA.DocsPaWR.OrgUO uo in theManager.getListaUO())
                    {
                        row                = dsUo.Tables[0].NewRow();
                        row["codice"]      = uo.Codice;
                        row["IDUO"]        = uo.IDCorrGlobale;
                        row["descrizione"] = uo.Descrizione;

                        dsUo.Tables["UO"].Rows.Add(row);
                    }

                    this.SetSessionDataSetUo(dsUo);

                    DataView dv = dsUo.Tables["UO"].DefaultView;
                    dv.Sort = "descrizione ASC";
                    this.dg_UOTrovatiInRF.DataSource = dv;
                    this.dg_UOTrovatiInRF.DataBind();
                }
            }
            catch
            {
                this.gestErrori();
            }
        }
Пример #2
0
        private void FillOrdinamentoUO()
        {
            int livello = Convert.ToInt32(idLivello) + 1;

            Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            theManager.ListaUO(idUO, idLivello, idAmm);

            ArrayList lista = new ArrayList();

            lista = theManager.getListaUO();

            if (lista != null && lista.Count > 0)
            {
                InitializeDataSetOrdinamentoUO();
                DataRow row;

                foreach (SAAdminTool.DocsPaWR.OrgUO uo in lista)
                {
                    row = dsOrdUOInf.Tables[0].NewRow();
                    row["idCorrGlobale"] = uo.IDCorrGlobale;
                    row["idPeso"]        = uo.IDPeso;
                    row["descrizione"]   = uo.Descrizione;
                    dsOrdUOInf.Tables["ORD_UO"].Rows.Add(row);
                }

                //DataView dv = dsOrdUOInf.Tables["ORD_UO"].DefaultView;
                //dv.Sort = "idPeso ASC";
                //dv = OrdinaGrid(dv, "idPeso");
                //this.dg_ord_uo.DataSource = dv;
                this.dg_ord_uo.DataSource = dsOrdUOInf;
                this.dg_ord_uo.DataBind();

                this.dg_ord_uo.SelectedIndex = this.indiceDG_UO_Selezionato;

                this.GestioneFrecceOrdUO();
            }
        }
Пример #3
0
        /// <summary>
        /// Visualizza le sotto UO
        /// </summary>
        /// <param name="currentUO"></param>
        /// <param name="indice"></param>
        /// <returns></returns>
        private bool SottoUO(DocsPAWA.DocsPaWR.OrgUO currentUO, string indice)
        {
            bool retValue = true;

            myTreeNode TreeNodo;
            myTreeNode TreeNodoFiglio;

            if (indice != null)
            {
                TreeNodo = (myTreeNode)treeViewUO.GetNodeFromIndex(indice);
            }
            else
            {
                TreeNodo = (myTreeNode)treeViewUO.GetNodeFromIndex(treeViewUO.SelectedNodeIndex);
            }

            myTreeNode nodoUO;

            ArrayList lista = new ArrayList();

            int livello = Convert.ToInt32(currentUO.Livello) + 1;

            Amministrazione.Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();
            manager.ListaUO(currentUO.IDCorrGlobale, Convert.ToString(livello), currentUO.IDAmministrazione);
            lista = manager.getListaUO();

            if (lista != null && lista.Count > 0)
            {
                if (!this.isOrdinamentoAbilitato())
                {
                    lista.Sort(new UOSort());
                }

                foreach (DocsPAWA.DocsPaWR.OrgUO sottoUO in lista)
                {
                    nodoUO = new myTreeNode();

                    nodoUO.ID       = sottoUO.IDCorrGlobale;
                    nodoUO.Text     = sottoUO.CodiceRubrica + " - " + sottoUO.Descrizione;
                    nodoUO.ImageUrl = HttpFullPath + "/AdminTool/Images/uo.gif";

                    TreeNodo.Nodes.Add(nodoUO);

                    nodoUO.setTipoNodo("U");
                    nodoUO.setRuoliUO(sottoUO.Ruoli);
                    nodoUO.setSottoUO(sottoUO.SottoUo);
                    nodoUO.setLivello(sottoUO.Livello);

                    if ((this.GetTipoNavigazione() > 1 && Convert.ToInt32(sottoUO.Ruoli) > 0) || Convert.ToInt32(sottoUO.SottoUo) > 0)
                    {
                        TreeNodoFiglio      = new myTreeNode();
                        TreeNodoFiglio.Text = "<font color='#ff0000'>&nbsp;loading...</font>";
                        nodoUO.Nodes.Add(TreeNodoFiglio);
                    }
                }
            }
            else
            {
                retValue = false;
            }

            return(retValue);
        }
Пример #4
0
        /// <summary>
        /// Caricamento dati UO livelli figli
        /// </summary>
        /// <param name="indice"></param>
        /// <param name="tipoNodo"></param>
        private void LoadTreeViewLivelloFigli(string indice, string tipoNodo)
        {
            try
            {
                string myPath = DocsPAWA.Utils.getHttpFullPath(this);

                if (this.GetReadOnly())
                {
                    treeViewUO.SelectedNodeIndex = indice;
                }

                ArrayList lista = new ArrayList();

                myTreeNode TreeNodo;
                TreeNodo          = (myTreeNode)treeViewUO.GetNodeFromIndex(indice);
                TreeNodo.Expanded = true;

                if (TreeNodo.Nodes.Count > 0)
                {
                    TreeNodo.Nodes.RemoveAt(0);
                }

                myTreeNode nodoRuoli;
                myTreeNode nodoUtenti;
                myTreeNode nodoUO;
                myTreeNode nodoFiglio;

                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();

                theManager.ListaRuoliUO(TreeNodo.getIDCorrGlobale());

                if (this.GetTipoNavigazione() > 1)
                {
                    lista = theManager.getListaRuoliUO();

                    // ... ruoli
                    if (lista != null && lista.Count > 0)
                    {
                        foreach (DocsPAWA.DocsPaWR.OrgRuolo ruolo in lista)
                        {
                            nodoRuoli = new myTreeNode();

                            nodoRuoli.ID       = ruolo.IDCorrGlobale;
                            nodoRuoli.Text     = ruolo.CodiceRubrica + " - " + ruolo.Descrizione;
                            nodoRuoli.ImageUrl = myPath + "/AdminTool/Images/ruolo.gif";

                            TreeNodo.Nodes.Add(nodoRuoli);

                            nodoRuoli.setTipoNodo("R");
                            nodoRuoli.setIDCorrGlobale(ruolo.IDCorrGlobale);
                            nodoRuoli.setIDTipoRuolo(ruolo.IDTipoRuolo);
                            nodoRuoli.setIDGruppo(ruolo.IDGruppo);
                            nodoRuoli.setCodice(ruolo.Codice);
                            nodoRuoli.setCodiceRubrica(ruolo.CodiceRubrica);
                            nodoRuoli.setDescrizione(ruolo.Descrizione);
                            nodoRuoli.setIDAmministrazione(ruolo.IDAmministrazione);

                            // ... utenti
                            if (ruolo.Utenti.Length > 0)
                            {
                                if (this.GetTipoNavigazione() > 2)
                                {
                                    foreach (DocsPAWA.DocsPaWR.OrgUtente utente in ruolo.Utenti)
                                    {
                                        nodoUtenti = new myTreeNode();

                                        nodoUtenti.ID       = utente.IDCorrGlobale;
                                        nodoUtenti.Text     = utente.CodiceRubrica + " - " + utente.Cognome + " " + utente.Nome;
                                        nodoUtenti.ImageUrl = myPath + "/AdminTool/Images/utente.gif";

                                        nodoRuoli.Nodes.Add(nodoUtenti);

                                        nodoUtenti.setTipoNodo("P");
                                        nodoUtenti.setIDCorrGlobale(utente.IDCorrGlobale);
                                        nodoUtenti.setIDPeople(utente.IDPeople);
                                        nodoUtenti.setCodice(utente.Codice);
                                        nodoUtenti.setCodiceRubrica(utente.CodiceRubrica);
                                        nodoUtenti.setIDAmministrazione(utente.IDAmministrazione);
                                    }
                                }
                            }                             // fine inserimento utenti
                            else
                            {
                                nodoRuoli.Text = ruolo.CodiceRubrica + " - " + ruolo.Descrizione;
                            }
                        }                         // fine inserimento ruoli
                    }
                }


                // ... uo sottostanti
                int livello = Convert.ToInt32(TreeNodo.getLivello()) + 1;

                theManager.ListaUO(TreeNodo.getIDCorrGlobale(), livello.ToString(), TreeNodo.getIDAmministrazione());
                lista = theManager.getListaUO();

                if (lista != null && lista.Count > 0)
                {
                    foreach (DocsPAWA.DocsPaWR.OrgUO sub_uo in lista)
                    {
                        nodoUO = new myTreeNode();

                        nodoUO.ID       = sub_uo.IDCorrGlobale;
                        nodoUO.Text     = sub_uo.CodiceRubrica + " - " + sub_uo.Descrizione;
                        nodoUO.ImageUrl = myPath + "/AdminTool/Images/uo.gif";

                        TreeNodo.Nodes.Add(nodoUO);

                        nodoUO.setTipoNodo("U");
                        nodoUO.setIDCorrGlobale(sub_uo.IDCorrGlobale);
                        nodoUO.setCodice(sub_uo.Codice);
                        nodoUO.setCodiceRubrica(sub_uo.CodiceRubrica);
                        nodoUO.setDescrizione(sub_uo.Descrizione);
                        nodoUO.setLivello(sub_uo.Livello);
                        nodoUO.setIDAmministrazione(sub_uo.IDAmministrazione);

                        if ((!sub_uo.Ruoli.Equals("0")) || (!sub_uo.SottoUo.Equals("0")))
                        {
                            nodoFiglio      = new myTreeNode();
                            nodoFiglio.Text = "<font color='#ff0000'>&nbsp;loading...</font>";
                            nodoUO.Nodes.Add(nodoFiglio);
                        }
                        else
                        {
                            nodoUO.Text = sub_uo.CodiceRubrica + " - " + sub_uo.Descrizione;
                        }
                    }                     // fine inserimento uo sottostanti
                }
            }
            catch
            {
                this.executeJS("<SCRIPT>alert('Attenzione, si è verificato un errore di sistema');</SCRIPT>");
            }
        }
Пример #5
0
        private void LoadTreeViewLivelloFigli(string indice, string tipoNodo)
        {
            try
            {
                treeView.SelectedNodeIndex = indice;
                OrganigrammaTreeNode TreeNodo;
                TreeNodo          = (OrganigrammaTreeNode)treeView.GetNodeFromIndex(indice);
                TreeNodo.Expanded = true;
                if (TreeNodo.Nodes.Count > 0)
                {
                    TreeNodo.Nodes.RemoveAt(0);
                }
                OrganigrammaTreeNode nodoRuoli;
                OrganigrammaTreeNode nodoUtenti;
                OrganigrammaTreeNode nodoUO;
                OrganigrammaTreeNode nodoFiglio;
                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.ListaRuoliUO(TreeNodo.getIDCorrGlobale());
                ArrayList lista = new ArrayList();
                lista = theManager.getListaRuoliUO();
                // ... ruoli
                if (lista != null && lista.Count > 0)
                {
                    foreach (DocsPAWA.DocsPaWR.OrgRuolo ruolo in lista)
                    {
                        nodoRuoli          = new OrganigrammaTreeNode();
                        nodoRuoli.ID       = ruolo.IDCorrGlobale;
                        nodoRuoli.Text     = ruolo.CodiceRubrica + " - " + ruolo.Descrizione;
                        nodoRuoli.ImageUrl = httpFullPath + "/AdminTool/Images/ruolo.gif";

                        TreeNodo.Nodes.Add(nodoRuoli);

                        nodoRuoli.setTipoNodo("R");
                        nodoRuoli.setIDCorrGlobale(ruolo.IDCorrGlobale);
                        nodoRuoli.setIDTipoRuolo(ruolo.IDTipoRuolo);
                        nodoRuoli.setIDGruppo(ruolo.IDGruppo);
                        nodoRuoli.setCodice(ruolo.Codice);
                        nodoRuoli.setCodiceRubrica(ruolo.CodiceRubrica);
                        nodoRuoli.setDescrizione(ruolo.Descrizione);
                        nodoRuoli.setDiRiferimento(ruolo.DiRiferimento);
                        nodoRuoli.setIDAmministrazione(ruolo.IDAmministrazione);
                        nodoRuoli.setPercorso(TreeNodo.getPercorso() + ruolo.Descrizione + " &gt; ");
                        nodoRuoli.setResponsabile(ruolo.Responsabile);
                        // ... utenti
                        if (ruolo.Utenti.Length > 0)
                        {
                            foreach (DocsPAWA.DocsPaWR.OrgUtente utente in ruolo.Utenti)
                            {
                                nodoUtenti          = new OrganigrammaTreeNode();
                                nodoUtenti.ID       = utente.IDCorrGlobale;
                                nodoUtenti.Text     = utente.CodiceRubrica + " - " + utente.Cognome + " " + utente.Nome;
                                nodoUtenti.ImageUrl = httpFullPath + "/AdminTool/Images/utente.gif";
                                nodoRuoli.Nodes.Add(nodoUtenti);
                                nodoUtenti.setTipoNodo("P");
                                nodoUtenti.setIDCorrGlobale(utente.IDCorrGlobale);
                                nodoUtenti.setIDPeople(utente.IDPeople);
                                nodoUtenti.setCodice(utente.Codice);
                                nodoUtenti.setCodiceRubrica(utente.CodiceRubrica);
                                nodoUtenti.setIDAmministrazione(utente.IDAmministrazione);
                            }
                        } // fine inserimento utenti
                        else
                        {
                            nodoRuoli.Text = ruolo.CodiceRubrica + " - " + ruolo.Descrizione;
                        }
                    } // fine inserimento ruoli
                }

                // ... uo sottostanti
                int livello = Convert.ToInt32(TreeNodo.getLivello()) + 1;

                theManager.ListaUO(TreeNodo.getIDCorrGlobale(), livello.ToString(), TreeNodo.getIDAmministrazione());
                lista = theManager.getListaUO();

                if (lista != null && lista.Count > 0)
                {
                    foreach (DocsPAWA.DocsPaWR.OrgUO sub_uo in lista)
                    {
                        nodoUO          = new OrganigrammaTreeNode();
                        nodoUO.ID       = sub_uo.IDCorrGlobale;
                        nodoUO.Text     = sub_uo.CodiceRubrica + " - " + sub_uo.Descrizione;
                        nodoUO.ImageUrl = httpFullPath + "/AdminTool/Images/uo.gif";
                        TreeNodo.Nodes.Add(nodoUO);
                        nodoUO.setTipoNodo("U");
                        nodoUO.setIDCorrGlobale(sub_uo.IDCorrGlobale);
                        nodoUO.setCodice(sub_uo.Codice);
                        nodoUO.setCodiceRubrica(sub_uo.CodiceRubrica);
                        nodoUO.setDescrizione(sub_uo.Descrizione);
                        nodoUO.setLivello(sub_uo.Livello);
                        nodoUO.setIDAmministrazione(sub_uo.IDAmministrazione);
                        nodoUO.setCodRegInterop(sub_uo.CodiceRegistroInterop);
                        nodoUO.setPercorso(TreeNodo.getPercorso() + sub_uo.Descrizione + " &gt; ");

                        if ((!sub_uo.Ruoli.Equals("0")) || (!sub_uo.SottoUo.Equals("0")))
                        {
                            nodoFiglio      = new OrganigrammaTreeNode();
                            nodoFiglio.Text = "<font color='#ff0000'>&nbsp;loading...</font>";
                            nodoUO.Nodes.Add(nodoFiglio);
                        }
                        else
                        {
                            nodoUO.Text = sub_uo.CodiceRubrica + " - " + sub_uo.Descrizione;
                        }
                    } // fine inserimento uo sottostanti
                }
            }
            catch
            {
                lbl_messaggio.Text = "Attenzione! si è verificato un errore";
            }
        }