Example #1
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);
        }
Example #2
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);
        }
Example #3
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>");
            }
        }
Example #4
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);
        }
Example #5
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);
        }
Example #6
0
        private bool InserimentoUtente(string idPeople, string idGruppo)
        {
            bool   result = false;
            string idAmm  = AmmUtils.UtilsXml.GetAmmDataSession((string)Session["AMMDATASET"], "3");

            Manager.OrganigrammaManager theManager = new Amministrazione.Manager.OrganigrammaManager();
            theManager.InsUtenteInRuolo(idPeople, idGruppo, idAmm, "spostaUser");

            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);
        }