示例#1
0
 public void InizializeTree()
 {
     try
     {
         string idAmm = UserManager.getInfoUtente().idAmministrazione;
         Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
         if (!string.IsNullOrEmpty(idAmm))
         {
             theManager.ListaUOLivelloZero(idAmm);
             if (theManager.getListaUO() != null && theManager.getListaUO().Count > 0)
             {
                 this.btn_find.Attributes.Add("onclick", js_function + "('" + idAmm + "');");
                 this.LoadTreeviewLivelloZero(theManager.getListaUO());
             }
         }
         else
         {
             this.lbl_avviso.Text = "Attenzione! l'amministrazione corrente non risulta essere presente nel database.<br><br>Effettuare il Chiudi e trasmetti.";
         }
     }
     catch
     {
         this.lbl_avviso.Text = "Attenzione! si è verificato un errore";
     }
 }
示例#2
0
        private void txt_ricCod_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();

                theManager.RicercaInOrg("U", this.txt_ricCod.Text.Trim(), "", this.hd_idAmm.Value, false, true);

                if (theManager.getRisultatoRicerca() != null && theManager.getRisultatoRicerca().Count.Equals(1))
                {
                    foreach (DocsPAWA.DocsPaWR.OrgRisultatoRicerca risultato in theManager.getRisultatoRicerca())
                    {
                        this.txt_ricDesc.Text        = risultato.Descrizione;
                        this.hd_idCorrGlobDest.Value = risultato.IDCorrGlob;

                        this.SetFocus(this.txt_codice, false);

                        DocsPAWA.Utils.DefaultButton(this, ref txt_codice, ref btn_sposta);
                        DocsPAWA.Utils.DefaultButton(this, ref txt_descrizione, ref btn_sposta);
                    }
                }
                else
                {
                    this.executeJS("<SCRIPT>alert('Nessuna UO trovata');</SCRIPT>");
                    this.SetFocus(this.txt_ricCod, true);
                    this.txt_ricDesc.Text = "";
                }
            }
            catch
            {
                this.executeJS("<SCRIPT>alert('Attenzione, si è verificato un errore di sistema');</SCRIPT>");
            }
        }
示例#3
0
        private void FillOrdinamentoRuoli()
        {
            Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            theManager.ListaRuoliUO(idUO);

            ArrayList lista = new ArrayList();

            lista = theManager.getListaRuoliUO();

            if (lista != null && lista.Count > 0)
            {
                InitializeDataSetOrdinamentoRuoli();
                DataRow row;
                foreach (SAAdminTool.DocsPaWR.OrgRuolo ruolo in lista)
                {
                    row = dsOrdRuoli.Tables[0].NewRow();
                    row["idCorrGlobale"] = ruolo.IDCorrGlobale;
                    row["idPeso"]        = ruolo.IDPeso;
                    row["descrizione"]   = ruolo.Descrizione;
                    dsOrdRuoli.Tables["ORD_RUOLI"].Rows.Add(row);
                }

                //DataView dv = dsOrdRuoli.Tables["ORD_RUOLI"].DefaultView;
                //dv.Sort = "idPeso ASC";
                //dv = OrdinaGrid(didPesov, "");
                //this.dg_ord_ruoli.DataSource = dv;
                this.dg_ord_ruoli.DataSource = dsOrdRuoli;
                this.dg_ord_ruoli.DataBind();

                this.dg_ord_ruoli.SelectedIndex = this.indiceDG_RUOLO_Selezionato;

                this.GestioneFrecceOrdRuoli();
            }
        }
示例#4
0
        protected void dg_UOTrovatiInRF_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            if (e.Item.Cells.Count > 1)
            {
                string idUo = e.Item.Cells[1].Text;

                // metodo che mi restituisce tutti i ruoli di un dato UO
                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.ListaRuoliUORic(idUo, true);

                ArrayList ii = theManager.getListaRuoliUO();
                if (theManager.getListaRuoliUO() != null)
                {
                    this.InitializeDataSetUO();
                    foreach (DocsPaWR.OrgRuolo ruo in theManager.getListaRuoliUO())
                    {
                        if (this.AssociazioneRuoloRF(ruo.IDCorrGlobale, Request.QueryString["idReg"]))
                        {
                            LoadRuoliAttualiRF();
                        }
                    }
                    dsUo = GetSessionDataSetUO();

                    LoadRicercaUODopoIns(dsUo, idUo);
                }
            }
        }
