Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Request.QueryString["data"] != null)
            {
                strEncryptedUrl = Request.QueryString["data"].ToString();
                strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
                string[] strSplitUrl = strDecryptedUrl.Split('&', '=');

                strErrorMessage = strSplitUrl[0];

                strHtml += "<div align=\"center\" style=\"margin-top:80px;margin-bottom:10px\">";
                strHtml += "<img src='../images/icon_error.gif' width='42' height='40' alt='' />";
                strHtml += "</div>";
                strHtml += "<table style=\"width:600px;background-color:#EFEFE2;color:#990000;margin-bottom:80px;text-align:center;font-size:16px;font-weight:bold\"  align=\"center\">";
                strHtml += "<tr>";
                strHtml += "<td>";
                strHtml += strErrorMessage;
                strHtml += "</td>";
                strHtml += "</tr>";
                strHtml += "</table>";
                lblDisplayError.Text = strHtml;
            }
            else
            {
                Response.Redirect("Default.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Redirect("Default.aspx");
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            strLinkID    = Request.QueryString["LinkCode"];
            strProfileID = Request.QueryString["ProfileCode"];

            if (!string.IsNullOrEmpty(strLinkID) && !string.IsNullOrEmpty(strProfileID))
            {
                strLinkID    = UTLUtilities.Decrypt(strLinkID);
                strProfileID = UTLUtilities.Decrypt(strProfileID);

                using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
                {
                    EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                    eocPropertyBean.Business_ActivationLinks_LinkID    = Convert.ToInt32(strLinkID);
                    eocPropertyBean.Business_UserProfile_ProfileID     = Convert.ToInt32(strProfileID);
                    eocPropertyBean.Business_ActivationLinks_IsChecked = true;

                    intActionResult = bocUserProfile.UpdateRecord_ActivationLinks(eocPropertyBean);

                    if (intActionResult > 0)
                    {
                        Response.Redirect("Default.aspx");
                    }
                    else
                    {
                        lblSystemMessage.Text = "This link has been expired...";
                    }
                }
            }
        }
    }
