示例#1
0
        private string moveFascInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["fascIndex"] = objScrollElementsList.selectedElement.ToString();
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["fascIndex"] = objScrollElementsList.selectedElement.ToString();
                }
            }

            if (objScrollElementsList.objList != null)
            {
                DocsPaWR.SearchObject fasc = (DocsPaWR.SearchObject)objScrollElementsList.objList[objScrollElementsList.selectedElement];

                //DocsPaWR.Fascicolo fasc = (DocsPaWR.Fascicolo)objScrollElementsList.objList[objScrollElementsList.selectedElement];

                DocsPaWR.Fascicolo newfasc = FascicoliManager.getFascicoloById(page, fasc.SearchObjectID);

                if (fasc != null)
                {
                    script = ScrollManager.refreshPage(newfasc, page);
                }
            }

            return(script);
        }
示例#2
0
        private string moveToDoListInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione[] dettTrasm = null;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;

                    //Recupero il dettaglio della trasissione
                    dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                    if (dettTrasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                    }
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;

                    //Recupero il dettaglio della trasissione
                    dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                    if (dettTrasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (dettTrasm != null && dettTrasm[0].infoDocumento != null && !string.IsNullOrEmpty(dettTrasm[0].infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = dettTrasm[0].infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (dettTrasm != null && dettTrasm[0].infoFascicolo != null && !string.IsNullOrEmpty(dettTrasm[0].infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = dettTrasm[0].infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
示例#3
0
        private string moveTrasmInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione trasm = null;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;

                    //Recupero la trasmissione
                    trasm = (DocsPAWA.DocsPaWR.Trasmissione)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    if (trasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                    }
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;

                    //Recupero la trasmissione
                    trasm = (DocsPAWA.DocsPaWR.Trasmissione)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    if (trasm != null)
                    {
                        SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (trasm != null && trasm.infoDocumento != null && !string.IsNullOrEmpty(trasm.infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = trasm.infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (trasm != null && trasm.infoFascicolo != null && !string.IsNullOrEmpty(trasm.infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = trasm.infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
示例#4
0
        private string moveFascNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            //Recupero le informazioni per effettuare una nuova ricerca
            DocsPAWA.DocsPaWR.SearchObject[] listaFasc = null;
            DocsPAWA.DocsPaWR.SearchObject   fasc      = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["fascIndex"] = "0";
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo la nuova ricerca
                    listaFasc = searchFasc(objScrollElementsList, page);
                    if (listaFasc != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaFasc);
                        fasc = (DocsPaWR.SearchObject)objScrollElementsList.objList[0];
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["fascIndex"] = (objScrollElementsList.pageSize - 1).ToString();
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo la nuova ricerca
                    listaFasc = searchFasc(objScrollElementsList, page);
                    if (listaFasc != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaFasc);
                        fasc = (DocsPaWR.SearchObject)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                    }
                }
            }

            if (fasc != null)
            {
                script = ScrollManager.refreshPage2(fasc, page);
            }

            return(script);
        }
示例#5
0
        public static void setInContextNewObjScrollElementsList(int totalNumberOfElements, int totalNumberOfPage, int pageSize, int selectedElement, int selectedPage, ArrayList objList, ObjScrollElementsList.EmunSearchContext searchContext)
        {
            ObjScrollElementsList objScrollElementsList = new ObjScrollElementsList();

            objScrollElementsList.totalNumberOfElements = totalNumberOfElements;
            objScrollElementsList.totalNumberOfPage     = totalNumberOfPage;
            objScrollElementsList.pageSize        = pageSize;
            objScrollElementsList.selectedElement = selectedElement;
            objScrollElementsList.selectedPage    = selectedPage;
            objScrollElementsList.objList         = objList;
            objScrollElementsList.searchContext   = searchContext;

            SiteNavigation.CallContextStack.CurrentContext.objScrollElementsList = objScrollElementsList;
        }
示例#6
0
        private string moveDocInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                }
                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = objScrollElementsList.selectedElement.ToString();
                }
            }

            if (objScrollElementsList.objList != null)
            {
                InfoDocumento newDoc = null;
                string        tipo   = objScrollElementsList.objList[objScrollElementsList.selectedElement].GetType().Name;

                if (tipo.Equals("SearchObject"))
                {
                    DocsPaWR.SearchObject doc = (DocsPaWR.SearchObject)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    newDoc = DocumentManager.GetInfoDocumento(doc.SearchObjectID, doc.SearchObjectID, page);
                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(newDoc, page);
                    }
                }
                else
                {
                    DocsPaWR.InfoDocumento doc = (DocsPaWR.InfoDocumento)objScrollElementsList.objList[objScrollElementsList.selectedElement];
                    newDoc = DocumentManager.GetInfoDocumento(doc.idProfile, doc.idProfile, page);
                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(newDoc, page);
                    }
                }
            }

            return(script);
        }