示例#5
0
        /// <summary>
        /// Pulsante di Stampa
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_stampa_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            try
            {
                XmlDocument xmlDoc = this.exportToXML();

                if (xmlDoc != null && (xmlDoc.InnerXml != string.Empty || xmlDoc.InnerXml != ""))
                {
                    DocsPaWR.FileDocumento filePdf = new DocsPAWA.DocsPaWR.FileDocumento();
                    Amministrazione.Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();

                    manager.StampaOrganigramma(xmlDoc);

                    filePdf = manager.getFilePDF();

                    if (filePdf != null && filePdf.content.Length > 0)
                    {
                        manager.setSessionFilePDF(filePdf);
                        this.executeJS("<SCRIPT>stampa();</SCRIPT>");
                    }
                }
            }
            catch (Exception ex)
            {
                this.executeJS("<SCRIPT>alert('Errore di sistema: " + ex.Message.Replace("'", "\\'") + "');</SCRIPT>");
            }
        }
        private bool VerificaUtenteRespStampeRep(string userId, string roleId, string idAmm)
        {
            bool result = false;

            try
            {
                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.VerificaUtenteRespStampeRep(userId, roleId, idAmm);

                SAAdminTool.DocsPaWR.EsitoOperazione esito = new SAAdminTool.DocsPaWR.EsitoOperazione();
                esito = theManager.getEsitoOperazione();

                if (esito.Codice.Equals(0))
                {
                    result = true;
                }
                else
                {
                    if (!this.Page.IsStartupScriptRegistered("alertStampaRep"))
                    {
                        string scriptString = "<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "''") + "');</SCRIPT>";
                        this.Page.RegisterStartupScript("alertStampaRep", scriptString);
                    }
                }
            }
            catch
            {
                this.gestErrori();
            }

            return(result);
        }
示例#7
0
        private void txt_ricCod_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                if (this.txt_ricCod.Text.Trim() != "" && this.txt_ricCod.Text.Trim().Length > 0)
                {
                    Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();

                    theManager.RicercaInOrg("R", this.txt_ricCod.Text.Trim(), "", this.hd_idAmm.Value, false, true);

                    if (theManager.getRisultatoRicerca() != null && theManager.getRisultatoRicerca().Count.Equals(1))
                    {
                        foreach (DocsPAWA.DocsPaWR.OrgRisultatoRicerca risultato in theManager.getRisultatoRicerca())
                        {
                            this.txt_ricDesc.Text = risultato.Descrizione;
                            this.hd_idCorrGlobGruppoDest.Value = risultato.IDCorrGlob;
                            this.hd_idGruppoDest.Value         = risultato.IDGruppo;
                        }
                    }
                    else
                    {
                        this.executeJS("<SCRIPT>alert('Nessun ruolo trovato');document.Form1.txt_ricDesc.select();</SCRIPT>");
                        this.SetFocus(this.txt_ricCod, true);
                        this.txt_ricDesc.Text = "";
                    }
                }
            }
            catch
            {
            }
        }
        private bool RuoloConTrasmissioni(string idCorrGlobRuolo)
        {
            bool result = true;

            try
            {
                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.VerificaTrasmRuolo(idCorrGlobRuolo);

                SAAdminTool.DocsPaWR.EsitoOperazione esito = new SAAdminTool.DocsPaWR.EsitoOperazione();
                esito = theManager.getEsitoOperazione();

                if (esito.Codice.Equals(0))
                {
                    result = false;
                }

                esito = null;
            }
            catch
            {
                this.gestErrori();
            }
            return(result);
        }
        private bool RifiutaTrasmConWF(string idCorrGlobRuolo)
        {
            bool result = false;

            try
            {
                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.RifiutaTrasmConWF(idCorrGlobRuolo);

                SAAdminTool.DocsPaWR.EsitoOperazione esito = new SAAdminTool.DocsPaWR.EsitoOperazione();
                esito = theManager.getEsitoOperazione();

                if (esito.Codice.Equals(0))
                {
                    result = true;
                }
                else
                {
                    if (!this.Page.IsStartupScriptRegistered("alertJavaScript"))
                    {
                        string scriptString = "<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "''") + "');</SCRIPT>";
                        this.Page.RegisterStartupScript("alertJavaScript", scriptString);
                    }
                }

                esito = null;
            }
            catch
            {
                this.gestErrori();
            }

            return(result);
        }