Пример #3
0
    /// <summary>
    /// Checks the query string.
    /// </summary>
    /// <returns></returns>
    private void CheckQueryString()
    {
        bool blnFlag = false;

        if (Request.QueryString["data"] != null)
        {
            string   strEncryptedUrl = Request.QueryString["data"].ToString();
            string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
            string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
            //strUserType = strSplitUrl[1];

            strPageMode = strSplitUrl[1];
            strProductSellerDetailID = strSplitUrl[3];
            strPID   = strSplitUrl[5];
            strCID   = strSplitUrl[7];
            strSCID  = strSplitUrl[9];
            strSSCID = strSplitUrl[11];
        }
        else
        {
            strPageMode = Request.QueryString["PageMode"];
            strPID      = Request.QueryString["PID"];
            strCID      = Request.QueryString["CID"];
            strSCID     = Request.QueryString["SCID"];
            strSSCID    = Request.QueryString["SSCID"];
            strProductSellerDetailID = Request.QueryString["PSID"];
        }


        if (Int32.TryParse(strPID, out intProductID) && Int32.TryParse(strCID, out intCategoryID) && Int32.TryParse(strSCID, out
                                                                                                                    intSubcategoryID) && Int32.TryParse(strSSCID, out intSecondSubcatID) && Int32.TryParse(strPageMode, out intPageMode))
        {
            if (intPageMode == 0)
            {
                blnFlag = true;
            }
            if (intPageMode == 1)
            {
                if (Int32.TryParse(strProductSellerDetailID, out intProductSellerDetailID))
                {
                    blnFlag = true;
                }
                else
                {
                    blnFlag = false;
                }
            }
        }
        else
        {
            if (!blnFlag)
            {
                Response.Redirect("../Default.aspx");
            }
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string strCategoryID    = "";
        string strSubcategoryID = "";
        bool   success          = true;

        //TODO: This if-else can be removed. Because this Page_Load event fire only after Main pages Page_load events fires.
        if (Session["SELECTED_LOCATION"] != null)
        {
            this.selectedLocation = Session["SELECTED_LOCATION"].ToString();
            intCountryID          = Convert.ToInt32(selectedLocation);
        }

        if (enableControl)
        {
            try
            {
                if (Request.QueryString["data"] != null)
                {
                    string   strEncryptedUrl = Request.QueryString["data"].ToString();
                    string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
                    string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
                    strCategoryID    = strSplitUrl[7];
                    strSubcategoryID = strSplitUrl[9];
                }
                else
                {
                    strCategoryID    = Request.QueryString["CID"];
                    strSubcategoryID = Request.QueryString["SCID"];
                }
                intSubcategoryID = Convert.ToInt32(strSubcategoryID);
                intCategoryID    = Convert.ToInt32(strCategoryID);
            }
            catch (Exception exp)
            {
                success = false;
            }
            if (!Page.IsPostBack && success)
            {
                this.LoadList_All_Author();
                this.LoadList_All_Publisher();
                this.LoadList_Top10_Author();
                this.LoadList_Top10_Publisher();
                this.LoadRecord_All_SecondSubcategory();
                this.LoadRecord_Top10_SecondSubcategory();
            }
        }
    }
Пример #5
0
    /// <summary>
    /// Checks the query string.
    /// </summary>
    /// <returns></returns>
    private void CheckQueryString()
    {
        if (Request.QueryString["data"] != null)
        {
            string   strEncryptedUrl = Request.QueryString["data"].ToString();
            string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
            string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
            strUserType = strSplitUrl[1];
        }
        hfUserType.Value = strUserType;
        if (this.Session["PAYMENT_OPTION"] != null && this.Session["ORDER_ID"] != null)
        {
            strPaymentOption      = this.Session["PAYMENT_OPTION"].ToString();
            hfPaymentOption.Value = strPaymentOption;
            strOrderID            = this.Session["ORDER_ID"].ToString();
            blnFlag = Int32.TryParse(strOrderID, out intOrderID);

            hfOrderID.Value = strOrderID;
        }

        if (string.IsNullOrEmpty(strUserType) && string.IsNullOrEmpty(strPaymentOption) && blnFlag)
        {
            blnFlag = false;
        }
        else
        {
            if (strUserType == "BS" || strUserType == "CL")
            {
                blnFlag = true;
            }
            else
            {
                blnFlag = false;
            }
        }

        if (blnFlag == false)
        {
            Response.Redirect("~/Default.aspx");
        }
    }
Пример #6
0
 private void CheckQueryString()
 {
     try
     {
         if (Request.QueryString["data"] != null)
         {
             string   strEncryptedUrl = Request.QueryString["data"].ToString();
             string   strDecryptedUrl = UTLUtilities.Decrypt(strEncryptedUrl);
             string[] strSplitUrl     = strDecryptedUrl.Split('&', '=');
             strOrderID       = strSplitUrl[1];
             strProfileID     = strSplitUrl[3];
             userType         = strSplitUrl[5] == "BS" ? true : false;;
             strPaymentOption = strSplitUrl[7];
             //strPaymentOption = Server.UrlDecode(strSplitUrl[7]);
             strTotalAmount = strSplitUrl[9];
             strCurrency    = strSplitUrl[11];
         }
         //strOrderID = Request.QueryString["oi"];
         //strProfileID = Request.QueryString["pfi"];
         //strPaymentOption = Server.UrlDecode(Request.QueryString["po"]);
         //strTotalAmount = Request.QueryString["total"];
         //strCurrency = Request.QueryString["curr"];
         //userType = Request.QueryString["ut"].ToString() == "BS" ? true : false;
         if (!string.IsNullOrEmpty(strOrderID) || !UTLUtilities.IsNumeric(strOrderID))
         {
             blnFlag = true;
         }
         else
         {
             blnFlag = false;
         }
     }
     catch (Exception ex)
     {
         lblSystemMessage.Text = "Error: " + ex.Message;
     }
 }