/// <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(); } } }
/// <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(); } }
/// <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); }
/// <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); } }
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); }
/// <summary> /// /// </summary> private void RefreshSearchPagingCallerContext() { SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext; if (currentContext != null) { currentContext.PageNumber = 1; } }
/// <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; } }
/// <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"); }
/// <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; } }
/// <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(); } }
private void SetCurrentDocumentIndexOnContext(int docIndex) { SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext; if (currentContext != null) { currentContext.QueryStringParameters["docIndex"] = docIndex.ToString(); } }
private void SetCurrentPageOnContext(int currentPage) { SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext; if (currentContext != null) { currentContext.PageNumber = currentPage; } }
/// <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); } }
/// <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); } }
/// <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; } }
/// <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(); } }
/// <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(); } }
/// <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; } }
/// <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(); } }
/// <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(); } }
/// <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(); } }
private int GetCurrentPageOnContext() { SiteNavigation.CallContext currentContext = SiteNavigation.CallContextStack.CurrentContext; if (currentContext != null) { return(currentContext.PageNumber); } else { return(1); } }
/// <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); }
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); }
/// <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>"); } }
/// <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(); } }
/// <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"); }
/// <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; } }
/// <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); } } }
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(); } }