コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string redirectURL = string.Empty;

            try
            {
                redirectURL = GenericFunctions.GetRedirectURL(this.Request);
                redirectURL = GenericFunctions.AppendQueryParameter(redirectURL, this.Request);
                GenericFunctions.SetConstantsResponse(this.Request, this.Response, redirectURL, ConstantStrings.ConstantObjectFormatter, ConstantStrings.ConstantFileFormatter);
            }
            catch (Exception exception)
            {
                string response = Logger.LogError(exception, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, UIConstantStrings.LogTableName);
                Response.Write(GenericFunctions.SetErrorResponse(ConstantStrings.TRUE, response));
            }
        }
コード例 #2
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));
     }
 }