Ejemplo n.º 1
0
        private void LoadData(bool updateGrid)
        {
            ListaFiltri = DocumentManager.getFiltroRicDoc(this);
            DocsPaWR.Registro  regSel = UserManager.getRegistroSelezionato(this);
            SearchResultInfo[] idProfileList;
            //AL POSTO DELL'UNO IL NUMERO DELLA PAGINA
            infoDoc = FascicoliManager.getListaDocumentiPaging(this, this.Folder, currentPage, out numTotPage, out nRec, true, out idProfileList);

            this.DataGrid1.VirtualItemCount = nRec;
            this.DataGrid1.CurrentPageIndex = currentPage - 1;

            string[] idProfs = new string[idProfileList.Length];
            for (int i = 0; i < idProfileList.Length; i++)
            {
                idProfs[i] = idProfileList[i].Id;
            }
            RicercaDocumentiControllatiSessionMng.SetListaIdProfile(this, idProfs);
            RicercaDocumentiControllatiSessionMng.SetListaInfoDocumenti(this, infoDoc);

            if (infoDoc != null && infoDoc.Length > 0)
            {
                this.BindGrid(infoDoc);
            }
            else
            {
                //rendo invisibile il check per la selezione di tutti i checkbox
                this.chkSelectDeselectAll.Visible = false;
            }
        }
Ejemplo n.º 2
0
        private void btn_casellaIstituzionale_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            DocsPaWR.Registro registro = GestManager.getRegistroSel(this);
            if (registro != null)
            {
                if (registro.Sospeso)
                {
                    RegisterClientScriptBlock("alertRegistroSospeso", "alert('Il registro selezionato è sospeso!');");
                    return;
                }
                string pageBackGroundService = "chkCasellaIst.aspx";
                string request = pageBackGroundService;
                //string wndArgument="height=100,width=100,left=0,top=0";
                string scriptName = "startService";
                string scriptBody = "<script language=jscript>";
                scriptBody += "function startService(){";
                scriptBody += "alert('Inizio della verifica casella istituzionale\\n\\nATTENZIONE!\\nQuesta operazione potrebbe richiedere anche alcuni minuti.');";
                //width=420,height=150,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=no');";
                scriptBody += "wnd=window.open('" + request + "','','width=420,height=150,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=no');";
                //scriptBody+="wnd=window.showModelessDialog('"+request+"','"+wndArgument+"');";
                scriptBody += "wnd.focus();";
                //scriptBody+="alert('istitutional mailbox checking is started');";
                scriptBody += "}";
                scriptBody += "</script>";
                Page.RegisterClientScriptBlock(scriptName, scriptBody);

                string callingScriptName = "call" + scriptName;
                string callingScriptBody = "";
                callingScriptBody += "<script language=jscript>";
                callingScriptBody += "startService();";
                callingScriptBody += "</script>";
                Page.RegisterStartupScript(callingScriptName, callingScriptBody);
            }
        }
Ejemplo n.º 3
0
 private void btn_stampaRegistro_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     try
     {
         DocsPaWR.InfoUtente           infoUt   = UserManager.getInfoUtente(this);
         DocsPaWR.InfoDocumento        infoDoc  = new DocsPAWA.DocsPaWR.InfoDocumento();
         DocsPaWR.Registro             registro = GestManager.getRegistroSel(this);
         DocsPaWR.Ruolo                ruolo    = UserManager.getRuolo(this);
         DocsPaWR.StampaRegistroResult StpRegRS = GestManager.StampaRegistro(this, infoUt, ruolo, registro);
         if (StpRegRS != null && StpRegRS.errore != null && StpRegRS.errore != "")
         {
             string errore = StpRegRS.errore;
             errore = errore.Replace("'", "\\'");
             string l_script = "<script language=javascript>alert('" + errore + "');</script>";
             if (!this.IsStartupScriptRegistered("startup"))
             {
                 this.RegisterStartupScript("startup", l_script);
             }
         }
         else
         {
             infoDoc.docNumber = StpRegRS.docNumber;
             DocsPaWR.SchedaDocumento schedaDoc = new DocsPAWA.DocsPaWR.SchedaDocumento();
             schedaDoc = DocumentManager.getDettaglioDocumento(this, infoDoc.idProfile, infoDoc.docNumber);
             FileManager.setSelectedFileReg(this, schedaDoc.documenti[0], "../../popup");
             string sval = @"../../popup/ModalVisualStampaReg.aspx?id=" + this.Session.SessionID;
             RegisterStartupScript("ApriModale", "<script>OpenMyDialog('" + sval + "');</script>");
         }
         Response.Write("<script>parent.iFrame_dettagli.location='regDettagli.aspx';</script>");
     }
     catch (Exception ex)
     {
         ErrorManager.redirectToErrorPage(this, ex);
     }
 }
Ejemplo n.º 4
0
        public static string refreshPage(DocsPaWR.InfoFascicolo infoFasc, Page page)
        {
            string script = string.Empty;

            DocsPaWR.Fascicolo fasc = FascicoliManager.getFascicoloById(page, infoFasc.idFascicolo);

            if (fasc != null)
            {
                FascicoliManager.setFascicoloSelezionato(page, fasc);
                SiteNavigation.CallContextStack.CurrentContext.ContextState["systemId"] = fasc.systemID;
                if (fasc.idRegistroNodoTit != null && fasc.idRegistroNodoTit != string.Empty)
                {
                    DocsPaWR.Registro registroFascicolo = UserManager.getRegistroBySistemId(page, fasc.idRegistroNodoTit);
                    if (registroFascicolo != null)
                    {
                        UserManager.setRegistroSelezionato(page, registroFascicolo);
                    }
                    else
                    {
                        UserManager.removeRegistroSelezionato(page);
                    }
                }
            }
            script = "top.principale.document.location = 'fascicolo/gestioneFasc.aspx?tab=documenti';";
            return(script);
        }
Ejemplo n.º 5
0
 private void settaPrimoRegistroSelezionato()
 {
     DocsPaWR.Registro[] userRegistri = UserManager.getListaRegistri(this);
     DocsPaWR.Registro   userReg      = userRegistri[0];
     UserManager.setRegistroSelezionato(this, userReg);
     setStatoReg(userReg);
     //attenzione! ripulire i campi relativi al mittente e all'oggetto che dipendono dal registro
 }