示例#10
0
        private bool IsUsersConnected(string idGruppoDaSpostare, string idAmm)
        {
            bool retValue = false;

            Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();
            manager.ListaUtenti(idGruppoDaSpostare);
            ArrayList listaUtenti = manager.getListaUtenti();

            if (manager.getListaUtenti() != null && manager.getListaUtenti().Count > 0)
            {
                DocsPAWA.DocsPaWR.EsitoOperazione esito = new DocsPAWA.DocsPaWR.EsitoOperazione();

                foreach (DocsPAWA.DocsPaWR.OrgUtente utente in manager.getListaUtenti())
                {
                    manager.VerificaUtenteLoggato(utente.CodiceRubrica, idAmm);
                    esito = manager.getEsitoOperazione();
                    if (esito.Codice > 0)
                    {
                        _listaUtentiConnessi += "- " + utente.Cognome + " " + utente.Nome + "\\n";
                    }
                }
            }

            if (!_listaUtentiConnessi.Equals(string.Empty))
            {
                retValue = true;
            }

            return(retValue);
        }
示例#11
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                DocsPaWR.FileDocumento filePdf = new DocsPAWA.DocsPaWR.FileDocumento();
                Amministrazione.Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();
                filePdf = manager.getSessionFilePDF();
                manager.releaseSessionFilePDF();

                if (filePdf.content.Length > 0)
                {
                    Response.ContentType = filePdf.contentType;
                    Response.AddHeader("content-disposition", "inline;filename=" + filePdf.fullName);
                    Response.AddHeader("content-lenght", filePdf.content.Length.ToString());
                    Response.BinaryWrite(filePdf.content);
                }
                else
                {
                    this.executeJS("<SCRIPT>alert('Si è verificato un errore nella generazione del file PDF da stampare');self.close();</SCRIPT>");
                }
            }
            catch (Exception ex)
            {
                this.executeJS("<SCRIPT>alert('Errore di sistema: " + ex.Message.Replace("'", "\\'") + "');self.close();</SCRIPT>");
            }
        }
示例#12
0
        public ArrayList ListaIDUOParent(string idUO)
        {
            Amministrazione.Manager.OrganigrammaManager ammMng = new Amministrazione.Manager.OrganigrammaManager();
            ammMng.ListaIDParentRicerca(idUO, "U");
            ArrayList lista = ammMng.getListaIDParentRicerca();

            return(lista);
        }
示例#13
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";
            }
        }
示例#14
0
        private ArrayList cercaInUoFiglie(DocsPAWA.DocsPaWR.OrgUO uo)
        {
            //CALCOLARE I FIGLI DEL NODO DA SPOSTARE sysUoFrom
            ArrayList listaUo = null;

            Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            listaUo = theManager.GetListaUoFiglie(uo);
            return(listaUo);
        }
