Example #1
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext()
        {
            bool forceNewContext;

            bool.TryParse(Request.QueryString["forceNewContext"], out forceNewContext);
            SiteNavigation.CallContext context = SiteNavigation.CallContextStack.CurrentContext;

            if (!forceNewContext && context != null &&
                context.ContextName == SiteNavigation.NavigationKeys.FASCICOLO &&
                context.IsBack)
            {
                if (context.ContextState["systemId"] != null)
                {
                    string             systemId  = context.ContextState["systemId"].ToString();
                    DocsPaWR.Fascicolo fascicolo = FascicoliManager.getFascicolo(this, systemId);
                    FascicoliManager.setFascicoloSelezionato(fascicolo);
                }
            }
            else
            {
                string url = DocsPAWA.Utils.getHttpFullPath() + "/fascicolo/gestioneFasc.aspx";

                context = new SiteNavigation.CallContext(SiteNavigation.NavigationKeys.FASCICOLO, url);
                context.ContextFrameName = "top.principale";
                context.ContextDisposed += new EventHandler(context_ContextDisposed);

                if (SiteNavigation.CallContextStack.SetCurrentContext(context, forceNewContext))
                {
                    SiteNavigation.NavigationContext.RefreshNavigation();
                }
            }
        }
Example #2
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext()
        {
            string url = DocsPAWA.Utils.getHttpFullPath() + "/ricercaFascicoli/gestioneRicFasc.aspx";

            string contextName = string.Empty;

            string ricAdl = this.Request.QueryString["ricADL"];

            if (!string.IsNullOrEmpty(ricAdl))
            {
                contextName = SiteNavigation.NavigationKeys.RICERCA_FASCICOLI_ADL;
                url        += "?ricADL=" + ricAdl;
            }
            else
            {
                contextName = SiteNavigation.NavigationKeys.RICERCA_FASCICOLI;
            }

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(contextName, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }
Example #3
0
        /// <summary>
        /// CheckIn di un documento
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public static ValidationResultInfo CheckInDocument(byte[] content)
        {
            ValidationResultInfo retValue = null;

            if (CheckOutContext.Current != null && CheckOutContext.Current.Status != null)
            {
                CheckOutStatus checkOutStatus  = CheckOutContext.Current.Status;
                string         checkInComments = CheckOutContext.Current.CheckInComments;

                retValue = _webServices.CheckInDocument(checkOutStatus, GetInfoUtente(), content, checkInComments);

                if (retValue.Value)
                {
                    CheckOutContext.Current = null;

                    SiteNavigation.CallContext context = SiteNavigation.CallContextStack.CurrentContext;

                    if (context.ContextState["schedaAllegatoSelezionato"] != null)
                    {
                        context.ContextState.Remove("schedaAllegatoSelezionato");
                    }
                }
            }
            else
            {
                retValue = new ValidationResultInfo();
            }

            return(retValue);
        }
Example #4
0
        /// <summary>
        /// Reperimento delle informazioni di stato checkout del documento
        /// </summary>
        /// <returns></returns>
        public static CheckOutStatus GetCheckOutDocumentStatus()
        {
            DocsPaWR.SchedaDocumento schedaDocumento = null;

            if (IsEnabledProfilazioneAllegati && IsSelectedTabAllegati())
            {
                // Tab "allegati" correntemente selezionato,
                // reperimento dello stato checkout dell'allegato selezionato
                DocsPaWR.FileRequest fileRequest = FileManager.getSelectedFile();

                if (fileRequest != null && fileRequest.GetType() == typeof(DocsPaWR.Allegato))
                {
                    SiteNavigation.CallContext context = SiteNavigation.CallContextStack.CurrentContext;

                    schedaDocumento = context.ContextState["schedaAllegatoSelezionato"] as DocsPaWR.SchedaDocumento;
                }
            }
            else
            {
                // Qualsiasi altro tab differente dal tab "allegati",
                // reperimento dello stato checkout del documento principale
                schedaDocumento = CheckInOutServices.CurrentSchedaDocumento;
            }

            if (schedaDocumento != null)
            {
                return(schedaDocumento.checkOutStatus);
            }
            else
            {
                return(null);
            }
        }
Example #5
0
        private void CaricaTab(string nomeTab)
        {
            string nomeButtTab = "btn_" + nomeTab;

            ImageButton ButtImg = (ImageButton)Page.FindControl(nomeButtTab);

            bool found = false;

            btn_Click(nomeTab, ButtImg);

            IframeTabs.NavigateTo = "RicDoc" + nomeTab + ".aspx";

            if (Request.QueryString["ricADL"] != string.Empty && Request.QueryString["ricADL"] != null)
            {
                IframeTabs.NavigateTo += "?ricADL=" + Request.QueryString["ricADL"].ToString();
                found = true;
            }

            if (Request.QueryString["gridper"] != string.Empty && Request.QueryString["gridper"] != null)
            {
                if (found)
                {
                    IframeTabs.NavigateTo += "&gridper=" + Request.QueryString["gridper"].ToString();
                }
                else
                {
                    IframeTabs.NavigateTo += "?gridper=" + Request.QueryString["gridper"].ToString();
                }
                found = true;
            }

            if (Request.QueryString["numRes"] != string.Empty && Request.QueryString["numRes"] != null)
            {
                if (found)
                {
                    IframeTabs.NavigateTo += "&numRes=" + Request.QueryString["numRes"].ToString();
                }
                else
                {
                    IframeTabs.NavigateTo += "?numRes=" + Request.QueryString["numRes"].ToString();
                }
            }

            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if ((currentContext == null || !currentContext.IsBack) && !found)
            {
                if (Request.QueryString["ricADL"] != string.Empty && Request.QueryString["ricADL"] != null)
                {
                    initResultSearchWaiting("../waitingpage.htm");
                }
                else
                {
                    initResultSearch("NewTabSearchResult.aspx?tabRes=estesa");
                }
            }

            this.RefreshCallerContext(nomeTab);
        }
Example #6
0
 /// <summary>
 ///
 /// </summary>
 private void RefreshSearchPagingCallerContext()
 {
     SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;
     if (currentContext != null)
     {
         currentContext.PageNumber = 1;
     }
 }
Example #7
0
 /// <summary>
 /// Impostazione contesto chiamante
 /// </summary>
 /// <param name="tabName"></param>
 private void RefreshCallerContext(string tabName)
 {
     SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;
     if (currentContext != null)
     {
         currentContext.QueryStringParameters["tab"] = tabName;
     }
 }
Example #8
0
        /// <summary>
        /// Verifica, in base al contesto corrente, se il tab corrente della scheda documento è quella degli allegati
        /// </summary>
        /// <returns></returns>
        protected static bool IsSelectedTabAllegati()
        {
            SiteNavigation.CallContext context = SiteNavigation.CallContextStack.CurrentContext;

            string currentTab = context.QueryStringParameters["tab"] as string;

            return(!string.IsNullOrEmpty(currentTab) && currentTab.ToLower() == "allegati");
        }
Example #9
0
 /// <summary>
 /// Aggiornamento chiave del tab selezionato nel contesto corrente
 /// </summary>
 /// <param name="tabName"></param>
 private void RefreshCurrentContextTabName(string tabName)
 {
     SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;
     if (currentContext.ContextName == SiteNavigation.NavigationKeys.RICERCA_TRASMISSIONI)
     {
         currentContext.QueryStringParameters["tab"] = tabName;
     }
 }
Example #10
0
 /// <summary>
 /// Impostazione dell'indice del fascicolo
 /// selezionato nel contesto di ricerca
 /// </summary>
 /// <param name="fascIndex"></param>
 private void SetCurrentFascIndexOnContext(int fascIndex)
 {
     SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;
     if (currentContext.ContextName == SiteNavigation.NavigationKeys.GESTIONE_SCARTO)
     {
         currentContext.QueryStringParameters["fascIndex"] = fascIndex.ToString();
     }
 }
Example #11
0
        private void SetCurrentDocumentIndexOnContext(int docIndex)
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null)
            {
                currentContext.QueryStringParameters["docIndex"] = docIndex.ToString();
            }
        }
