Exemplo n.º 1
0
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         string redirectURL = GenericFunctions.GetRedirectURL(this.Request);
         GenericFunctions.SetConstantsResponse(this.Request, this.Response, redirectURL, ConstantStrings.ConstantObjectForProvision, ConstantStrings.ConstantFileForProvision);
     }
     catch (Exception exception)
     {
         string response = Logger.LogError(exception, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, UIConstantStrings.LogTableName);
         Response.Write(GenericFunctions.SetErrorResponse(ConstantStrings.TRUE, response));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Method called on page load.
 /// </summary>
 /// <param name="sender">The source of the event</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         string redirectURL = GenericFunctions.GetRedirectURL(this.Request);
         UIConstantStrings.SendToOneDriveQueryString = Request.Url.Query; // Stores the query string in a variable and used the variable for redirection as a fix for code analyzer warning.
         if (!string.IsNullOrWhiteSpace(Request.Url.Query))
         {
             redirectURL = string.Concat(redirectURL, UIConstantStrings.SendToOneDriveQueryString);
         }
         GenericFunctions.SetConstantsResponse(this.Request, this.Response, redirectURL, ConstantStrings.ConstantObjectForBriefcase, ConstantStrings.ConstantFileForBriefcase);
     }
     catch (Exception exception)
     {
         string response = Logger.LogError(exception, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, UIConstantStrings.LogTableName);
         Response.Write(GenericFunctions.SetErrorResponse(ConstantStrings.TRUE, response));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         string redirectURL = GenericFunctions.GetRedirectURL(this.Request);
         redirectURL = GenericFunctions.AppendQueryParameter(redirectURL, this.Request);
         GenericFunctions.SetConstantsResponse(this.Request, this.Response, redirectURL, null, null);
         /* Code to hide the Provision Matter icon if user is not having access Provision Matter App */
         // Get the refresh token which is saved in the cookies
         string refreshToken = null != this.Request.Cookies[UIConstantStrings.refreshToken] ? this.Request.Cookies[UIConstantStrings.refreshToken].Value : string.Empty;
         // Check whether the user is having access to Provision Matter App
         UIConstantStrings.ProvisionMatterAccess = UIUtility.GetUserAccess(refreshToken, new Uri(ConstantStrings.ProvisionMatterAppURL), this.Request);
         if (!UIConstantStrings.ProvisionMatterAccess)
         {
             CreateMatterLink.Visible = false;
         }
     }
     catch (Exception exception)
     {
         string response = Logger.LogError(exception, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, UIConstantStrings.LogTableName);
         Response.Write(GenericFunctions.SetErrorResponse(ConstantStrings.TRUE, response));
     }
 }