示例#15
0
        private void btn_sposta_Click(object sender, System.EventArgs e)
        {
            DocsPAWA.DocsPaWR.OrgUO uoDaSpostare = new DocsPAWA.DocsPaWR.OrgUO();
            uoDaSpostare.IDCorrGlobale     = this.hd_idCorrGlobUODaSpostare.Value;
            uoDaSpostare.Codice            = this.txt_codice.Text;
            uoDaSpostare.CodiceRubrica     = this.txt_codice.Text;
            uoDaSpostare.Descrizione       = this.txt_descrizione.Text;
            uoDaSpostare.IDAmministrazione = this.hd_idAmm.Value;
            uoDaSpostare.Livello           = this.hd_livelloUO_DaSpostare.Value;

            DocsPAWA.DocsPaWR.OrgUO uoPadre = new DocsPAWA.DocsPaWR.OrgUO();
            uoPadre.IDCorrGlobale     = this.hd_idCorrGlobDest.Value;
            uoPadre.Codice            = this.txt_ricCod.Text;
            uoPadre.CodiceRubrica     = this.txt_ricCod.Text;
            uoPadre.Descrizione       = this.txt_ricDesc.Text;
            uoPadre.IDAmministrazione = this.hd_idAmm.Value;

            Manager.OrganigrammaManager       manager = new Amministrazione.Manager.OrganigrammaManager();
            DocsPAWA.DocsPaWR.EsitoOperazione esito   = new DocsPAWA.DocsPaWR.EsitoOperazione();

            //Se la Uo si sta spostando in una dei suio figli si deve bloccare l'operazione
            //e avvisare l'utente
            ArrayList uoFiglie = cercaInUoFiglie(uoDaSpostare);

            /*verifico se la systemId della UoPadre
             * (intesa come il nodo sotto il quale si vuole spostare la Uo 'uoDaSpostare')
             * è presente tra i figli della 'uoDaSpostare', in tal caso blocchiamo tale operazione
             * Attualmente non è gestito il caso di sposare un NODO ('uoPadre') sotto a un suo FIGLIO*/
            if (uoPadre.IDCorrGlobale != uoDaSpostare.IDCorrGlobale)
            {
                if (!uoFiglie.Contains(uoPadre.IDCorrGlobale))
                {
                    manager.SpostaUO(uoDaSpostare, uoPadre);
                    esito = manager.getEsitoOperazione();

                    if (esito.Codice.Equals(0))
                    {
                        this.executeJS("<SCRIPT>alert('Operazione di spostamento UO eseguita correttamente.'); window.returnValue = 'Y'; self.close();</SCRIPT>");
                    }
                    else
                    {
                        this.executeJS("<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "\\'") + "');</SCRIPT>");
                    }
                }
                else
                {
                    //caso in cui si tenta si spostare UN PADRE SOTTO A UN FIGLIO
                    this.executeJS("<SCRIPT>alert('Attenzione: non è possibile spostare un nodo padre sotto a un nodo figlio.'); window.returnValue = 'Y'; self.close();</SCRIPT>");
                }
            }
            else
            {
                //caso in cui si tenta si spostare un nodo sotto se stesso (senza questo controllo l'applicazione va in loop)
                this.executeJS("<SCRIPT>alert('Attenzione: si sta cercando di spostare una Uo sotto se stessa.'); window.returnValue = 'Y'; self.close();</SCRIPT>");
            }
        }
示例#16
0
        /// <summary>
        /// Reperimento dati della UO passata come parametro
        /// </summary>
        /// <param name="idCorrGlobale"></param>
        /// <returns></returns>
        private DocsPAWA.DocsPaWR.OrgUO GetDatiUOCorrente(string idCorrGlobale)
        {
            DocsPaWR.OrgUO currentUO;

            Amministrazione.Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();
            manager.DatiUOCorrente(idCorrGlobale);

            currentUO = manager.getDatiUO();

            return(currentUO);
        }
示例#17
0
        public void FillComboRegistri(string idRegistro)
        {
            try
            {
                this.ddl_registri.Items.Clear();

                AmmUtils.WebServiceLink ws = new AmmUtils.WebServiceLink();
                ArrayList listaRegistri    = new ArrayList();
                string    descReg;
                string    idReg;

                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.ListaRegistriAssRuolo(this.hd_idAmm.Value, this.hd_idCorrGlobRuolo.Value);
                int totRegistri = theManager.getListaRegistri().Count;
                if (totRegistri > 0)
                {
                    if (totRegistri > 1)
                    {
                        this.ddl_registri.Items.Add(new ListItem("Tutti i registri", string.Empty));
                    }

                    foreach (DocsPAWA.DocsPaWR.OrgRegistro registro in theManager.getListaRegistri())
                    {
                        descReg = registro.Descrizione;
                        idReg   = registro.IDRegistro;

                        ListItem item = new ListItem(descReg, idReg);
                        this.ddl_registri.Items.Add(item);
                    }
                }
                else
                {
                    this.ShowErrorMessage("Attenzione, nessun registro da amministrare.");
                    return;
                }

                if (idRegistro != null)
                {
                    ddl_registri.SelectedIndex = ddl_registri.Items.IndexOf(ddl_registri.Items.FindByValue(idRegistro));
                }
                else
                {
                    if (totRegistri == 1)
                    {
                        ddl_registri.SelectedIndex = 1;
                    }
                }
            }
            catch
            {
                this.ShowErrorMessage("Si è verificato un errore durante il reperimento dati dei registri.");
            }
        }