Example #12
0
        private void SetCurrentPageOnContext(int currentPage)
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null)
            {
                currentContext.PageNumber = currentPage;
            }
        }
Example #13
0
        /// <summary>
        /// Reperimento numero pagina corrente dal contesto di ricerca
        /// </summary>
        /// <returns></returns>
        private void RestoreSelectedPage()
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null && currentContext.PageNumber > 0)
            {
                this.DataGrid1.CurrentPageIndex = (currentContext.PageNumber - 1);
            }
        }
Example #14
0
        /// <summary>
        /// Impostazione numero pagina corrente del contesto di ricerca
        /// </summary>
        private void SetSelectedPage()
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null)
            {
                currentContext.PageNumber = (this.DataGrid1.CurrentPageIndex + 1);
            }
        }
Example #15
0
        /// <summary>
        /// Impostazione dell'indice del fascicolo
        /// selezionato nel contesto di ricerca
        /// </summary>
        private void SetSelectedDocument()
        {
            if (!string.IsNullOrEmpty(this.IdProfile))
            {
                SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

                currentContext.QueryStringParameters["docIndex"] = this.IdProfile;
            }
        }
Example #16
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext()
        {
            string url = DocsPAWA.Utils.getHttpFullPath() + "/trasmissione/gestioneTrasm.aspx";

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(SiteNavigation.NavigationKeys.TRASMISSIONE, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }
Example #17
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext(string queryString)
        {
            string url = DocsPAWA.Utils.getHttpFullPath() + "/ricercaTrasm/gestioneRicTrasm.aspx?" + queryString;

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(SiteNavigation.NavigationKeys.RICERCA_TRASMISSIONI, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }
Example #18
0
        /// <summary>
        /// Impostazione filtri correnti nella sessione del contesto corrente di ricerca
        /// </summary>
        /// <param name="filters"></param>
        private void SetCurrentFiltersOnContext(DocsPAWA.DocsPaWR.FiltroRicerca[][] filters)
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null)
            {
                // Impostazione, nell'oggetto CallContext corrente,
                // della lista dei filtri di ricerca
                currentContext.SessionState[SchedaRicerca.SESSION_KEY] = Session[SchedaRicerca.SESSION_KEY];
                currentContext.SessionState["ricDoc.listaFiltri"]      = filters;
            }
        }
