Esempio n. 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);
        }
Esempio n. 2
0
        private string moveTrasmInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            SAAdminTool.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 = (SAAdminTool.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 = (SAAdminTool.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);
        }
Esempio n. 3
0
        private string moveToDoListInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            SAAdminTool.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), (SAAdminTool.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), (SAAdminTool.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);
        }
Esempio n. 4
0
        private string moveFascNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            //Recupero le informazioni per effettuare una nuova ricerca
            SAAdminTool.DocsPaWR.SearchObject[] listaFasc = null;
            SAAdminTool.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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
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
        }
Esempio n. 7
0
        private string moveDocNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            //Recupero le informazioni per effettuare una nuova ricerca
            SAAdminTool.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);
        }
Esempio n. 8
0
        private string moveTrasmNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            SAAdminTool.DocsPaWR.Trasmissione[] listaTram = null;
            SAAdminTool.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);
        }
Esempio n. 9
0
        private string moveToDoListNotInPage(ObjScrollElementsList objScrollElementsList, Page page, ScrollManager.ScrollDirection scrollDirection)
        {
            string script = string.Empty;

            SAAdminTool.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
                    SAAdminTool.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), (SAAdminTool.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
                    SAAdminTool.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), (SAAdminTool.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);
        }
Esempio n. 10
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 =
                 *                  ((SAAdminTool.DocsPaWR.infoToDoList) (list[0])).
                 *                      sysIdDoc;
                 *              IdFasc = ((SAAdminTool.DocsPaWR.infoToDoList)(list[0])).sysIdFasc;
                 *          }
                 *          else
                 *          {
                 *              IdDoc =
                 *                  ((SAAdminTool.DocsPaWR.infoToDoList)(list[objScrollElementsList.selectedElement + 1])).
                 *                      sysIdDoc;
                 *              IdFasc = ((SAAdminTool.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 = ((SAAdminTool.DocsPaWR.infoToDoList) (list[7])).sysIdDoc;
                 *              IdFasc = ((SAAdminTool.DocsPaWR.infoToDoList) (list[7])).sysIdFasc;
                 *          }
                 *          else
                 *          {
                 *              IdDoc = ((SAAdminTool.DocsPaWR.infoToDoList)(list[objScrollElementsList.selectedElement-1])).sysIdDoc;
                 *              IdFasc = ((SAAdminTool.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);
                }
            }
        }