示例#18
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);
        }
示例#19
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();
            }
        }
示例#20
0
        private void LoadRuoliAttualiRF()
        {
            try
            {
                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();

                //Cerco solo i ruoli della AOO COLLEGATA: idReg
                theManager.GetListaRuoliAOO(Request.QueryString["idReg"].ToString());

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

                    this.InitializeDataSetRuoli();

                    DataRow row;

                    foreach (DocsPAWA.DocsPaWR.OrgRuolo ruolo in theManager.getListaRuoliAOO())
                    {
                        row                      = dsRuoli.Tables[0].NewRow();
                        row["IDRuolo"]           = ruolo.IDCorrGlobale;
                        row["codice"]            = ruolo.CodiceRubrica;
                        row["descrizione"]       = ruolo.Descrizione;
                        row["IDAmministrazione"] = ruolo.IDAmministrazione;
                        row["IDGruppo"]          = ruolo.IDGruppo;

                        dsRuoli.Tables["RUOLI"].Rows.Add(row);
                    }

                    DataView dv = dsRuoli.Tables["RUOLI"].DefaultView;
                    dv.Sort             = "descrizione ASC";
                    dg_ruoli.DataSource = dv;
                    dg_ruoli.DataBind();
                }
                else
                {
                    this.dg_ruoli.Visible             = false;
                    this.lbl_risultatoRuoliRF.Visible = true;
                }
            }
            catch
            {
                this.gestErrori();
            }
        }
示例#21
0
        /// <summary>
        /// Caricamento della lista dei registri associati al ruolo
        /// </summary>
        private void LoadDettagliRegistri()
        {
            string idAmm           = this.Request.QueryString["idAmm"].ToString();
            string idCorrGlobUO    = this.Request.QueryString["idCorrGlobUO"].ToString();
            string idCorrGlobRuolo = this.Request.QueryString["idCorrGlobRuolo"].ToString();
            string idGruppo        = this.Request.QueryString["idGruppo"].ToString();

            Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            theManager.ListaRegistriAssRuolo(idAmm, idCorrGlobRuolo);

            if (theManager.getListaRegistri() != null && theManager.getListaRegistri().Count > 0)
            {
                InitializeDataSetRegistri();
                DataRow row;
                foreach (SAAdminTool.DocsPaWR.OrgRegistro registro in theManager.getListaRegistri())
                {
                    row = dsRegistri.Tables["REGISTRI"].NewRow();

                    row["IDRegistro"] = registro.IDRegistro;
                    string testo = string.Empty;
                    testo  = "<b>Codice: </b>" + registro.Codice + "<br>";
                    testo += "<b>Descrizione: </b>" + registro.Descrizione + "<br>";
                    testo += "<b>Registro associato al ruolo dal: </b>" + registro.data_inizio + "<br>";
                    testo += "<b>Visibilità sui documenti aggiornata il: </b>" + registro.data_ass_visibilita;
                    row["Descrizione"]       = testo;
                    row["IDAmministrazione"] = registro.IDAmministrazione;
                    row["idCorrGlobUO"]      = idCorrGlobUO;
                    row["idCorrGlobRuolo"]   = idCorrGlobRuolo;
                    row["idGruppo"]          = idGruppo;

                    dsRegistri.Tables["REGISTRI"].Rows.Add(row);
                }

                DataView dv = dsRegistri.Tables["REGISTRI"].DefaultView;
                dv.Sort = "Descrizione";
                this.dg_registri.DataSource = dv;
                this.dg_registri.DataBind();
            }
            else
            {
                if (!this.Page.IsStartupScriptRegistered("alertJavaScript"))
                {
                    string scriptString = "<SCRIPT>alert('Attenzione, non ci sono registri associati al ruolo');self.close();</SCRIPT>";
                    this.Page.RegisterStartupScript("alertJavaScript", scriptString);
                }
            }
        }