示例#7
0
        private DocsPaWR.SearchObject[] searchFasc(ObjScrollElementsList objScrollElementsList, Page page)
        {
            DocsPAWA.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);

            DocsPAWA.DocsPaWR.FiltroRicerca[][] listaFiltri = null;
            DocsPAWA.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);
        }
示例#8
0
        public override string move(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            //N.B. I casi di primo e ultimo elemento non vengono gestiti perchè
            //il pulsante next è disabilitato in caso ci si trova all'ultimo elemento ed
            //il pulsante prev è disabilitato in caso ci si trova al primo elemento

            //Mi muovo in avanti
            if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
            {
                //Non siamo a fine pagina, vanno aggiornati i dati
                if (objScrollElementsList.selectedElement + 1 != objScrollElementsList.pageSize)
                {
                    return(this.moveDocInPage(objScrollElementsList, page, scrollDirection));
                }

                //Siamo a fine pagina, va rifatta la ricerca e aggiornati i dati
                if (objScrollElementsList.selectedElement + 1 == objScrollElementsList.pageSize)
                {
                    return(this.moveDocNotInPage(objScrollElementsList, page, scrollDirection));
                }
            }

            //Mi muovo indietro
            if (scrollDirection == ScrollManager.ScrollDirection.PREV)
            {
                //Non siamo a inizio pagina, vanno aggiornati i dati
                if (objScrollElementsList.selectedElement != 0)
                {
                    return(this.moveDocInPage(objScrollElementsList, page, scrollDirection));
                }

                //Siamo a inizio pagina, va rifatta la ricerca e aggiornati i dati
                if (objScrollElementsList.selectedElement == 0)
                {
                    return(this.moveDocNotInPage(objScrollElementsList, page, scrollDirection));
                }
            }

            return(string.Empty);
        }
示例#9
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            #region Codice che gestisce lo scroll di elementi in sessione
            //if (Session["ObjScrollElementsList"] != null && ScrollManager.enableScrollElementsList())
            //{
            //    objScrollElementsList = (ObjScrollElementsList)Session["ObjScrollElementsList"];
            //    setLabelAndButton(objScrollElementsList);
            //}
            #endregion

            #region Codice che gestisce lo scroll di elementi nel CONTEXT (tasto back)
            if (SiteNavigation.CallContextStack.CallerContext != null && SiteNavigation.CallContextStack.CallerContext.objScrollElementsList != null && ScrollManager.enableScrollElementsList())
            {
                objScrollElementsList = ScrollManager.getFromContextObjScrollElementsList();
                setLabelAndButton(objScrollElementsList);
            }
            else
            {
                this.Visible = false;
            }
            #endregion
        }
示例#10
0
        private DocsPaWR.Trasmissione[] searchTrasm(ObjScrollElementsList objScrollElementsList, Page page)
        {
            DocsPAWA.DocsPaWR.FiltroRicerca[] filtri       = null;
            DocsPAWA.DocsPaWR.Trasmissione[]  listaTram    = null;
            DocsPaWR.TrasmissioneOggettoTrasm oggettoTrasm = new DocsPAWA.DocsPaWR.TrasmissioneOggettoTrasm();

            switch (objScrollElementsList.searchContext)
            {
            case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC:
            case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                filtri = DocsPAWA.DocumentManager.getFiltroRicTrasm(page);
                if (SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["verso"].ToString().ToUpper() == "R".ToUpper())
                {
                    listaTram = DocsPAWA.TrasmManager.getQueryRicevutePaging(page, oggettoTrasm, UserManager.getUtente(page), UserManager.getRuolo(page), filtri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements);
                }
                if (SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["verso"].ToString().ToUpper() == "E".ToUpper())
                {
                    listaTram = DocsPAWA.TrasmManager.getQueryEffettuatePaging(page, oggettoTrasm, UserManager.getUtente(page), UserManager.getRuolo(page), filtri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements);
                }
                break;
            }

            return(listaTram);
        }