Ejemplo n.º 6
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "function", "<script>reallowOp();</script>", false);
            DocsPaWR.Oggetto  oggetto     = new DocsPaWR.Oggetto();
            DocsPaWR.Registro registro    = new DocsPaWR.Registro();
            DocsPaWR.Registro registroDoc = new DocsPaWR.Registro();
            string            msg         = string.Empty;
            bool result;

            if (GridSearchObject.SelectedIndex == -1)
            {
                msg = "ErrorObjectSelRecDel";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ErrorObjectSelRecDel",
                                                    "if (parent.fra_main) " + "{parent.fra_main.ajaxDialogModal('" + msg + "', 'warning', 'ATTENZIONE');} " +
                                                    "else {parent.ajaxDialogModal('" + msg + "', 'warning', 'ATTENZIONE');}", true);
                return;
            }
            int selRow = GridSearchObject.SelectedRow.RowIndex;

            oggetto.daAggiornare = true;
            oggetto.systemId     = (GridSearchObject.Rows[selRow].Cells[(int)oggettario.systemid].FindControl("systemid") as Label).Text;
            oggetto.descrizione  = (GridSearchObject.Rows[selRow].Cells[(int)oggettario.description].FindControl("lblDescObject") as Label).Text;

            if (!string.IsNullOrEmpty((GridSearchObject.Rows[selRow].Cells[(int)oggettario.codobject].FindControl("lblCodObject") as Label).Text))
            {
                oggetto.codOggetto = (GridSearchObject.Rows[selRow].Cells[(int)oggettario.codobject].FindControl("lblCodObject") as Label).Text;
            }

            result = ObjectManager.DeleteObject(this, oggetto);

            if (result)
            {
                this.ObjectstList = (from listObj in this.ObjectstList where (!string.IsNullOrEmpty(oggetto.systemId) &&
                                                                              (!listObj.systemId.Equals(oggetto.systemId))) select listObj).ToArray();
                //this.ObjectstListAll = (from listObj in this.ObjectstListAll where (!string.IsNullOrEmpty(oggetto.systemId) && (!listObj.systemId.Equals(oggetto.systemId)))
                //                     select listObj).ToArray();
                this.GridSearchObject.SelectedIndex = -1;
                this.GridSearchObject.PageIndex     = 0;
                this.BtnOk.Enabled               = false;
                this.ObjectBtnDelete.Enabled     = false;
                this.TxtCodObject.Text           = string.Empty;
                this.TxtDescObject.Text          = string.Empty;
                this.GridSearchObject.DataSource = this.ObjectstList;
                this.GridSearchObject.DataBind();
                this.UpdPnlCodeObject.Update();
                this.UpdPnlGridSearch.Update();
                this.UpPnlButtons.Update();
            }
            else
            {
                msg = "ErrorObjectRemove";
                // if (parent.fra_main) {parent.fra_main.ajaxDialogModal();} else {top.ajaxDialogModal();}
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ErrorObjectRemove", "if (parent.fra_main) " +
                                                    "{parent.fra_main.ajaxDialogModal('" + msg + "', 'warning', 'ATTENZIONE');} " +
                                                    "else {parent.ajaxDialogModal('" + msg + "', 'warning', 'ATTENZIONE');}", true);
            }
        }
Ejemplo n.º 7
0
 public static void SetRegistryInSession(DocsPaWR.Registro registry)
 {
     try
     {
         HttpContext.Current.Session["userRegistry"] = registry;
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
     }
 }
