Ejemplo n.º 1
0
 protected void BtnAddressBookUtenteTitolare_Click(object sender, EventArgs e)
 {
     this.CallType = RubricaCallType.CALLTYPE_CORR_INT;
     HttpContext.Current.Session["AddressBook.from"]       = "FILTER_SIGNATURE_PROCESS_USER";
     HttpContext.Current.Session["AddressBook.EnableOnly"] = "P";
     ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxModalPopupAddressBook", "parent.ajaxModalPopupAddressBook();", true);
 }
Ejemplo n.º 2
0
        protected void SearchCorrespondent(string addressCode, string idControl)
        {
            try {
                RubricaCallType         calltype = this.GetCallType(idControl);
                DocsPaWR.Corrispondente corr     = UIManager.AddressBookManager.getCorrispondenteRubrica(addressCode, calltype);
                if (corr == null)
                {
                    this.TxtCodeRecipient.Text        = string.Empty;
                    this.TxtDescriptionRecipient.Text = string.Empty;
                    this.IdRecipient.Value            = string.Empty;

                    string msg = "ErrorTransmissionCorrespondentNotFound";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                }
                else
                {
                    this.TxtCodeRecipient.Text        = corr.codiceRubrica;
                    this.TxtDescriptionRecipient.Text = corr.descrizione;
                    this.IdRecipient.Value            = corr.systemId;
                }

                this.UpPnlRecipient.Update();
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Ejemplo n.º 3
0
 protected void TxtCode_OnTextChanged(object sender, EventArgs e)
 {
     ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true);
     try
     {
         string codice = TxtCodeCorr.Text;
         this.TxtCodeCorr.Text        = string.Empty;
         this.TxtDescriptionCorr.Text = string.Empty;
         if (!string.IsNullOrEmpty(codice))
         {
             RubricaCallType   calltype  = RubricaCallType.CALLTYPE_PROTO_INT_MITT;
             ElementoRubrica[] listaCorr = null;
             Corrispondente    corr      = null;
             UIManager.RegistryManager.SetRegistryInSession(RoleManager.GetRoleInSession().registri[0]);
             listaCorr = UIManager.AddressBookManager.getElementiRubricaMultipli(codice, calltype, true);
             if (listaCorr != null && (listaCorr.Count() == 1))
             {
                 if (listaCorr.Count() == 1)
                 {
                     corr = UIManager.AddressBookManager.getCorrispondenteRubrica(codice, calltype);
                 }
                 if (corr == null)
                 {
                     string msg = "ErrorTransmissionCorrespondentNotFound";
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                 }
                 if (!corr.tipoCorrispondente.Equals("R"))
                 {
                     string msg = "WarningCorrespondentAsRole";
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) { parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else { parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                 }
                 else
                 {
                     this.TxtCodeCorr.Text             = corr.codiceRubrica;
                     this.TxtDescriptionCorr.Text      = corr.descrizione;
                     this.idCorr.Value                 = ((DocsPaWR.Ruolo)corr).idGruppo;
                     this.BtnAssegnaVisibilita.Enabled = true;
                     this.UpPnlButtons.Update();
                 }
             }
             else
             {
                 string msg = "ErrorTransmissionCorrespondentNotFound";
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
             }
         }
         this.UpdPnlCorr.Update();
     }
     catch (Exception ex)
     {
         string msg = "ErrorSignatureProcess";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');}", true);
         return;
     }
 }
Ejemplo n.º 4
0
 protected void ImgUserInAuthAddressBook_Click(object sender, EventArgs e)
 {
     try
     {
         this.CallType = RubricaCallType.CALLTYPE_DEP_OSITO;
         HttpContext.Current.Session["AddressBook.from"]       = "F_X_X_S";
         HttpContext.Current.Session["AddressBook.EnableOnly"] = "P";
         ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AddressBook", "ajaxModalPopupAddressBook();", true);
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
         return;
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Funzione per la risoluzione di un codice corrispondente
        /// </summary>
        /// <param name="code">Codice da risolvere</param>
        /// <param name="searchOnlyRoles">True se bisogna ricercare solo nei ruoli</param>
        /// <param name="callType">Call type da utilizzare</param>
        /// <returns>Array di oggetti con le informazioni sul corrispondenti trovati</returns>
        private ElementoRubrica[] ResolveCode(String code, bool searchOnlyRoles, RubricaCallType callType)
        {
            ElementoRubrica[] corrSearch = null;
            if (!String.IsNullOrEmpty(code))
            {
                ParametriRicercaRubrica qco = new ParametriRicercaRubrica();
                UserManager.setQueryRubricaCaller(ref qco);
                qco.codice            = code.Trim();
                qco.tipoIE            = DocsPAWA.DocsPaWR.AddressbookTipoUtente.INTERNO;
                qco.calltype          = callType;
                qco.caller.IdRegistro = this.ddlRegistry.SelectedValue;

                //cerco su tutti i tipi utente:
                if (ConfigurationManager.AppSettings["LISTE_DISTRIBUZIONE"] != null &&
                    ConfigurationManager.AppSettings["LISTE_DISTRIBUZIONE"] == "1")
                {
                    qco.doListe = true;
                }
                qco.doRuoli = true;
                if (searchOnlyRoles)
                {
                    qco.doUtenti = false;
                    qco.doUo     = false;
                }
                else
                {
                    qco.doUtenti = true;
                    qco.doUo     = true;
                }

                qco.queryCodiceEsatta = true;

                corrSearch = UserManager.getElementiRubrica(this.Page, qco);


                // Se il calltype è relativo a ruolo da utilizzare per la sostituzione,
                // vengono esclusi i corrispondenti inibiti
                if (callType == RubricaCallType.CALLTYPE_REPLACE_ROLE && corrSearch != null && corrSearch.Length == 1 && corrSearch[0].disabledTrasm)
                {
                    corrSearch = new ElementoRubrica[0];
                }
            }

            return(corrSearch);
        }
Ejemplo n.º 6
0
        protected void SetAjaxAddressBook(RubricaCallType callType)
        {
            this.RapidCorrespondentCustom.MinimumPrefixLength   = this.AjaxAddressBookMinPrefixLenght;
            this.RapidCorrespondentCustom.Enabled               = true;
            this.TxtDescriptionCorrespondentCustomValue.Enabled = true;
            string dataUser = UIManager.RoleManager.GetRoleInSession().systemId;

            dataUser = dataUser + "-" + UIManager.RegistryManager.GetRegistryInSession().systemId;
            this.RapidCorrespondentCustom.ContextKey = dataUser + "-" + UIManager.UserManager.GetInfoUser().idAmministrazione + "-" + callType.ToString();
            RapidCorrespondentCustom.BehaviorID      = "behavior_" + this.ClientID;
            string b = "behavior_" + this.ClientID;

            RapidCorrespondentCustom.OnClientPopulated    = "acePopulated" + this.ClientID;
            RapidCorrespondentCustom.OnClientItemSelected = "aceSelected" + this.ClientID;
            string nomeFunzionePopulated = "acePopulated" + this.ClientID;
            string nomeFunzioneSelected  = "aceSelected" + this.ClientID;
            string unique = this.UniqueID;

            builderJS(b, nomeFunzionePopulated, nomeFunzioneSelected, unique);
        }
Ejemplo n.º 7
0
        protected void SearchCorrespondent(string addressCode, string idControl)
        {
            RubricaCallType calltype = RubricaCallType.CALLTYPE_CORR_INT_NO_UO;

            DocsPaWR.Corrispondente corr = UIManager.AddressBookManager.getCorrispondenteRubrica(addressCode, calltype);

            if (corr == null)
            {
                this.txt_codAuthor_E.Text   = string.Empty;
                this.txt_descrAuthor_E.Text = string.Empty;
                this.IdRecipient.Value      = string.Empty;
                this.UpPnlAuthor.Update();
            }
            else
            {
                this.txt_codAuthor_E.Text       = corr.codiceRubrica;
                this.txt_descrAuthor_E.Text     = corr.descrizione;
                this.IdRecipient.Value          = corr.systemId;
                this.rblOwnerType.SelectedIndex = -1;
                this.rblOwnerType.Items.FindByValue(corr.tipoCorrispondente).Selected = true;
                this.UpPnlAuthor.Update();
            }
        }
Ejemplo n.º 8
0
        protected void imgRubricaDestinatari_Click(object sender, ImageClickEventArgs e)
        {
            // Registrazione script per l'apertura della rubrica e salvataggio in sessione di un valore che
            // consenta di capire che alla chiusura della finestra della rubrica deve essere compilato il
            // codice e la descrizione per i destinatari


            Session["CodeTextBox"] = this.txtDestinatariCodice.ID;

            try
            {
                this.CallType = RubricaCallType.CALLTYPE_DEST_FOR_SEARCH_MODELLI;
                HttpContext.Current.Session["AddressBook.from"] = "F_X_X_S";

                HttpContext.Current.Session["fromModelli"] = true;
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AddressBook", "ajaxModalPopupAddressBook();", true);
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
        private void SearchCorrespondent(string addressCode, string idControl)
        {
            RubricaCallType calltype = GetCallType(idControl);
            Corrispondente  corr     = UIManager.AddressBookManager.getCorrispondenteRubrica(addressCode, calltype);

            if (corr == null)
            {
                this.txtCodiceCreatore.Text      = string.Empty;
                this.txtDescrizioneCreatore.Text = string.Empty;
                this.idCreatore.Value            = string.Empty;
                this.upPnlAuthor.Update();
                string msg = "ErrorTransmissionCorrespondentNotFound";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');", true);
            }
            else
            {
                this.txtCodiceCreatore.Text      = corr.codiceRubrica;
                this.txtDescrizioneCreatore.Text = corr.descrizione;
                this.idCreatore.Value            = corr.systemId;
                this.rblOwnerType.SelectedIndex  = -1;
                this.rblOwnerType.Items.FindByValue(corr.tipoCorrispondente).Selected = true;
                this.upPnlAuthor.Update();
            }
        }
Ejemplo n.º 10
0
        public SelectorFilter(Page page, RubricaCallType calltype)
        {
            _page     = page;
            _calltype = calltype;

            // Inizializza la tabella UO smistamento


            string id_registro = null;

            if (calltype == SAAdminTool.DocsPaWR.RubricaCallType.CALLTYPE_PROTO_INGRESSO)
            {
                id_registro = ProtocollazioneIngresso.Registro.RegistroMng.GetRegistroInSessione().systemId;
            }
            else
            {
                Registro rreg = UserManager.getRegistroSelezionato(_page);
                if (rreg != null)
                {
                    id_registro = rreg.systemId;
                }
                else
                {
                    Ruolo rr = UserManager.getRuolo();

                    //se veniamo dall'amministrazione (per esempio nel caso di creazione
                    // di una lista di distribuzione) non sappiamo l'id del registro in
                    // esame
                    if (rr.registri == null)
                    {
                        string           codAmm = AmmUtils.UtilsXml.GetAmmDataSession((string)page.Session["AMMDATASET"], "0");
                        DocsPaWebService ws     = new DocsPaWebService();
                        OrgRegistro[]    reg    = ws.AmmGetRegistri(codAmm, "0");
                        if (reg.Length > 0)
                        {
                            id_registro = reg[0].IDRegistro;
                        }
                    }
                    else
                    {
                        id_registro = rr.registri[0].systemId;
                    }
                    //UserManager.setRegistroSelezionato(_page,rr.registri[0]);
                }
            }

            uo_smistamento = (UOSmistamento[])ht_uo_smistamento[id_registro];
            uo_interne     = (string[])ht_uo_interne[id_registro];

            if (uo_smistamento == null)
            {
                DocsPaWebService    ws = new DocsPaWebService();
                MittenteSmistamento ms = new MittenteSmistamento();
                ms.IDPeople    = "0";
                uo_smistamento = ws.GetUOSmistamento(id_registro, ms);

                if (uo_smistamento != null)
                {
                    Array.Sort(uo_smistamento, new UOSmistamentoByCodiceSorter());
                }
                else
                {
                    uo_smistamento = new UOSmistamento[0];
                }

                ht_uo_smistamento[id_registro] = uo_smistamento;
            }

            // Inizializza la tabella UO interne alla nostra AOO
            if (uo_interne == null)
            {
                DocsPaWebService ws = new DocsPaWebService();
                uo_interne = UserManager.GetUoInterneAoo(_page);

                if (uo_interne != null)
                {
                    Array.Sort(uo_interne, CaseInsensitiveComparer.Default);
                }

                ht_uo_interne[id_registro] = uo_interne;
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Funzione per la risoluzione di un codice corrispondente
        /// </summary>
        /// <param name="code">Codice da risolvere</param>
        /// <param name="searchOnlyRoles">True se bisogna ricercare solo nei ruoli</param>
        /// <param name="registro">Registro in cui ricercare</param>
        /// <param name="callType">Call type da utilizzare per la ricerca</param>
        /// <returns>Array di oggetti con le informazioni sul corrispondenti trovati</returns>
        private ElementoRubrica[] ResolveCode(String code, bool searchOnlyRoles, Registro registro, RubricaCallType callType)
        {
            ElementoRubrica[] corrSearch = null;
            if (!String.IsNullOrEmpty(code))
            {
                ParametriRicercaRubrica qco = new ParametriRicercaRubrica();
                UserManager.setQueryRubricaCaller(ref qco);
                qco.codice   = code.Trim();
                qco.tipoIE   = DocsPAWA.DocsPaWR.AddressbookTipoUtente.INTERNO;
                qco.calltype = callType;
                //cerco su tutti i tipi utente:
                if (ConfigurationManager.AppSettings["LISTE_DISTRIBUZIONE"] != null &&
                    ConfigurationManager.AppSettings["LISTE_DISTRIBUZIONE"] == "1")
                {
                    qco.doListe = true;
                }
                qco.doRuoli = true;
                if (searchOnlyRoles)
                {
                    qco.doUtenti = false;
                    qco.doUo     = false;
                }
                else
                {
                    qco.doUtenti = true;
                    qco.doUo     = true;
                }

                qco.queryCodiceEsatta = true;

                corrSearch = UserManager.getElementiRubrica(this.Page, qco);
            }

            return(corrSearch);
        }
Ejemplo n.º 12
0
 protected void TxtCode_OnTextChanged(object sender, EventArgs e)
 {
     ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "function", "<script>reallowOp();</script>", false);
     try
     {
         CustomTextArea caller          = sender as CustomTextArea;
         string         codeAddressBook = this.txtCodiceRuolo.Text;
         if (!string.IsNullOrEmpty(codeAddressBook))
         {
             RubricaCallType   calltype  = RubricaCallType.CALLTYPE_PROTO_INT_MITT;
             ElementoRubrica[] listaCorr = null;
             Corrispondente    corr      = null;
             UIManager.RegistryManager.SetRegistryInSession(RoleManager.GetRoleInSession().registri[0]);
             listaCorr = UIManager.AddressBookManager.getElementiRubricaMultipli(codeAddressBook, calltype, true);
             if (listaCorr != null && (listaCorr.Count() == 1))
             {
                 if (listaCorr.Count() == 1)
                 {
                     corr = UIManager.AddressBookManager.getCorrispondenteRubrica(codeAddressBook, calltype);
                 }
                 if (corr == null)
                 {
                     this.txtCodiceRuolo.Text      = string.Empty;
                     this.txtDescrizioneRuolo.Text = string.Empty;
                     this.UpdPnlRuolo.Update();
                     string msg = "ErrorTransmissionCorrespondentNotFound";
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                     return;
                 }
                 this.txtCodiceRuolo.Text      = string.Empty;
                 this.txtDescrizioneRuolo.Text = string.Empty;
                 this.UpdPnlRuolo.Update();
                 if (!corr.tipoCorrispondente.Equals("R"))
                 {
                     string msg = "WarningCorrespondentAsRole";
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) { parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else { parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                 }
                 else
                 {
                     this.txtCodiceRuolo.Text      = corr.codiceRubrica;
                     this.txtDescrizioneRuolo.Text = corr.descrizione;
                     this.idRuolo.Value            = corr.systemId;
                 }
                 this.UpdPnlRuolo.Update();
             }
             else
             {
                 string msg = "ErrorTransmissionCorrespondentNotFound";
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
             }
         }
         else
         {
             this.txtCodiceRuolo.Text      = string.Empty;
             this.txtDescrizioneRuolo.Text = string.Empty;
             this.UpdPnlRuolo.Update();
         }
     }
     catch (Exception ex)
     {
         string msg = "ErrorSignatureProcess";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');}", true);
         return;
     }
 }
Ejemplo n.º 13
0
        protected RubricaCallType GetCallType(string idControl)
        {
            RubricaCallType calltype = DocsPaWR.RubricaCallType.CALLTYPE_RICERCA_ESTESA;

            return(calltype);
        }
        private RubricaCallType GetCallType(string idControl)
        {
            RubricaCallType calltype = RubricaCallType.CALLTYPE_CORR_INT_NO_UO;

            return(calltype);
        }