示例#22
0
        /// <summary>
        /// Visualizza come nodo Root la UO di livello 0
        /// </summary>
        private void VisualizzaNodoRoot()
        {
            string idCorrGlob = string.Empty;

            Amministrazione.Manager.OrganigrammaManager manager = new Amministrazione.Manager.OrganigrammaManager();
            manager.ListaUOLivelloZero(this.hd_idAmm.Value);
            ArrayList lista = manager.getListaUO();

            if (lista != null && lista.Count > 0)
            {
                foreach (DocsPAWA.DocsPaWR.OrgUO uo in lista)
                {
                    idCorrGlob = uo.IDCorrGlobale;
                }

                this.VisualizzaNodoRicercato(idCorrGlob + "_0_U");
            }
        }
示例#23
0
        private void LoadUtentiAttuali()
        {
            try
            {
                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();

                theManager.ListaUtenti(Request.QueryString["idGruppo"]);

                if (theManager.getListaUtenti() != null && theManager.getListaUtenti().Count > 0)
                {
                    this.dg_utenti.Visible = true;
                    this.lbl_risultatoUtentiRuolo.Visible = false;

                    this.InitializeDataSetUtenti();

                    DataRow row;
                    foreach (SAAdminTool.DocsPaWR.OrgUtente utente in theManager.getListaUtenti())
                    {
                        row                      = dsUtenti.Tables[0].NewRow();
                        row["IDUtente"]          = utente.IDCorrGlobale;
                        row["codice"]            = utente.CodiceRubrica;
                        row["descrizione"]       = utente.Cognome + " " + utente.Nome;
                        row["IDAmministrazione"] = utente.IDAmministrazione;
                        row["IDPeople"]          = utente.IDPeople;

                        dsUtenti.Tables["UTENTI"].Rows.Add(row);
                    }

                    DataView dv = dsUtenti.Tables["UTENTI"].DefaultView;
                    dv.Sort = "descrizione ASC";
                    dg_utenti.DataSource = dv;
                    dg_utenti.DataBind();
                }
                else
                {
                    this.dg_utenti.Visible = false;
                    this.lbl_risultatoUtentiRuolo.Visible = true;
                }
            }
            catch
            {
                this.gestErrori();
            }
        }
示例#24
0
        private bool RuoloConTrasmissioni(string idCorrGlobRuolo)
        {
            bool result = true;

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

            DocsPaWR.EsitoOperazione esito = new DocsPAWA.DocsPaWR.EsitoOperazione();
            esito = theManager.getEsitoOperazione();

            if (esito.Codice.Equals(0))
            {
                result = false;
            }

            esito = null;

            return(result);
        }
示例#25
0
        private bool EliminaAssociazioneRFRuolo(string idRuolo, string idRf)
        {
            bool result = false;

            try
            {
                Amministrazione.Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.DeleteAssociazioneRFRuolo(idRf, idRuolo);

                DocsPAWA.DocsPaWR.EsitoOperazione esito = new DocsPAWA.DocsPaWR.EsitoOperazione();
                esito = theManager.getEsitoOperazione();

                if (esito.Codice.Equals(0))
                {
                    DocsPAWA.DocsPaWR.DocsPaWebService     ws  = new DocsPaWR.DocsPaWebService();
                    DocsPAWA.DocsPaWR.ValidationResultInfo res = ws.AmmDelRightMailRegistro(idRf, idRuolo, string.Empty);
                    if (res.Value)
                    {
                        result = true;
                    }
                    else
                    {
                        result = false;
                    }
                }
                else
                {
                    if (!this.Page.IsStartupScriptRegistered("alertJavaScript"))
                    {
                        string scriptString = "<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "''") + "');</SCRIPT>";
                        this.Page.RegisterStartupScript("alertJavaScript", scriptString);
                    }
                }
                esito = null;
            }
            catch
            {
                this.gestErrori();
            }
            return(result);
        }