Ejemplo n.º 8
0
        private void startServiteCheckIstitutionalMailbox()
        {
            DocsPaWR.Registro registro = GestManager.getRegistroSel(this);
            registro.email = GestManager.getCasellaSel();// imposto l'indirizzo della casella da interrogare
            DocsPaWR.MailAccountCheckResponse checkResponse;

            bool retValue = GestManager.startIstitutionalMailboxCheck(this, registro, out checkResponse);

            Interoperabilita.MailCheckResponseSessionManager.CurrentMailCheckResponse = checkResponse;

            this.RegisterClientScriptBlock("ShowMailCheckResultWindow", "<script>ShowMailCheckResultWindow();</script>");
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Metodo per la consultazione della casella istituzionale.
 /// </summary>
 /// <returns></returns>
 public static bool CheckMailBox(string serverName, DocsPaWR.Registro reg, DocsPaWR.Utente user, DocsPaWR.Ruolo role)
 {
     try
     {
         return(docsPaWS.CheckMailBox(serverName, reg, user, role));
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
         return(false);
     }
 }
Ejemplo n.º 10
0
 public static DocsPaWR.Registro getRegistroBySistemId(string idRegistro)
 {
     try
     {
         DocsPaWR.Registro result = null;
         result = docsPaWS.GetRegistroBySistemId(idRegistro);
         return(result);
     }
     catch (System.Exception ex)
     {
         UIManager.AdministrationManager.DiagnosticError(ex);
         return(null);
     }
 }
Ejemplo n.º 11
0
        protected void setDettagli(DocsPAWA.DocsPaWR.Registro rf)
        {
            this.lbl_registro.Text    = rf.codRegistro;
            this.lbl_descrizione.Text = rf.descrizione;
            DocsPaWR.Registro aooColl = UserManager.getRegistroBySistemId(this, rf.idAOOCollegata);
            //codice Aoo Collegata
            this.lbl_AooColl.Text = aooColl.codRegistro;
            //descrizione Aoo Collegata
            this.lbl_DescAooColl.Text = aooColl.descrizione;
            this.panel_Det.Visible    = true;
            #region multi casella

            System.Collections.Generic.List <DocsPAWA.DocsPaWR.CasellaRegistro> listCaselle = DocsPAWA.utils.MultiCasellaManager.GetComboRegisterConsult(GestManager.getRegistroSel().systemId);
            foreach (DocsPAWA.DocsPaWR.CasellaRegistro c in listCaselle)
            {
                System.Text.StringBuilder formatMail = new System.Text.StringBuilder();
                if (c.Principale.Equals("1"))
                {
                    formatMail.Append("* ");
                }
                formatMail.Append(c.EmailRegistro);
                if (!string.IsNullOrEmpty(c.Note))
                {
                    formatMail.Append(" - ");
                    formatMail.Append(c.Note);
                }
                ddl_Caselle.Items.Add(new ListItem(formatMail.ToString(), c.EmailRegistro));
            }

            if (listCaselle.Count == 0)
            {
                ddl_Caselle.Enabled = false;
                ddl_Caselle.Width   = new Unit(200);
                return;
            }
            //imposto la casella principale come selezionata
            foreach (ListItem i in ddl_Caselle.Items)
            {
                if (i.Text.Split(new string[] { "*" }, 2, System.StringSplitOptions.None).Length > 1)
                {
                    ddl_Caselle.SelectedValue = i.Value;
                    break;
                }
            }

            //salvo in sessione l'indirizzo della casella correntemente selezionata
            GestManager.setCasellaSel(ddl_Caselle.SelectedValue);
            #endregion
        }
Ejemplo n.º 12
0
 private DocsPaWR.Fascicolo[] getFascicoli(DocsPaWR.Registro registro)
 {
     DocsPaWR.Fascicolo[] listaFasc = null;
     if (!this.txt_CodFascicolo.Text.Equals(""))
     {
         string codiceFascicolo = this.txt_CodFascicolo.Text;
         listaFasc = ProjectManager.getListaFascicoliDaCodice(this, codiceFascicolo, registro, "I");
     }
     if (listaFasc != null)
     {
         return(listaFasc);
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 13
0
        private bool ricerca()
        {
            bool ricercaOk = true;

            DocsPaWR.Utente       user      = UIManager.UserManager.GetUserInSession();
            DocsPaWR.Ruolo        role      = UIManager.RoleManager.GetRoleInSession();
            DocsPaWR.OrgTitolario titolario = UIManager.ClassificationSchemeManager.GetTitolarioInSession();
            DocsPaWR.Registro     registro  = UIManager.RegistryManager.GetRegistryInSession();
            List <UIManager.RisultatiRicercaTitolario> result = null;

            if (string.IsNullOrEmpty(ClassificationSchemeTxtCodice.Text) &&
                string.IsNullOrEmpty(ClassificationSchemeTxtDescrizione.Text) &&
                string.IsNullOrEmpty(ClassificationSchemeTxtNote.Text) &&
                string.IsNullOrEmpty(ClassificationSchemeTxtIndiceSistematico.Text))
            {
                GridSearchClassificationScheme.DataSource = new List <UIManager.RisultatiRicercaTitolario>();
                GridSearchClassificationScheme.DataBind();
                ricercaOk = false;
            }
            else
            {
                result = UIManager.ClassificationSchemeManager.getRicercaTitolario(
                    ClassificationSchemeTxtCodice.Text,
                    ClassificationSchemeTxtDescrizione.Text,
                    ClassificationSchemeTxtNote.Text,
                    ClassificationSchemeTxtIndiceSistematico.Text,
                    user.idAmministrazione,
                    role.idGruppo,
                    registro.systemId,
                    titolario.ID);
                GridSearchClassificationScheme.DataSource = result;
                GridSearchClassificationScheme.DataBind();
                if (result.Count == 0)
                {
                    ricercaOk = false;
                }
            }

            user      = null;
            role      = null;
            titolario = null;
            registro  = null;

            return(ricercaOk);
        }
Ejemplo n.º 14
0
        protected void btn_gest_Click(object sender, System.EventArgs e)
        {
            int msgRtn;

            System.Web.UI.WebControls.CommandEventArgs ev = (System.Web.UI.WebControls.CommandEventArgs)e;
            try
            {
                if (ev.CommandArgument.Equals("GEST_FAX"))
                {
                    DocsPaWR.DocsPaWebService WS = ProxyManager.getWS();
                    infoUt    = UserManager.getInfoUtente(this);
                    userRuolo = UserManager.getRuolo(this);
                    userReg   = userRuolo.registri[0];
                    msgRtn    = WS.FaxProcessaCasella(Utils.getHttpFullPath(this), infoUt, userRuolo, userReg);
                    if (msgRtn < 0)
                    {
                        logger.Error("Errore nella testata (GEST_FAX)");
                        throw new Exception();
                    }
                    switch (msgRtn)
                    {
                    case 0:
                        Response.Write("<script>alert('Nelle caselle Fax controllate,\\nnon risultano nuovi Fax da Processare ')</script>");
                        break;

                    case 1:
                        Response.Write("<script>alert('Trovato " + msgRtn.ToString() + " Fax,\\nconsultare la lista COSE DA FARE per vedere la trasmissione ad esso relativa.')</script>");
                        break;

                    default:
                        Response.Write("<script >alert('Trovati " + msgRtn.ToString() + " Fax,\\nconsultare la lista COSE DA FARE per vedere le trasmissioni ad essi relativa.')</script>");
                        break;
                    }
                }
                GestManager.removeRegistroSel(this);
                CleanSessionMemoria();
            }
            catch (Exception ex)
            {
                string f = ex.Message.ToString();
                ErrorManager.redirectToErrorPage(this, ex);
            }

            this.btn_gest.DisabledUrl = "images/testata/btn_gestione_on.gif";
        }
Ejemplo n.º 15
0
        private void PerformActionSelectElemento(string idReg)
        {
            DocsPaWR.Registro rf = UserManager.getRegistroBySistemId(this, idReg);
            GestManager.setRegistroSel(this, rf);
            updateElementoSelezionato(rf);

            //Andrea De Marco - controllo IF-ELSE per Import Pregressi
            if (rf.flag_pregresso == true)
            {
                this.btn_cambiaStatoReg.Enabled = false;
            }
            else
            {
                this.btn_cambiaStatoReg.Enabled = true;
            }

            //
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Return true se il ruolo ha cha_consulta a 1 sul registro/rf selezionato
        /// </summary>
        /// <param name="page"></param>
        /// <param name="idRegistro"></param>
        /// <param name="chaRF"></param>
        /// <param name="idRuolo"></param>
        /// <returns></returns>
        public static bool RoleIsAuthorizedConsult(DocsPaWR.Registro registro, string idRuolo)
        {
            try
            {
                bool isEnable = true;
                //se ho selezionato un registro, ma ho visibilità di uno degli RF di quel registro, allora non devo poter fare check casella istit.
                if (GestManager.getRegistroSel().chaRF == "0")
                {
                    DocsPaWR.Registro[] regs = UserManager.getListaRegistriWithRF(idRuolo, "1", registro.systemId);
                    if (regs != null && regs.Length > 0)
                    {
                        for (int i = 0; i < regs.Length; i++)
                        {
                            if (MultiCasellaManager.RoleIsAuthorizedConsult(regs[i], idRuolo))
                            {
                                return(!isEnable);
                            }
                        }
                    }
                }

                DataSet ds = MultiCasellaManager.GetRightMailRegistro(registro.systemId, idRuolo);
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables["RIGHT_RUOLO_MAIL_REGISTRI"].Rows.Count > 0)
                    {
                        foreach (DataRow row in ds.Tables["RIGHT_RUOLO_MAIL_REGISTRI"].Rows)
                        {
                            if (row["CONSULTA"].ToString().Equals("1") && !string.IsNullOrEmpty(row["EMAIL_REGISTRO"].ToString()) && !row["EMAIL_REGISTRO"].ToString().Equals("&nbsp;"))
                            {
                                return(isEnable);
                            }
                        }
                    }
                }
                // non ci sono caselle associate all'RF/registro o il ruolo non ha diritti di consultazione su alcuna casella di posta
                return(!isEnable);
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return(false);
            }
        }
Ejemplo n.º 17
0
        private DocsPaWR.Fascicolo getFolder(DocsPaWR.Registro registro, ref string codice, ref string descrizione)
        {
            DocsPaWR.Folder[]  listaFolder = null;
            DocsPaWR.Fascicolo fasc        = null;
            string             separatore  = "//";
            int posSep = this.txt_CodFascicolo.Text.IndexOf("//");

            if (this.txt_CodFascicolo.Text != string.Empty && posSep > -1)
            {
                string codiceFascicolo = txt_CodFascicolo.Text.Substring(0, posSep);
                string descrFolder     = txt_CodFascicolo.Text.Substring(posSep + separatore.Length);

                listaFolder = ProjectManager.getListaFolderDaCodiceFascicolo(this, codiceFascicolo, descrFolder, registro);
                if (listaFolder != null && listaFolder.Length > 0)
                {
                    //calcolo fascicolazionerapida
                    InfoUtente infoUtente = UserManager.GetInfoUser();
                    fasc = ProjectManager.getFascicoloById(listaFolder[0].idFascicolo, infoUtente);

                    if (fasc != null)
                    {
                        //folder selezionato è l'ultimo
                        fasc.folderSelezionato = listaFolder[listaFolder.Length - 1];
                    }
                    codice      = fasc.codice + separatore;
                    descrizione = fasc.descrizione + separatore;
                    for (int i = 0; i < listaFolder.Length; i++)
                    {
                        codice      += listaFolder[i].descrizione + "/";
                        descrizione += listaFolder[i].descrizione + "/";
                    }
                    codice      = codice.Substring(0, codice.Length - 1);
                    descrizione = descrizione.Substring(0, descrizione.Length - 1);
                }
            }
            if (fasc != null)
            {
                return(fasc);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Analisi in tutti i contesti di chiamata
        /// per aggiornare il registro modificato in tutti i documenti
        /// </summary>
        private void RefreshDocumentsCallContext()
        {
            foreach (SiteNavigation.CallContext context in SiteNavigation.CallContextStack.GetContextList())
            {
                if (context.ContextName.Equals(SiteNavigation.NavigationKeys.DOCUMENTO))
                {
                    DocsPaWR.SchedaDocumento schedaDocumento = context.SessionState["gestioneDoc.schedaDocumento"] as DocsPAWA.DocsPaWR.SchedaDocumento;
                    if (schedaDocumento != null)
                    {
                        DocsPaWR.Registro changedRegistro = GestManager.getRegistroSel(this);

                        if (schedaDocumento.registro.codRegistro.Equals(changedRegistro.codRegistro))
                        {
                            schedaDocumento.registro = changedRegistro;
                        }
                    }
                }
            }
        }
Ejemplo n.º 19
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            try
            {
                Response.Expires = -1;
                Utils.startUp(this);
                if (!Page.IsPostBack)
                {
                    //registroSel = GestManager.getRegistroSel(this);
                    //if (registroSel != null)
                    //    setDettagli(registroSel);
                    if (Request.QueryString["idReg"] != null && Request.QueryString["idReg"] != string.Empty)
                    {
                        string systemId = Request.QueryString["idReg"].ToString();

                        if (systemId != null)
                        {
                            registroSel = UserManager.getRegistroBySistemId(this, systemId);

                            if (registroSel != null)
                            {
                                setDettagli(registroSel);
                            }
                        }
                    }

                    else
                    {
                        registroSel = GestManager.getRegistroSel(this);
                        if (registroSel != null)
                        {
                            setDettagli(registroSel);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                ErrorManager.redirect(this, ex);
            }
        }
Ejemplo n.º 20
0
        private DocsPaWR.SearchObject[] searchFasc(ObjScrollElementsList objScrollElementsList, Page page)
        {
            SAAdminTool.DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente(page);
            DocsPaWR.Registro userReg = UserManager.getRegistroSelezionato(page);
            DocsPaWR.FascicolazioneClassificazione classificazione; //= FascicoliManager.getClassificazioneSelezionata(page);

            // Caricamento della classifiazione dal livello di call context inferiore (se esiste)
            if (CallContextStack.CallerContext.ContextState.ContainsKey("Classification"))
            {
                classificazione = CallContextStack.CallerContext.ContextState["Classification"] as DocsPaWR.FascicolazioneClassificazione;
            }
            else
            {
                classificazione = FascicoliManager.getClassificazioneSelezionata(page);
            }

            bool allClass = FascicoliManager.getAllClassValue(page);

            SAAdminTool.DocsPaWR.FiltroRicerca[][] listaFiltri = null;
            SAAdminTool.DocsPaWR.SearchObject[]    listaFasc   = null;

            // Non utilizzato
            SearchResultInfo[] idProjects = null;

            switch (objScrollElementsList.searchContext)
            {
            case ObjScrollElementsList.EmunSearchContext.RICERCA_FASCICOLI:
                listaFiltri = FascicoliManager.getMemoriaFiltriRicFasc(page);

                // Se non ci sono filtri vengono caricati quelli per la nuova ricerca
                if (listaFiltri == null)
                {
                    listaFiltri = CallContextStack.CallerContext.ContextState["SearchFilters"] as FiltroRicerca[][];
                }

                // listaFasc = FascicoliManager.getListaFascicoliPaging(page, classificazione, userReg, listaFiltri[0], allClass, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, objScrollElementsList.pageSize, false, out idProjects, null);
                listaFasc = FascicoliManager.getListaFascicoliPagingCustom(page, classificazione, userReg, listaFiltri[0], allClass, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, objScrollElementsList.pageSize, false, out idProjects, null, GridManager.IsRoleEnabledToUseGrids(), false, null, null, true);
                break;
            }

            return(listaFasc);
        }
Ejemplo n.º 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Response.Expires = -1;
         Utils.startUp(this);
         if (!Page.IsPostBack)
         {
             elemento = GestManager.getRegistroSel(this);
             if (elemento != null)
             {
                 setDettagli(elemento);
             }
         }
     }
     catch (System.Exception ex)
     {
         ErrorManager.redirect(this, ex);
     }
 }
Ejemplo n.º 22
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="codClass"></param>
        private void LoadTreeViewConRicerca(string codClass)
        {
            string idrecord = null;
            string idparent = null;
            int    livello  = 0;

            try
            {
                DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                string xmlStream;

                DocsPaWR.Registro rg    = UserManager.getRegistroSelezionato(this.Page);
                string            idAmm = rg.idAmministrazione;

                xmlStream = ws.findNodoByCod(codClass, idAmm, rg.systemId, idTitolario);

                XmlDocument doc = new XmlDocument();
                doc.LoadXml(xmlStream);

                XmlNode lista = doc.SelectSingleNode("NewDataSet");
                if (lista.ChildNodes.Count == 1)
                {
                    foreach (XmlNode nodo in lista.ChildNodes)
                    {
                        idrecord = nodo.SelectSingleNode("SYSTEM_ID").InnerText;
                        idparent = nodo.SelectSingleNode("ID_PARENT").InnerText;
                        livello  = Int32.Parse(nodo.SelectSingleNode("NUM_LIVELLO").InnerText);
                    }

                    LoadTreeViewRicerca(idrecord, idparent, livello);
                }
                else
                {
                    lbl_msg.Text = "Codice non trovato!";
                }
            }
            catch
            {
                lbl_msg.Text = "Attenzione! si è verificato un errore di caricamento della pagina.";
            }
        }
Ejemplo n.º 23
0
        public static bool startIstitutionalMailboxCheck(Page page, DocsPaWR.Registro registro, out DocsPaWR.MailAccountCheckResponse checkResponse)
        {
            bool retValue = false;

            checkResponse = null;

            try
            {
                string serverName = utils.getHttpFullPath();

                DocsPaWR.Utente ut1   = (DocsPaWR.Utente)page.Session["userData"];
                DocsPaWR.Ruolo  ruolo = (DocsPaWR.Ruolo)page.Session["userRuolo"];
                retValue = docsPaWS.InteroperabilitaRicezione(serverName, registro, ut1, ruolo, out checkResponse);
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return(false);
            }
            return(retValue);
        }
Ejemplo n.º 24
0
        public static string getStatoRegistro(DocsPaWR.Registro reg)
        {
            // R = Rosso -  CHIUSO
            // V = Verde -  APERTO
            // G = Giallo - APERTO IN GIALLO

            string dataApertura = reg.dataApertura;

            if (!dataApertura.Equals(""))
            {
                DateTime dt_cor = DateTime.Now;

                CultureInfo ci = new CultureInfo("it-IT");

                string[] formati = { "dd/MM/yyyy HH.mm.ss", "dd/MM/yyyy H.mm.ss", "dd/MM/yyyy" };

                DateTime d_ap = DateTime.ParseExact(dataApertura, formati, ci.DateTimeFormat, DateTimeStyles.AllowWhiteSpaces);
                //aggiungo un giorno per fare il confronto con now (che comprende anche minuti e secondi)
                d_ap = d_ap.AddDays(1);

                string mydate = dt_cor.ToString(ci);

                //DateTime dt = DateTime.ParseExact(mydate,formati,ci.DateTimeFormat,DateTimeStyles.AllowWhiteSpaces);

                string StatoAperto = "A";
                if (reg.stato.Equals(StatoAperto))
                {
                    if (dt_cor.CompareTo(d_ap) > 0)
                    {
                        //data odierna maggiore della data di apertura del registro
                        return("G");
                    }
                    else
                    {
                        return("V");
                    }
                }
            }
            return("R");
        }
Ejemplo n.º 25
0
        public static bool startIstitutionalMailboxCheck(Page page, DocsPaWR.Registro registro, out DocsPAWA.DocsPaWR.MailAccountCheckResponse checkResponse)
        {
            bool retValue = false;

            checkResponse = null;

            try
            {
                string serverName = Utils.getHttpFullPath(page);

                DocsPaWR.Utente ut1   = (DocsPAWA.DocsPaWR.Utente)page.Session["userData"];
                DocsPaWR.Ruolo  ruolo = (DocsPAWA.DocsPaWR.Ruolo)page.Session["userRuolo"];

                retValue = docsPaWS.InteroperabilitaRicezione(serverName, registro, ut1, ruolo, out checkResponse);
            }
            catch (Exception es)
            {
                ErrorManager.redirect(page, es);
            }

            return(retValue);
        }
Ejemplo n.º 26
0
        protected string GetRegistro(DocsPaWR.ItemReportPregressi report)
        {
            string result = string.Empty;

            if (!string.IsNullOrEmpty(report.idRegistro))
            {
                if (this.Registri == null)
                {
                    this.Registri = new Dictionary <string, DocsPaWR.Registro>();
                }
                if (this.Registri.ContainsKey(report.idRegistro))
                {
                    result = this.Registri[report.idRegistro].codRegistro;
                }
                else
                {
                    DocsPaWR.Registro reg = WsInstance.GetRegistroBySistemId(report.idRegistro);
                    this.Registri.Add(report.idRegistro, reg);
                    result = reg.codRegistro;
                }
            }
            return(result);
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Ritorna tutti i registri e gli rf associati a un ruolo, o solamente gli RF o solamente i registri
        /// in base al valore dello string all
        /// se all="" ritorna tutto (sia registri che rf)
        /// se all="0" ritorna solo i registri
        /// se all="1" ritorna solo gli RF
        /// </summary>
        /// <param name="all"></param>
        //private void caricaRegistriDisponibili(string all, string idAooColl)
        private void caricaRegistriDisponibili()
        {
            //il pannello è visibile solo se il ruolo vede almeno un RF

            DocsPaWR.Registro reg = null;

            //prendo tutti i registri

            DocsPaWR.Registro[] listaRegistri = UserManager.getListaRegistri(this);

            string labelCombo;

            if (listaRegistri != null && listaRegistri.Length > 0)
            {
                //importante. I value della combo dei registri sono formati da terne separate dal carattere "_":
                //nella prima posizione viene specificata la systemId del registro o dell'RF
                //nella seconda posizione viene specificato un valore popolato solo per gli RF:
                //  - "" per i registri
                //  - "0" per gli RF abilitati
                //  - "1" per gli RF non abilitati
                //nella terza posizione viene specificato l'IdAooCollegata (solo per gli RF)

                #region commento
                //for (int i = 0; i < listaRF.Length; i++)
                //{
                //    this.ddlRegRf.Items.Add((listaRF[i]).codRegistro);

                //    this.ddlRegRf.Items[i].Value = (listaRF[i]).systemId + "_" + listaRF[i].rfDisabled + "_" + listaRF[i].idAOOCollegata;

                //}
                #endregion

                //this.pnlCombo.Visible = true;
                this.lblCombo.Visible = true;
                this.ddlRegRf.Visible = true;

                if (wnd == "proto" || wnd == "protoSempl") // caso di protocollo e protocollo semplificato
                {
                    if (wnd == "proto")
                    {
                        reg = UserManager.getRegistroSelezionato(this);
                    }
                    else
                    {
                        ProtocollazioneIngresso.Registro.RegistroMng regMng = new ProtocollazioneIngresso.Registro.RegistroMng(this);

                        reg = regMng.GetRegistroCorrente();
                    }


                    int l = -1;
                    for (int i = 0; i < listaRegistri.Length; i++)
                    {
                        if (listaRegistri[i].systemId == reg.systemId)//aggiungo il registro solo se coincide con quello di protocollo
                        {
                            l++;
                            this.ddlRegRf.Items.Add((listaRegistri[i]).codRegistro);

                            //this.ddlRegRf.Items[l].Value = (listaRegistri[i]).systemId + "_" + listaRegistri[i].rfDisabled + "_" + listaRegistri[i].idAOOCollegata;
                            this.ddlRegRf.Items[l].Value    = "";
                            this.ddlRegRf.Items[l].Selected = true;

                            //prendo gli RF di ciascun registro
                            listaRF = UserManager.getListaRegistriWithRF(this, "1", (listaRegistri[i]).systemId);

                            if (listaRF != null && listaRF.Length > 0)
                            {
                                foreach (DocsPaWR.Registro currReg in listaRF)
                                {
                                    string strText = InserisciSpazi();
                                    this.ddlRegRf.Items.Add(strText + currReg.codRegistro);
                                    l++;
                                    //this.ddlRegRf.Items[l].Text = strText + currReg.codRegistro;
                                    this.ddlRegRf.Items[l].Value = currReg.systemId;
                                    //this.ddlRegRf.Items[l].Attributes.Add("style", " color:Gray");
                                }
                            }
                            else
                            {
                                //se non ci sono RF associati al registro di protocollo rendo invisibile il pannello
                                //this.pnlCombo.Visible = false;
                                this.lblCombo.Visible = false;
                                this.ddlRegRf.Visible = false;
                            }
                        }
                    }
                }
                else // caso di documenti grigi e ricerche
                {
                    DocsPaWR.SchedaDocumento schedaDocumento = DocumentManager.getDocumentoInLavorazione(this);

                    int l = -1;
                    int i = 0;
                    for (i = 0; i < listaRegistri.Length; i++)
                    {
                        l++;
                        //carico nella combo tutti i registri che il ruolo può vedere
                        if (!ddlRegRf.Items.Contains(ddlRegRf.Items.FindByValue((listaRegistri[i]).systemId)))
                        {
                            this.ddlRegRf.Items.Add((listaRegistri[i]).codRegistro);
                            this.ddlRegRf.Items[i].Value = (listaRegistri[i]).systemId;
                        }

                        ////prendo gli RF di ciascun registro
                        listaRF = UserManager.getListaRegistriWithRF(this, "1", (listaRegistri[i]).systemId);

                        if (listaRF != null && listaRF.Length > 0)
                        {
                            foreach (DocsPaWR.Registro currReg in listaRF)
                            {
                                string strText = InserisciSpazi();
                                if (!ddlRegRf.Items.Contains(ddlRegRf.Items.FindByValue(currReg.systemId)))
                                {
                                    this.ddlRegRf.Items.Add(strText + currReg.codRegistro);
                                    l++;
                                    this.ddlRegRf.Items[l].Value = currReg.systemId;
                                    //this.ddlRegRf.Items[l].Attributes.Add("style", " color:Gray");
                                }
                            }
                        }
                    }

                    ListItem item = new ListItem();
                    item.Text  = "TUTTI";
                    item.Value = "";
                    if (!ddlRegRf.Items.Contains(ddlRegRf.Items.FindByText("TUTTI")))
                    {
                        this.ddlRegRf.Items.Add(item);
                    }

                    if (schedaDocumento != null)
                    {
                        if (schedaDocumento.registro == null)
                        {
                            if (ctx.Session["userRegistro"] != null)
                            {
                                ListItem founded =
                                    this.ddlRegRf.Items.FindByValue(((Registro)ctx.Session["userRegistro"]).systemId);
                                if (founded != null)
                                {
                                    founded.Selected   = true;
                                    keyWord.ContextKey = founded.Value;
                                }
                            }
                            else
                            {
                                ListItem founded =
                                    this.ddlRegRf.Items.FindByValue(listaRegistri[0].systemId);
                                if (founded != null)
                                {
                                    founded.Selected   = true;
                                    keyWord.ContextKey = founded.Value;
                                }
                            }
                        }
                        else
                        {
                            ListItem founded =
                                this.ddlRegRf.Items.FindByValue(((Registro)ctx.Session["userRegistro"]).systemId);
                            if (founded != null)
                            {
                                founded.Selected   = true;
                                keyWord.ContextKey = founded.Value;

                                ////prendo gli RF di ciascun registro
                                listaRF = UserManager.getListaRegistriWithRF(this, "1", founded.Value);

                                string[] rf = new string[listaRF.Length];
                                int      j  = 0;
                                foreach (Registro regis in listaRF)
                                {
                                    rf[j] = regis.systemId;
                                    j++;
                                }

                                string[] index = new string[ddlRegRf.Items.Count];
                                j = 0;
                                for (int z = 0; z < ddlRegRf.Items.Count; z++)
                                {
                                    if (!string.IsNullOrEmpty(ddlRegRf.Items[z].Value) &&
                                        ddlRegRf.Items[z].Value != founded.Value &&
                                        !rf.Contains(ddlRegRf.Items[z].Value))
                                    {
                                        index[j] = ddlRegRf.Items[z].Value;
                                        j++;
                                    }
                                }

                                foreach (var val in index)
                                {
                                    ddlRegRf.Items.Remove(ddlRegRf.Items.FindByValue(val));
                                }
                            }
                        }
                    }
                    else
                    {
                        if (ctx.Session["userRegistro"] != null)
                        {
                            ListItem founded =
                                this.ddlRegRf.Items.FindByValue(((Registro)ctx.Session["userRegistro"]).systemId);
                            if (founded != null)
                            {
                                founded.Selected   = true;
                                keyWord.ContextKey = founded.Value;
                            }
                        }
                        else
                        {
                            ListItem founded =
                                this.ddlRegRf.Items.FindByValue(listaRegistri[0].systemId);
                            if (founded != null)
                            {
                                founded.Selected   = true;
                                keyWord.ContextKey = founded.Value;
                            }
                        }
                    }
                }
            }
            else
            {
                throw new Exception();
            }
        }
Ejemplo n.º 28
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Utils.startUp(this);

            userHome  = UserManager.getUtente(this);
            userRuolo = UserManager.getRuolo(this);


            if (!IsPostBack)
            {
                // Caricamento della griglia e suo salvataggio se non ce n'è una già salvata
                //   if (GridManager.SelectedGrid == null)
                //     GridManager.SelectedGrid = GridManager.GetStandardGridForUser(GridTypeEnumeration.DocumentInProject);

                this.btn_documenti.Attributes.Add("onClick", "ShowWaitingPage();");
                this.btn_trasmissioni.Attributes.Add("onClick", "ShowWaitingPage();");

                // Aggiornamento contesto corrente
                this.RefreshCallContext("Documenti");

                //CaricaComboRegistri(ddl_registri);
                //carica il ruolo scelto
                if (userRuolo != null)
                {
                    //this.lbl_ruolo.Text = userRuolo.descrizione;

                    //this.lbl_registri.Text=UserManager.getRegistroSelezionato(this).descrizione;
                    DocsPaWR.Registro registroSelezionato = UserManager.getRegistroSelezionato(this);
                    if (registroSelezionato == null)
                    {
                        this.settaPrimoRegistroSelezionato();
                        registroSelezionato = UserManager.getRegistroSelezionato(this);
                    }


                    this.pnl_regStato.Visible = true;
                    //this.pnl_riga.Visible = true;
                    this.lbl_registri.Text = registroSelezionato.codRegistro;
                    this.setStatoReg(registroSelezionato);
                    string rigaDescrizione = "<tr><td align=\"center\" height=\"15\" class=\"titolo_bianco\" bgcolor=\"#810d06\">Registro</td></tr>";

                    Page.RegisterClientScriptBlock("CallDescReg", "<!--Desc Reg inzio--><DIV onmouseover=\"closeIt()\"><LAYER onmouseover=\"closeIt()\"></LAYER></DIV><DIV id=\"descreg\" style=\"visibility:hidden;LEFT: 200px; POSITION: absolute; TOP: 24px\"><div align=\"left\"><table cellSpacing=\"0\" border='1' bordercolordark='#ffffff' cellPadding=\"0\" bgColor=\"#d9d9d9\"  width='210px' height='60px'>" + rigaDescrizione + "<tr><td  bgColor=\"#d9d9d9\" class=\"testo_grigio_sp\">" + UserManager.getRegistroSelezionato(this).descrizione + "</td></tr></table></div></DIV><!--Fine desc reg-->");

                    //Page.RegisterClientScriptBlock("CallDescReg","<!--Desc Reg inzio--><DIV onmouseover=\"closeIt()\"><LAYER onmouseover=\"closeIt()\"></LAYER></DIV><DIV id=\"descreg\" style=\"visibility:hidden;LEFT: 230px; POSITION: absolute; TOP: 60px\"><div align=\"left\"><table cellSpacing=\"0\" border='1' bordercolordark='#ffffff' cellPadding=\"0\" bgColor=\"#d9d9d9\"  width='100px' height='60px'><tr><td  bgColor=\"#d9d9d9\" class=\"testo_grigio_sp\">"+UserManager.getRegistroSelezionato(this).descrizione+"</td></tr></table></div></DIV><!--Fine desc reg-->");
                }
                //////
                //////				if(Request.QueryString["back"] != null && !Request.QueryString["back"].Equals(""))
                //////				{
                //////					DocsPaWR.Fascicolo fascSel = FascicoliManager.getMemoriaFascicoloSelezionato(this);
                //////					DocsPaWR.Folder folderSel = FascicoliManager.getMemoriaFolderSelezionata(this);
                //////
                //////					FascicoliManager.setFascicoloSelezionato(this,fascSel);
                //////					FascicoliManager.setFolderSelezionato(this,folderSel);
                //////				}
            }

            if ((!Request.QueryString["tab"].Equals("")) && (!Request.QueryString["tab"].Equals(null)))
            {
                nomeTab = Request.QueryString["tab"].ToString();
                CaricaTab(nomeTab);
            }

            DocsPaWR.Fascicolo fasc = FascicoliManager.getFascicoloSelezionato(this);

            //si abilitano le trasmissioni solo per i fascicoli procedimentali
            if (!fasc.tipo.Equals("P"))
            {
                this.btn_trasmissioni.Enabled = false;
            }
        }
Ejemplo n.º 29
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="infoSpedizione"></param>
        protected void FetchRegistri(DocsPaWR.SpedizioneDocumento infoSpedizione)
        {
            // Se è presente almeno un destinatario interoperante,
            // vengono caricati i registri e gli RF visibili dall'utente corrente
            if (infoSpedizione.DestinatariEsterni.Where(e => e.Interoperante).Count() > 0)
            {
                // Inserimento elemento vuoto
                this.cboRegistriRF.Items.Add(new ListItem(string.Empty, string.Empty));

                DocsPaWR.Registro[] registriRF = MultiBoxManager.GetRegisterEnabledSend().ToArray();

                this.cboRegistriRF.Items.AddRange(
                    (from reg in registriRF
                     select new ListItem(
                         string.Format("{0} - {1}", reg.codRegistro, reg.descrizione), reg.systemId)).ToArray());

                int countRF = registriRF.Count(e => e.chaRF == "1");

                if (this.SelezionaRFPredefinito)
                {
                    if (countRF == 0)
                    {
                        // Nessun RF presente, selezione sul registro di protocollazione
                        //if (registriRF.Where(reg => reg.systemId == infoSpedizione.IdRegistroRfMittente) != null)
                        if (registriRF.Count(reg => reg.systemId == infoSpedizione.IdRegistroRfMittente) > 0) //Riallineamento codice da versione 3.22
                        {
                            this.cboRegistriRF.SelectedValue = registriRF.Where(reg => reg.systemId == infoSpedizione.IdRegistroRfMittente).First().systemId;
                        }
                        else
                        {
                            this.cboRegistriRF.SelectedValue = string.Empty;
                        }
                        //this.cboRegistriRF.SelectedValue = registriRF.Contains(UserManager.getRegistroBySistemId(this.Page, infoSpedizione.IdRegistroRfMittente)) ? infoSpedizione.IdRegistroRfMittente : string.Empty;
                    }
                    else if (countRF == 1)
                    {
                        // Se è presente un solo RF, viene selezionato per impostazione predefinita nella combo

                        DocsPaWR.Registro rf = registriRF.Where(e => e.chaRF == "1").First();
                        this.cboRegistriRF.SelectedValue = rf.systemId;
                    }
                    else if (countRF > 1)
                    {
                        // In presenza di più di un RF, la selezione viene effettuata sull'elemento vuoto
                        this.cboRegistriRF.SelectedValue = string.Empty;
                    }
                }
                else
                {
                    //this.cboRegistriRF.SelectedValue = registriRF.Contains(UserManager.getRegistroBySistemId(this.Page,infoSpedizione.IdRegistroRfMittente)) ? infoSpedizione.IdRegistroRfMittente : string.Empty;
                    if (countRF == 0)
                    {
                        //if (registriRF.Where(reg => reg.systemId == infoSpedizione.IdRegistroRfMittente) != null)
                        if (registriRF.Count(reg => reg.systemId == infoSpedizione.IdRegistroRfMittente) > 0) //Riallineamento codice da versione 3.22
                        {
                            this.cboRegistriRF.SelectedValue = registriRF.Where(reg => reg.systemId == infoSpedizione.IdRegistroRfMittente).First().systemId;
                        }
                        else
                        {
                            this.cboRegistriRF.SelectedValue = string.Empty;
                        }
                    }
                    else
                    {
                        // In presenza di più di un RF, seleziona elemento vuoto
                        this.cboRegistriRF.SelectedValue = string.Empty;
                    }
                }

                if (!string.IsNullOrEmpty(this.cboRegistriRF.SelectedValue))
                {
                    SetCaselleRegistro("1");
                    SetRicevutaPecCombo();
                    ddl_caselle.Enabled        = true;
                    cboTipoRicevutaPec.Enabled = true;
                    // Refresh id registro selezionato e mail address
                    infoSpedizione.IdRegistroRfMittente = this.cboRegistriRF.SelectedValue;
                    infoSpedizione.mailAddress          = this.ddl_caselle.SelectedValue;
                    this.SetSpedizioneDocumento(infoSpedizione);
                }
            }
        }
Ejemplo n.º 30
0
        public virtual string[] GetListaCorrispondentiVeloce(string prefixText, int count, string contextKey)
        {
            //INIZIALIZZAZIONE
            DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService();
            string[] listaTemp = null;
            DocsPaWR.ParametriRicercaRubrica qco = new DocsPaWR.ParametriRicercaRubrica();
            string idRuolo     = null;
            string tipoRicerca = null;
            string idRegistro  = null;
            bool   doRuoli     = false;
            bool   doUo        = false;
            bool   doUtenti    = false;

            DocsPAWA.DocsPaWR.InfoUtente infoUtente = new DocsPAWA.DocsPaWR.InfoUtente();
            qco.caller = new DocsPAWA.DocsPaWR.RubricaCallerIdentity();
            qco.parent = "";
            char[]   delimiterChars = { '-' };
            string[] splitData      = contextKey.Split(delimiterChars);
            qco.caller.IdRuolo    = splitData[0];
            qco.caller.IdRegistro = splitData[1];
            qco.descrizione       = prefixText;
            string callType = splitData[3];

            infoUtente.idAmministrazione = splitData[2];
            bool abilitazioneRubricaComune = RubricaComune.Configurazioni.GetConfigurazioni(infoUtente).GestioneAbilitata;

            DocsPaWR.Registro[] regTemp = docsPaWS.UtenteGetRegistriWithRf(splitData[0], "", "");
            //Prendo soltanto i corrispondenti del mio registro e di tutti i miei rf se presenti
            DocsPaWR.Registro[] regOnliyTemp = null;
            if (regTemp != null && regTemp.Length > 0)
            {
                int countReg = 0;
                regOnliyTemp = new DocsPaWR.Registro[regTemp.Length];
                for (int y = 0; y < regTemp.Length; y++)
                {
                    if ((!string.IsNullOrEmpty(regTemp[y].chaRF) && regTemp[y].chaRF.Equals("1")) || regTemp[y].systemId.Equals(qco.caller.IdRegistro))
                    {
                        regOnliyTemp[countReg] = regTemp[y];
                        countReg++;
                    }
                }
            }

            string retValue = "";

            foreach (DocsPaWR.Registro item in regOnliyTemp)
            {
                if (item != null)
                {
                    retValue += " " + item.systemId + ",";
                }
            }
            if (retValue.EndsWith(","))
            {
                retValue = retValue.Remove(retValue.LastIndexOf(","));
            }

            qco.caller.filtroRegistroPerRicerca = retValue;

            switch (callType)
            {
            // Mittente su protocollo in ingresso
            case "CALLTYPE_PROTO_IN":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_IN;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.doRuoli         = true;
                qco.doUo            = true;
                qco.doUtenti        = true;
                qco.doListe         = false;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                break;

            // Mittente su protocollo in uscita
            case "CALLTYPE_PROTO_OUT_MITT":
                qco.calltype = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_OUT_MITT;
                qco.tipoIE   = DocsPaWR.AddressbookTipoUtente.INTERNO;
                qco.doListe  = false;
                qco.doRF     = false;
                qco.doRuoli  = true;
                qco.doUtenti = true;
                qco.doUo     = true;
                break;

            // Mittente su protocollo interno
            case "CALLTYPE_PROTO_INT_MITT":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_INT_MITT;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.INTERNO;
                qco.doListe         = false;
                qco.doRF            = false;
                qco.doRubricaComune = false;
                qco.doRuoli         = true;
                qco.doUo            = true;
                qco.doUtenti        = true;
                break;

            // Destinatari
            case "CALLTYPE_PROTO_OUT":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_OUT;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.doListe         = true;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                qco.doRuoli  = true;
                qco.doUo     = true;
                qco.doUtenti = true;
                break;

            // Destinatario su protocollo interno
            case "CALLTYPE_PROTO_INT_DEST":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_INT_DEST;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.INTERNO;
                qco.doListe         = true;
                qco.doRF            = false;
                qco.doRubricaComune = false;
                qco.doRuoli         = true;
                qco.doUtenti        = true;
                qco.doUo            = true;
                break;

            // Mittente protocollo in ingresso semplificato
            case "CALLTYPE_PROTO_INGRESSO":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_INGRESSO;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.doListe         = false;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                qco.doRuoli  = true;
                qco.doUo     = true;
                qco.doUtenti = true;
                break;

            // Mittente protocollo in uscita semplificato
            case "CALLTYPE_PROTO_OUT_MITT_SEMPLIFICATO":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_OUT_MITT_SEMPLIFICATO;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.INTERNO;
                qco.doListe         = false;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                qco.doRuoli  = true;
                qco.doUo     = true;
                qco.doUtenti = true;
                break;

            //Destinatari protocollo in uscita semplificato
            case "CALLTYPE_PROTO_USCITA_SEMPLIFICATO":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_PROTO_USCITA_SEMPLIFICATO;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.doListe         = true;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                qco.doRuoli  = true;
                qco.doUo     = true;
                qco.doUtenti = true;
                break;

            //Mittenti multipli ingresso
            case "CALLTYPE_MITT_MULTIPLI":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_MITT_MULTIPLI;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.doRuoli         = true;
                qco.doUo            = true;
                qco.doUtenti        = true;
                qco.doListe         = false;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                break;

            // Mittente multiplo protocollo in ingresso semplificato
            case "CALLTYPE_MITT_MULTIPLI_SEMPLIFICATO":
                qco.calltype        = DocsPaWR.RubricaCallType.CALLTYPE_MITT_MULTIPLI_SEMPLIFICATO;
                qco.tipoIE          = DocsPaWR.AddressbookTipoUtente.GLOBALE;
                qco.doListe         = false;
                qco.doRF            = false;
                qco.doRubricaComune = true;
                if (abilitazioneRubricaComune == false)
                {
                    qco.doRubricaComune = false;
                }
                qco.doRuoli  = true;
                qco.doUo     = true;
                qco.doUtenti = true;
                break;
            }

            listaTemp = docsPaWS.getElementiRubricaVeloce(infoUtente, qco);

            return(listaTemp);
        }