示例#11
0
        private string moveTrasmNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione[] listaTram = null;
            DocsPAWA.DocsPaWR.Trasmissione   trasm     = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = "0";
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo una nuova ricerca
                    listaTram = searchTrasm(objScrollElementsList, page);
                    if (listaTram != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaTram);
                        trasm = (DocsPaWR.Trasmissione)objScrollElementsList.objList[0];
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = (objScrollElementsList.pageSize - 1).ToString();
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo una nuova ricerca
                    listaTram = searchTrasm(objScrollElementsList, page);
                    if (listaTram != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaTram);
                        trasm = (DocsPaWR.Trasmissione)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (trasm != null && trasm.infoDocumento != null && !string.IsNullOrEmpty(trasm.infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = trasm.infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (trasm != null && trasm.infoFascicolo != null && !string.IsNullOrEmpty(trasm.infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = trasm.infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
示例#12
0
        private string moveToDoListNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            DocsPAWA.DocsPaWR.Trasmissione[] dettTrasm = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;

                    //Effettuo una nuova ricerca
                    DocsPAWA.DocsPaWR.infoToDoList[] listInfoToDoList = null;
                    int totalTrasmNonViste = 0;
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST)
                    {
                        listInfoToDoList =
                            TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                          DocumentManager.getFiltroRicTrasm(page),
                                                          objScrollElementsList.selectedPage + 1,
                                                          objScrollElementsList.pageSize,
                                                          out objScrollElementsList.totalNumberOfElements,
                                                          out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("D", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);))
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST)
                    {
                        TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                      DocumentManager.getFiltroRicTrasm(page),
                                                      objScrollElementsList.selectedPage + 1,
                                                      objScrollElementsList.pageSize,
                                                      out objScrollElementsList.totalNumberOfElements,
                                                      out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("F", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);

                    //Il risultato della ricerca potrebbe essere vuoto in quanto le trasmissioni che si stanno scorrendo vengono contestualmente rimosse dalla toDoList
                    if (listInfoToDoList != null && listInfoToDoList.Length != 0)
                    {
                        objScrollElementsList.objList = new ArrayList(listInfoToDoList);

                        //Recupero il dettaglio della trasmissione
                        dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                        if (dettTrasm != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                            SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;
                        }
                    }
                    else
                    {
                        if (SiteNavigation.CallContextStack.CallerContext != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.objScrollElementsList = null;
                        }
                        objScrollElementsList.objList = null;
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    int totalTrasmNonViste = 0;
                    //Effettuo una nuova ricerca
                    DocsPAWA.DocsPaWR.infoToDoList[] listInfoToDoList = null;
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST)
                    {
                        listInfoToDoList =
                            TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                          DocumentManager.getFiltroRicTrasm(page),
                                                          objScrollElementsList.selectedPage + 1,
                                                          objScrollElementsList.pageSize,
                                                          out objScrollElementsList.totalNumberOfElements,
                                                          out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("D", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);
                    if (objScrollElementsList.searchContext == ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST)
                    {
                        listInfoToDoList =
                            TrasmManager.getMyNewTodolist(getListaRegistri(UserManager.getRuolo().registri),
                                                          DocumentManager.getFiltroRicTrasm(page),
                                                          objScrollElementsList.selectedPage + 1,
                                                          objScrollElementsList.pageSize,
                                                          out objScrollElementsList.totalNumberOfElements,
                                                          out totalTrasmNonViste);
                    }
                    //listInfoToDoList = TrasmManager.getMyTodolist("F", getListaRegistri(UserManager.getRuolo().registri), DocumentManager.getFiltroRicTrasm(page), objScrollElementsList.selectedPage + 1, objScrollElementsList.pageSize, out objScrollElementsList.totalNumberOfElements);

                    //Il risultato della ricerca potrebbe essere vuoto in quanto le trasmissioni che si stanno scorrendo vengono contestualmente rimosse dalla toDoList
                    if (listInfoToDoList != null && listInfoToDoList.Length != 0)
                    {
                        objScrollElementsList.objList = new ArrayList(listInfoToDoList);

                        //Recupero il dettaglio della trasmissione
                        dettTrasm = TrasmManager.trasmGetDettaglioTrasmissione(UserManager.getUtente(page), UserManager.getRuolo(page), (DocsPAWA.DocsPaWR.infoToDoList)objScrollElementsList.objList[objScrollElementsList.selectedElement]);
                        if (dettTrasm != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["idTrasm"] = dettTrasm[0].systemId;
                            SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;
                        }
                    }
                    else
                    {
                        if (SiteNavigation.CallContextStack.CallerContext != null)
                        {
                            SiteNavigation.CallContextStack.CallerContext.objScrollElementsList = null;
                        }
                        objScrollElementsList.objList = null;
                    }
                }
            }

            if (objScrollElementsList.objList != null)
            {
                //Recupero l'infoDocumento o l'infoFascicolo dal dettaglio della trasmissione
                if (dettTrasm != null && dettTrasm[0].infoDocumento != null && !string.IsNullOrEmpty(dettTrasm[0].infoDocumento.idProfile))
                {
                    DocsPaWR.InfoDocumento doc = dettTrasm[0].infoDocumento;

                    if (doc != null)
                    {
                        script = ScrollManager.refreshPage(doc, page);
                    }
                }

                if (dettTrasm != null && dettTrasm[0].infoFascicolo != null && !string.IsNullOrEmpty(dettTrasm[0].infoFascicolo.idFascicolo))
                {
                    DocsPaWR.InfoFascicolo fasc = dettTrasm[0].infoFascicolo;

                    if (fasc != null)
                    {
                        script = ScrollManager.refreshPage(fasc, page);
                    }
                }
            }

            return(script);
        }