示例#26
0
        /// <summary>
        /// Tasto Sposta ruolo
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_sposta_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (this.txt_codNewRuolo.Text.Trim() != "" && this.txt_descNewRuolo.Text.Trim() != "")
                {
                    DocsPAWA.DocsPaWR.OrgRuolo ruolo = new DocsPAWA.DocsPaWR.OrgRuolo();

                    ruolo.IDCorrGlobale     = this.hd_idCorrGlobRuoloDaSpostare.Value;
                    ruolo.Codice            = this.txt_codNewRuolo.Text;
                    ruolo.CodiceRubrica     = this.txt_codNewRuolo.Text;
                    ruolo.Descrizione       = this.txt_descNewRuolo.Text;
                    ruolo.IDGruppo          = this.hd_idGruppoDaSpostare.Value;
                    ruolo.IDUo              = this.hd_idCorrGlobDest.Value;
                    ruolo.IDAmministrazione = this.hd_idAmm.Value;

                    Manager.OrganigrammaManager       manager = new Amministrazione.Manager.OrganigrammaManager();
                    DocsPAWA.DocsPaWR.EsitoOperazione esito   = new DocsPAWA.DocsPaWR.EsitoOperazione();

                    manager.SpostaRuolo(ruolo);
                    esito = manager.getEsitoOperazione();

                    if (esito.Codice.Equals(0))
                    {
                        InvalidaPassiCorrelati();

                        string qs = "?idAmm=" + ruolo.IDAmministrazione + "&idCorrGlobUO=" + ruolo.IDUo + "&idCorrGlobRuolo=" + ruolo.IDCorrGlobale + "&idGruppo=" + ruolo.IDGruppo;
                        Response.Redirect("Esito_Sposta_Ruolo.aspx" + qs);
                    }
                    else
                    {
                        this.executeJS("<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "\\'") + "');</SCRIPT>");
                    }
                }
            }
            catch
            {
                this.executeJS("<SCRIPT>alert('Attenzione, si è verificato un errore di sistema');</SCRIPT>");
            }
        }
示例#27
0
        private bool InsTrasmUtente(string idPeople, string idCorrGlobRuolo)
        {
            bool result = false;

            Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            theManager.InsTrasmUtente(idPeople, idCorrGlobRuolo);

            DocsPaWR.EsitoOperazione esito = new DocsPAWA.DocsPaWR.EsitoOperazione();
            esito = theManager.getEsitoOperazione();

            if (esito.Codice.Equals(0))
            {
                result = true;
            }
            else
            {
                this.executeJS("<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "''") + "');</SCRIPT>");
            }
            esito = null;

            return(result);
        }
示例#28
0
        private bool VerificaUtenteLoggato(string userId, string idAmm)
        {
            bool result = false;

            Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            theManager.VerificaUtenteLoggato(userId, idAmm);

            DocsPaWR.EsitoOperazione esito = new DocsPAWA.DocsPaWR.EsitoOperazione();
            esito = theManager.getEsitoOperazione();

            if (esito.Codice.Equals(0))
            {
                result = true;
            }
            else
            {
                this.executeJS("<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'", "''") + "');</SCRIPT>");
            }
            esito = null;

            return(result);
        }
示例#29
0
		private bool RifiutaTrasmConWF(string idCorrGlobRuolo)
		{
			bool result = false;

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

			DocsPaWR.EsitoOperazione esito = new SAAdminTool.DocsPaWR.EsitoOperazione();
			esito = theManager.getEsitoOperazione();

			if(esito.Codice.Equals(0))
			{
				result = true;
			}
			else
			{
				this.executeJS("<SCRIPT>alert('Attenzione, " + esito.Descrizione.Replace("'","''") + "');</SCRIPT>");				
			}
			esito = null;
			
			return result;
		}
示例#30
0
        /// <summary>
        /// Inizializzazione
        /// </summary>
        private void Inizialize()
        {
            try
            {
                Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
                theManager.ListaUOLivelloZero(this.hd_idAmm.Value);

                if (theManager.getListaUO() != null && theManager.getListaUO().Count > 0)
                {
                    this.btn_find.Attributes.Add("onclick", "ApriRisultRic('" + this.hd_idAmm.Value + "');");
                    this.LoadTreeviewLivelloZero(theManager.getListaUO());
                    this.SetFocus(this.txt_ricDesc);
                }
                else
                {
                    this.executeJS("<SCRIPT>alert('Attenzione, nessun organigramma presente'); window.close();</SCRIPT>");
                }
            }
            catch
            {
                this.executeJS("<SCRIPT>alert('Attenzione, si è verificato un errore di sistema');</SCRIPT>");
            }
        }