Example #19
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext()
        {
            string url = DocsPAWA.Utils.getHttpFullPath() + "/ProspettiRiepilogativi/Frontend/gestioneProspetti.aspx";

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(SiteNavigation.NavigationKeys.PROSPETTI_RIEPILOGATIVI, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }
Example #20
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext()
        {
            string url = DocsPAWA.Utils.getHttpFullPath() + "/Archivio/GestArchivio.aspx";

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(SiteNavigation.NavigationKeys.GESTIONE_ARCHIVIO, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }
Example #21
0
        /// <summary>
        /// Impostazione contesto corrente
        /// </summary>
        private void SetContext()
        {
            string url = DocsPAWA.Utils.getHttpFullPath() + "/gestione/report/gestioneReport.aspx";

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(SiteNavigation.NavigationKeys.GESTIONE_STAMPE_RAPPORTI, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }
Example #22
0
        private int GetCurrentPageOnContext()
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null)
            {
                return(currentContext.PageNumber);
            }
            else
            {
                return(1);
            }
        }
Example #23
0
        /// <summary>
        /// Reperimento numero pagina selezionata nel contesto corrente
        /// </summary>
        /// <returns></returns>
        protected int GetCurrentContextPage()
        {
            int currentPage = 1;

            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null &&
                currentContext.ContextName == SiteNavigation.NavigationKeys.GESTIONE_SCARTO)
            {
                // Ripristino pagina precedentemente visualizzata
                currentPage = currentContext.PageNumber;
            }

            return(currentPage);
        }
Example #24
0
        private int GetDocFascIndexFromQueryString()
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;
            int docFascIndex = -1;

            if (currentContext != null)
            {
                try
                {
                    docFascIndex = Int32.Parse(currentContext.QueryStringParameters["docFascIndex"].ToString());
                }
                catch {}
            }
            return(docFascIndex);
        }
Example #25
0
        /// <summary>
        /// Azione di ricerca da "back"
        /// </summary>
        private void PerformBackSearch()
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext.IsBack)
            {
                string url   = string.Empty;
                bool   found = false;
                if (this.Request.QueryString["tab"].ToLower() == "grigia")
                {
                    url = "tabRisultatiRicDocGrigia.aspx";
                }
                else
                {
                    url   = "NewTabSearchResult.aspx?tabRes=" + this.Request.QueryString["tab"].ToString();
                    found = true;
                }

                string docIndex = this.Request.QueryString["docIndex"];
                string ricAdl   = this.Request.QueryString["ricADL"];

                if (!string.IsNullOrEmpty(docIndex))
                {
                    if (found)
                    {
                        url += "&docIndex=" + docIndex;
                    }
                    else
                    {
                        url += "?docIndex=" + docIndex;
                    }
                }

                if (!string.IsNullOrEmpty(ricAdl))
                {
                    if (url.IndexOf('?') != -1)
                    {
                        url += "&ricADL=" + ricAdl;
                    }
                    if (url.IndexOf('?') == -1)
                    {
                        url += "?ricADL=" + ricAdl;
                    }
                }

                Response.Write("<script>top.principale.iFrame_dx.document.location = '" + url + "';</script>");
            }
        }
Example #26
0
        /// <summary>
        /// Aggiornamento contesto chiamante
        /// </summary>
        /// <param name="currentPage"></param>
        /// <param name="docIndex"></param>
        private void RefreshCallerContext(int currentPage, int docIndex)
        {
            SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;

            if (currentContext != null && currentContext.ContextName == SiteNavigation.NavigationKeys.FASCICOLO)
            {
                currentContext.QueryStringParameters["tab"]  = "documenti";
                currentContext.QueryStringParameters["back"] = "Y";
                this.SetDocumentIndexOnContext(docIndex);

                currentContext.PageNumber = currentPage;

                // Nello stato di sessione del contesto viene memorizzato il fascicolo correntemente selezionato
                currentContext.SessionState["FascicoloSelezionato"] = FascicoliManager.getFascicoloSelezionato();
            }
        }