示例#13
0
        protected void btn_Scroll_Click(object sender, ImageClickEventArgs e)
        {
            objScrollElementsList = ScrollManager.getFromContextObjScrollElementsList();

            if (Session["dictionaryCorrispondente"] != null)
                Session.Remove("dictionaryCorrispondente");

            if (objScrollElementsList != null)
            {
                //Controllo che tipo di scorrimento va fatto "NEXT" o "PREV"
                ImageButton imgBtn = (ImageButton)sender;
                ScrollManager.ScrollDirection scrollDirection = ScrollManager.ScrollDirection.NO_DIRECTION;
                if (imgBtn.ID == "btn_ScrollNext")
                    scrollDirection = ScrollManager.ScrollDirection.NEXT;
                if (imgBtn.ID == "btn_ScrollPrev")
                    scrollDirection = ScrollManager.ScrollDirection.PREV;

                string script = string.Empty;
                ScrollManager scrollManager;

            /*    //Work-Around per capire se il next o prev cambia categoria

                string IdDoc = "";
                string IdFasc = "";
                string whatisit = "";
                ArrayList list = new ArrayList();

                switch (scrollDirection)
                {
                    case ScrollManager.ScrollDirection.NEXT:

                        list = objScrollElementsList.objList;
                        if (objScrollElementsList.selectedElement.Equals(7))
                        {
                            IdDoc =
                                ((DocsPAWA.DocsPaWR.infoToDoList) (list[0])).
                                    sysIdDoc;
                            IdFasc = ((DocsPAWA.DocsPaWR.infoToDoList)(list[0])).sysIdFasc;
                        }
                        else
                        {
                            IdDoc =
                                ((DocsPAWA.DocsPaWR.infoToDoList)(list[objScrollElementsList.selectedElement + 1])).
                                    sysIdDoc;
                            IdFasc = ((DocsPAWA.DocsPaWR.infoToDoList)(list[objScrollElementsList.selectedElement +1])).sysIdFasc;
                        }

                        if (string.IsNullOrEmpty(IdDoc))
                        {
                            whatisit = "F";
                            objScrollElementsList.searchContext =
                                ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST;
                        }
                        else if(string.IsNullOrEmpty(IdFasc))
                        {
                            whatisit = "D";
                            objScrollElementsList.searchContext =
                                ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST;
                        }
                        break;

                    case ScrollManager.ScrollDirection.PREV:

                        list = objScrollElementsList.objList;
                        if (objScrollElementsList.selectedElement.Equals(0))
                        {

                            IdDoc = ((DocsPAWA.DocsPaWR.infoToDoList) (list[7])).sysIdDoc;
                            IdFasc = ((DocsPAWA.DocsPaWR.infoToDoList) (list[7])).sysIdFasc;
                        }
                        else
                        {
                            IdDoc = ((DocsPAWA.DocsPaWR.infoToDoList)(list[objScrollElementsList.selectedElement-1])).sysIdDoc;
                            IdFasc = ((DocsPAWA.DocsPaWR.infoToDoList)(list[objScrollElementsList.selectedElement-1])).sysIdFasc;
                        }
                        if (string.IsNullOrEmpty(IdDoc))
                        {
                            whatisit = "F";
                            objScrollElementsList.searchContext =
                                ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST;
                        }
                        else if(string.IsNullOrEmpty(IdFasc))
                        {
                            whatisit = "D";
                            objScrollElementsList.searchContext =
                                ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST;
                        }
                        break;

                }
             */

                //Verifico che tipo di lista devo scorrere
                switch (objScrollElementsList.searchContext)
                {
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_DOCUMENTI:
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_DOC_IN_FASC:
                        scrollManager = new ScrollManagerDoc();
                        script = scrollManager.move(objScrollElementsList, this.Page, scrollDirection);
                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST:
                        scrollManager = new ScrollManagerTrasm();
                        script = scrollManager.move(objScrollElementsList, this.Page, scrollDirection);
                        break;
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC:
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST:
                        scrollManager = new ScrollManagerTrasm();
                        script = scrollManager.move(objScrollElementsList, this.Page, scrollDirection);
                        break;
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                        scrollManager = new ScrollManagerTrasm();
                        script = scrollManager.move(objScrollElementsList, this.Page, scrollDirection);
                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_FASCICOLI:
                        scrollManager = new ScrollManagerFasc();
                        script = scrollManager.move(objScrollElementsList, this.Page, scrollDirection);
                        break;
                }

                //Registro lo script per chiamare la pagina del nuovo elemento
                if(!string.IsNullOrEmpty(script))
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "pageDocument", script, true);

            }
        }
示例#14
0
        public override string move(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            //N.B. I casi di primo e ultimo elemento non vengono gestiti perchè
            //il pulsante next è disabilitato in caso ci si trova all'ultimo elemento ed
            //il pulsante prev è disabilitato in caso ci si trova al primo elemento

            //Mi muovo in avanti
            if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
            {
                //Non siamo a fine pagina, vanno aggiornati i dati
                if (objScrollElementsList.selectedElement + 1 != objScrollElementsList.pageSize)
                {
                    switch (objScrollElementsList.searchContext)
                    {
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST:
                        return(this.moveToDoListInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST:
                        return(this.moveToDoListInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC:
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                        return(this.moveTrasmInPage(objScrollElementsList, page, scrollDirection));

                        break;
                    }
                }

                //Siamo a fine pagina, va rifatta la ricerca e aggiornati i dati
                if (objScrollElementsList.selectedElement + 1 == objScrollElementsList.pageSize)
                {
                    switch (objScrollElementsList.searchContext)
                    {
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST:
                        return(this.moveToDoListNotInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST:
                        return(this.moveToDoListNotInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC:
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                        return(this.moveTrasmNotInPage(objScrollElementsList, page, scrollDirection));

                        break;
                    }
                }
            }

            //Mi muovo indietro
            if (scrollDirection == ScrollManager.ScrollDirection.PREV)
            {
                //Non siamo a inizio pagina, vanno aggiornati i dati
                if (objScrollElementsList.selectedElement != 0)
                {
                    switch (objScrollElementsList.searchContext)
                    {
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST:
                        return(this.moveToDoListInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST:
                        return(this.moveToDoListInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC:
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                        return(this.moveTrasmInPage(objScrollElementsList, page, scrollDirection));

                        break;
                    }
                }

                //Siamo a inizio pagina, va rifatta la ricerca e aggiornati i dati
                if (objScrollElementsList.selectedElement == 0)
                {
                    switch (objScrollElementsList.searchContext)
                    {
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST:
                        return(this.moveToDoListNotInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST:
                        return(this.moveToDoListNotInPage(objScrollElementsList, page, scrollDirection));

                        break;

                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC:
                    case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                        return(this.moveTrasmNotInPage(objScrollElementsList, page, scrollDirection));

                        break;
                    }
                }
            }

            return(string.Empty);
        }
示例#15
0
        private string moveDocNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            //Recupero le informazioni per effettuare una nuova ricerca
            DocsPAWA.DocsPaWR.SearchObject[] listaDoc = null;
            DocsPaWR.InfoDocumento           doc      = null;

            //Recupero i filtri di ricerca ed effettuo la nuova ricerca
            if (SiteNavigation.CallContextStack.CallerContext != null)
            {
                //Verifico in che direzione muovermi
                if (scrollDirection == ScrollManager.ScrollDirection.NEXT)
                {
                    objScrollElementsList.selectedElement = 0;
                    objScrollElementsList.selectedPage++;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = "0";
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo la nuova ricerca
                    listaDoc = searchDoc(objScrollElementsList, page);
                    if (listaDoc != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaDoc);
                        string tipo = objScrollElementsList.objList[0].GetType().Name;

                        if (tipo.Equals("SearchObject"))
                        {
                            DocsPaWR.SearchObject Newdoc = (DocsPaWR.SearchObject)objScrollElementsList.objList[0];
                            doc = DocumentManager.GetInfoDocumento(Newdoc.SearchObjectID, Newdoc.SearchObjectID, page);
                        }
                        else
                        {
                            doc = (DocsPaWR.InfoDocumento)objScrollElementsList.objList[0];
                        }
                    }
                }

                if (scrollDirection == ScrollManager.ScrollDirection.PREV)
                {
                    objScrollElementsList.selectedElement = objScrollElementsList.pageSize - 1;
                    objScrollElementsList.selectedPage--;
                    SiteNavigation.CallContextStack.CallerContext.QueryStringParameters["docIndex"] = (objScrollElementsList.pageSize - 1).ToString();
                    SiteNavigation.CallContextStack.CallerContext.PageNumber = objScrollElementsList.selectedPage + 1;

                    //Effettuo la nuova ricerca
                    listaDoc = searchDoc(objScrollElementsList, page);
                    if (listaDoc != null)
                    {
                        objScrollElementsList.objList = new ArrayList(listaDoc);
                        string tipo = objScrollElementsList.objList[0].GetType().Name;

                        if (tipo.Equals("SearchObject"))
                        {
                            DocsPaWR.SearchObject Newdoc = (DocsPaWR.SearchObject)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                            doc = DocumentManager.GetInfoDocumento(Newdoc.SearchObjectID, Newdoc.SearchObjectID, page);
                        }
                        else
                        {
                            doc = (DocsPaWR.InfoDocumento)objScrollElementsList.objList[objScrollElementsList.pageSize - 1];
                        }
                    }
                }
            }

            if (doc != null)
            {
                script = ScrollManager.refreshPage(doc, page);
            }

            return(script);
        }
示例#16
0
        //public static void setInSessionObjScrollElementsList(ObjScrollElementsList objScrollElementsList)
        //{
        //    System.Web.HttpContext.Current.Session.Remove("ObjScrollElementsList");
        //    System.Web.HttpContext.Current.Session.Add("ObjScrollElementsList", objScrollElementsList);
        //}

        //public static void setInSessionNewObjScrollElementsList(int totalNumberOfElements, int totalNumberOfPage, int pageSize, int selectedElement, int selectedPage, ArrayList objList, ObjScrollElementsList.EmunSearchContext searchContext)
        //{
        //    ObjScrollElementsList objScrollElementsList = new ObjScrollElementsList();
        //    objScrollElementsList.totalNumberOfElements = totalNumberOfElements;
        //    objScrollElementsList.totalNumberOfPage = totalNumberOfPage;
        //    objScrollElementsList.pageSize = pageSize;
        //    objScrollElementsList.selectedElement = selectedElement;
        //    objScrollElementsList.selectedPage = selectedPage;
        //    objScrollElementsList.objList = objList;
        //    objScrollElementsList.searchContext = searchContext;

        //    System.Web.HttpContext.Current.Session.Add("ObjScrollElementsList", objScrollElementsList);
        //}

        //public static ObjScrollElementsList getFromSessionObjScrollElementsList()
        //{
        //    if (System.Web.HttpContext.Current.Session["ObjScrollElementsList"] != null)
        //    {
        //        ObjScrollElementsList objScrollElementsList = (ObjScrollElementsList)System.Web.HttpContext.Current.Session["ObjScrollElementsList"];
        //        return objScrollElementsList;
        //    }

        //    return null;
        //}

        //public static void clearSessionObjScrollElementsList()
        //{
        //    System.Web.HttpContext.Current.Session.Remove("ObjScrollElementsList");
        //}
        #endregion

        public virtual string move(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            return(string.Empty);
        }
示例#17
0
        private DocsPaWR.SearchObject[] searchDoc(ObjScrollElementsList objScrollElementsList, Page page)
        {
            DocsPAWA.DocsPaWR.InfoUtente        infoUtente  = UserManager.getInfoUtente(page);
            DocsPAWA.DocsPaWR.FiltroRicerca[][] listaFiltri = null;
            DocsPAWA.DocsPaWR.SearchObject[]    listaDoc    = null;
            SearchResultInfo[] idProfilesList;

            switch (objScrollElementsList.searchContext)
            {
            case ObjScrollElementsList.EmunSearchContext.RICERCA_DOCUMENTI:
                listaFiltri = (DocsPAWA.DocsPaWR.FiltroRicerca[][])SiteNavigation.CallContextStack.CallerContext.SessionState["ricDoc.listaFiltri"];

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


                // listaDoc = DocumentManager.getQueryInfoDocumentoPaging(infoUtente.idGruppo, infoUtente.idPeople, page, listaFiltri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, false, false, true, false, out idProfilesList);
                listaDoc = DocumentManager.getQueryInfoDocumentoPagingCustom(infoUtente, page, listaFiltri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, true, false, GridManager.IsRoleEnabledToUseGrids(), objScrollElementsList.pageSize, false, null, null, out idProfilesList);

                break;

            case ObjScrollElementsList.EmunSearchContext.RICERCA_DOC_IN_FASC:
                listaFiltri = ricercaDoc.FiltriRicercaDocumenti.CurrentFilterSessionStorage.GetCurrentFilter();

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

                DocsPaWR.Folder folder;

                // Se nel call context è salvato un fascicolo selezionato viene caricato il folder relativo altrimenti viene prelevato
                // dal call context il folder salvato dalla pagina di ricerca documenti in fascicolo
                if (SiteNavigation.CallContextStack.CallerContext.SessionState.ContainsKey("FascicoloSelezionato"))
                {
                    folder = FascicoliManager.getFolder(
                        page,
                        (DocsPaWR.Fascicolo)SiteNavigation.CallContextStack.CallerContext.SessionState["FascicoloSelezionato"]);
                }
                else
                {
                    folder = CallContextStack.CallerContext.ContextState["Folder"] as Folder;
                }

                FascicoliManager.SetProtoDocsGridPaging(page, objScrollElementsList.selectedPage);

                FascicolazioneClassificazione a = new FascicolazioneClassificazione();
                SearchResultInfo[]            idProfiles;
                if (folder != null)
                {
                    if (listaFiltri == null)
                    {
                        // listaDoc = FascicoliManager.getListaDocumentiPaging(page, folder, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, false, out idProfiles);
                        //listaDoc = FascicoliManager.getListaFascicoliPagingCustom(page, a, UserManager.getRegistroSelezionato(page), listaFiltri, false, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, objScrollElementsList.pageSize, false, out idProfilesList, null, GridManager.IsRoleEnabledToUseGrids(), false, null, null);
                        listaDoc = FascicoliManager.getListaDocumentiPagingCustom(page, folder, listaFiltri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, false, GridManager.IsRoleEnabledToUseGrids(), false, null, null, objScrollElementsList.pageSize, FiltriRicercaDocumenti.CurrentFilterSessionOrderFilter.GetCurrentFilter(), out idProfiles);
                    }
                    else
                    {
                        // listaDoc = FascicoliManager.getListaDocumentiPaging(page, folder, listaFiltri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, false, out idProfiles);
                        listaDoc = FascicoliManager.getListaDocumentiPagingCustom(page, folder, listaFiltri, objScrollElementsList.selectedPage + 1, out objScrollElementsList.totalNumberOfPage, out objScrollElementsList.totalNumberOfElements, false, GridManager.IsRoleEnabledToUseGrids(), false, null, null, objScrollElementsList.pageSize, FiltriRicercaDocumenti.CurrentFilterSessionOrderFilter.GetCurrentFilter(), out idProfiles);
                    }
                }
                break;
            }

            return(listaDoc);
        }
示例#18
0
        private void setLabelAndButton(ObjScrollElementsList objScrollElementsList)
        {
            //Calcolo l'elemento selezionato
            int selectedElement = (objScrollElementsList.selectedElement + 1) + (objScrollElementsList.pageSize * objScrollElementsList.selectedPage);

            //Imposto la label dello UserControl
            switch(objScrollElementsList.searchContext)
            {
                case ObjScrollElementsList.EmunSearchContext.RICERCA_DOCUMENTI:
                    lbl_ScrollElementsList.Text = "Doc. " + selectedElement + "/" + objScrollElementsList.totalNumberOfElements + " - Pag. " + (objScrollElementsList.selectedPage + 1);
                    break;

                case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC_TO_DO_LIST:
                case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_DOC :
                    lbl_ScrollElementsList.Text = "Trasm. Doc. " + selectedElement + "/" + objScrollElementsList.totalNumberOfElements + " - Pag. " + (objScrollElementsList.selectedPage + 1);
                    break;

                case ObjScrollElementsList.EmunSearchContext.RICERCA_DOC_IN_FASC:
                    lbl_ScrollElementsList.Text = "Doc. in Fasc. " + selectedElement + "/" + objScrollElementsList.totalNumberOfElements + " - Pag. " + (objScrollElementsList.selectedPage + 1);
                    break;
                case ObjScrollElementsList.EmunSearchContext.RICERCA_FASCICOLI:
                    lbl_ScrollElementsList.Text = "Fasc. " + selectedElement + "/" + objScrollElementsList.totalNumberOfElements + " - Pag. " + (objScrollElementsList.selectedPage + 1);
                    break;
                case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC_TO_DO_LIST:
                case ObjScrollElementsList.EmunSearchContext.RICERCA_TRASM_FASC:
                    lbl_ScrollElementsList.Text = "Trasm. Fasc. " + selectedElement + "/" + objScrollElementsList.totalNumberOfElements + " - Pag. " + (objScrollElementsList.selectedPage + 1);
                    break;
            }

            //Il risultato della ricerca è costituito da un solo elemento, entrambi i bottoni disabilitati
            if (objScrollElementsList.totalNumberOfElements == 1)
            {
                btn_ScrollPrev.Enabled = false;
                btn_ScrollNext.Enabled = false;
                return;
            }

            //Selezionato il primo elemento
            if (objScrollElementsList.selectedElement == 0 && objScrollElementsList.selectedPage == 0)
            {
                btn_ScrollPrev.Enabled = false;
                btn_ScrollNext.Enabled = true;
                return;
            }

            //Selezionato l'ultimo elemento
            if (selectedElement == objScrollElementsList.totalNumberOfElements)
            {
                btn_ScrollNext.Enabled = false;
                btn_ScrollPrev.Enabled = true;
                return;
            }

            //Selezionato un elemento non iniziale o finale
            btn_ScrollPrev.Enabled = true;
            btn_ScrollNext.Enabled = true;

            //aggiunto per risolvere il problema in cui se da un documento di una ricerca si entra nel dettaglio del suo allegato,
            // premendo il tasto back si ritorna al documento ma le freccette riportano doc 0 di n permettendo il click sul tasto indietro
            if (selectedElement == 0)
                btn_ScrollPrev.Enabled = false;

            return;
        }