Example #27
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="docIndex"></param>
 private void SetDocumentIndexOnContext(int docIndex)
 {
     logger.Debug("  tabfasclistadoc.aspx_pg.SetDocumentIndexOnContext");
     SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext;
     if (currentContext != null && currentContext.ContextName == SiteNavigation.NavigationKeys.FASCICOLO)
     {
         if (docIndex == -1)
         {
             currentContext.QueryStringParameters.Remove("docIndex");
         }
         else
         {
             currentContext.QueryStringParameters["docIndex"] = docIndex.ToString();
         }
     }
     logger.Debug("  tabfasclistadoc.aspx_pg.SetDocumentIndexOnContext_fine");
 }
Example #28
0
        /// <summary>
        /// Aggiornamento dello statto di checkout della scheda documento correntemente visualizzata

        /// </summary>
        /// <remarks>
        /// Qualora sia attivata la gestione degli allegati profilati, la scheda documento sarà relativa
        /// all'allegato correntemente selezionato da tab allegati
        /// </remarks>
        public static void RefreshCheckOutStatus()
        {
            SAAdminTool.DocsPaWR.SchedaDocumento schedaDocumento = null;

            //if (IsEnabledProfilazioneAllegati && IsSelectedTabAllegati())
            if (IsSelectedTabAllegati())
            {
                // Tab "allegati" correntemente selezionato,
                // reperimento dello stato checkout dell'allegato selezionato.
                // Solo se attiva la profilazione allegati.
                DocsPaWR.FileRequest fileRequest = FileManager.getSelectedFile();

                if (fileRequest != null && fileRequest.GetType() == typeof(DocsPaWR.Allegato))
                {
                    SiteNavigation.CallContext context = SiteNavigation.CallContextStack.CurrentContext;

                    schedaDocumento = context.ContextState["schedaAllegatoSelezionato"] as DocsPaWR.SchedaDocumento;

                    if (schedaDocumento != null)
                    {
                        schedaDocumento = _webServices.DocumentoGetDettaglioDocumento(GetInfoUtente(), schedaDocumento.systemId, schedaDocumento.docNumber);

                        context.ContextState["schedaAllegatoSelezionato"] = schedaDocumento;
                    }
                }
            }
            else
            {
                schedaDocumento = DocumentManager.getDocumentoSelezionato();

                // Reperimento scheda documento per l'allegato
                schedaDocumento = _webServices.DocumentoGetDettaglioDocumento(GetInfoUtente(), schedaDocumento.systemId, schedaDocumento.docNumber);

                DocumentManager.setDocumentoSelezionato(schedaDocumento);
            }

            if (schedaDocumento != null)
            {
                //Inizializzazione del contesto di checkout del documento
                SAAdminTool.CheckInOut.CheckOutContext.Current = new SAAdminTool.CheckInOut.CheckOutContext(schedaDocumento);
            }
            else
            {
                SAAdminTool.CheckInOut.CheckOutContext.Current = null;
            }
        }
Example #29
0
        /// <summary>
        /// Azione di ripristino contesto di chiamata
        /// </summary>
        private void PerformActionBack()
        {
            SiteNavigation.CallContext callerContext = SiteNavigation.CallContextStack.RestoreCaller();
            Session.Remove("dictionaryCorrispondente");

            if (callerContext != null)
            {
                if (callerContext.ContextFrameName != string.Empty)
                {
                    this.RegisterClientScript("BackFrame", callerContext.ContextFrameName + ".document.location='" + callerContext.Url + "';");
                }
                else
                {
                    this.Response.Redirect(callerContext.Url);
                }
            }
        }
Example #30
0
        public void SetContext()
        {
            bool forceInsert;

            bool.TryParse(this.Request.QueryString["forceInsertContext"], out forceInsert);

            string url         = DocsPAWA.Utils.getHttpFullPath() + "/RicercaCampiComuni/GestioneCampiComuni.aspx";
            string contextName = SiteNavigation.NavigationKeys.RICERCA_CAMPI_COMUNI;

            SiteNavigation.CallContext newContext = new SiteNavigation.CallContext(contextName, url);
            newContext.ContextFrameName = "top.principale";

            if (SiteNavigation.CallContextStack.SetCurrentContext(newContext, forceInsert))
            {
                SiteNavigation.NavigationContext.RefreshNavigation();
            }
        }