protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SetUpPageContent(ref metaDescription, ref metaKeywords); objCommon = new clsCommon(); string strIds = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); if (strIds != "") { Boolean approved = false; try { string strId = objEncrypt.Decrypt(strIds, appFunctions.strKey); tblCustomer objCustomer = new tblCustomer(); if (objCustomer.LoadByPrimaryKey(Convert.ToInt32(strId))) { if (!(objCustomer.AppIsVerified)) { objCustomer.AppIsVerified = true; objCustomer.Save(); approved = true; } } objCustomer = null; Response.Redirect(GetAlias("Login.aspx") + "?From=" + objEncrypt.Encrypt("ApprovedPage" + approved.ToString(), appFunctions.strKey), true); } catch (Exception ex) { } } objCommon = null; } }
protected void Page_Load(object sender, EventArgs e) { GoogleConnect.ClientId = "46997156311-dtin83fcl635bj6kissb7d591ktgd81h.apps.googleusercontent.com"; GoogleConnect.ClientSecret = "HP2dL6DheppmHjzmCFCsFHYo"; GoogleConnect.RedirectUri = Request.Url.AbsoluteUri.Split('?')[0]; if (!string.IsNullOrEmpty(Request.QueryString["code"])) { string code = Request.QueryString["code"]; string json = GoogleConnect.Fetch("me", code); GoogleProfile profile = new JavaScriptSerializer().Deserialize <GoogleProfile>(json); // lblId.Text = profile.Id; string[] arIDs = profile.DisplayName.TrimEnd(' ').Split(' '); txtFirstName.Text = arIDs[0]; txtLastName.Text = arIDs[1]; txtEmailRegistration.Text = profile.Emails.Find(email => email.Type == "account").Value; if (profile.Gender == "male") { RbtnMale.Checked = true; } else { RbtnFeMale.Checked = true; } btngplus.Visible = false; } if (Request.QueryString["error"] == "access_denied") { ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('Access denied.')", true); } if (!Page.IsPostBack) { ExitsSession(); SetUpPageContent(ref metaDescription, ref metaKeywords); SetRegulerExpression(); // ResetRegistrationCotrol(); objCommon = new clsCommon(); string strRedirect = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); objCommon = null; if (strRedirect != "") { if (strRedirect == "TrackOrder") { DInfo.ShowMessage("Please registrate first to track your order", Enums.MessageType.Information); } if (strRedirect == "WishList") { DInfo.ShowMessage("Please registrate first to see your wishlist", Enums.MessageType.Information); } } objCommon = new clsCommon(); objCommon = null; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SetUpPageContent(ref metaDescription, ref metaKeywords); objCommon = new clsCommon(); hdnProduct.Value = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); lblLiteral.Text = " / " + hdnProduct.Value; this.Page.Title = hdnCategory.Value; objCommon = null; tblProperty objProperty = new tblProperty(); RepProperty.DataSource = objProperty.LoadProductWiseProperty(hdnProduct.Value); RepProperty.DataBind(); objProperty = null; tblProduct objProduct = new tblProduct(); decimal iPrice = objProduct.GetProductNameWiseMaxPrice(hdnProduct.Value); objProduct = null; iPrice = Math.Round(Convert.ToDecimal(HttpContext.Current.Session[appFunctions.Session.CurrencyInRupee.ToString()].ToString()) * iPrice, 0) + 100; hdnMaxPrice.Value = iPrice.ToString(); dtColor.DataSource = null; dtColor.DataBind(); tblColor objColor = new tblColor(); objColor.Where.AppIsActive.Value = true; objColor.Query.AddOrderBy(tblColor.ColumnNames.AppDisplayOrder, MyGeneration.dOOdads.WhereParameter.Dir.ASC); objColor.Query.Load(); if (objColor.RowCount > 0) { if (objColor.RowCount == 1) { if (objColor.s_AppIsDefault != "") { if (objColor.AppIsDefault) { Seccolor.Style.Add("display", "none"); } } } dtColor.DataSource = objColor.DefaultView.Table;; dtColor.DataBind(); } objColor = null; hdnOrderBy.Value = " vw_SerachProduct.appProductId Desc"; } }
protected void btnLogin_Click(object sender, EventArgs e) { if (IsLogin()) { tblCustomer objCustomer = new tblCustomer(); objCustomer.Where.AppEmailID.Value = txtEmail.Text.Trim(); objCustomer.Query.Load(); if (objCustomer.RowCount > 0) { objEncrypt = new clsEncryption(); if (string.Compare(objEncrypt.Decrypt(objCustomer.AppPassword, appFunctions.strKey), txtPassword.Text, false) != 0) { DInfo.ShowMessage("Invalid user name or password.", Enums.MessageType.Error); } else { if (objCustomer.AppIsVerified) { httpCookie = new HttpCookie("FabyMartUsername", objEncrypt.Encrypt(txtEmail.Text, appFunctions.strKey)); httpCookie.Expires = DateTime.Today.AddDays(10); Response.Cookies.Add(httpCookie); httpCookie = new HttpCookie("FabyMartPassword", objEncrypt.Encrypt(txtPassword.Text, appFunctions.strKey)); httpCookie.Expires = DateTime.Today.AddDays(10); Response.Cookies.Add(httpCookie); Session[appFunctions.Session.ClientUserID.ToString()] = objCustomer.AppCustomerID; Session[appFunctions.Session.ClientUserName.ToString()] = objCustomer.AppFirstName + " " + objCustomer.AppLastName; objCommon = new clsCommon(); string strRedirect = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); objCommon = null; Response.Redirect(objPageBase.GetAlias("Default.aspx")); } else { DInfo.ShowMessage("Your account is Not Verified.Plase verify it by your registered email address .", Enums.MessageType.Error); } } objEncrypt = null; } else { DInfo.ShowMessage("Invalid user name or password.", Enums.MessageType.Error); } objCustomer = null; } }
protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { try { string strId = ""; objEncrypt = new clsEncryption(); objCommon = new clsCommon(); strId = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); strId = objEncrypt.Decrypt(strId, appFunctions.strKey); objEncrypt = null; if (strId != "") { objReturnOrder = new tblReturnOrder(); objDataTable = objReturnOrder.GetReturnOrderListWithCityStateCountry(strId, Convert.ToInt32(Enums.Enum_ReturnStatus.Slip).ToString(), appFunctions.strSellerName, appFunctions.strMobileNo, appFunctions.strAddress, appFunctions.strCountry, appFunctions.strState, appFunctions.strCity, appFunctions.strPinColde); if (objDataTable.Rows.Count > 0) { printButton.Visible = true; } else { printButton.Visible = false; } dtProductInvoice.DataSource = objDataTable; dtProductInvoice.DataBind(); // objSubOrder.SetProductInvoiceGenerated(Convert.ToInt32(Enums.Enums_OrderStatus.Confirmed).ToString(),strId.TrimEnd(',').Trim()); objReturnOrder = null; } else { printButton.Visible = false; } } catch (Exception ex) { printButton.Visible = false; Response.Write(ex.StackTrace.ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SetUpPageContent(ref metaDescription, ref metaKeywords); SetCartProductCount(); Setregularexpression(); objCommon = new clsCommon(); if (Session[appFunctions.Session.DInfoInquiry.ToString()] != null) { if (Session[appFunctions.Session.DInfoInquiry.ToString()] != "") { DInfo.ShowMessage(Session[appFunctions.Session.DInfoInquiry.ToString()].ToString(), Enums.MessageType.Successfull); Session[appFunctions.Session.DInfoInquiry.ToString()] = null; } } hdnProductName.Value = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); string strColor = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "2"); if (hdnProductName.Value != "") { lblLiteral.Text = hdnProductName.Value; if (strColor != "") { tblColor objColor = new tblColor(); objColor.Where.AppColorName.Value = strColor; //objColor.Where.AppIsActive.Value = true; objColor.Query.Load(); if (objColor.RowCount > 0) { hdnColorId.Value = objColor.s_AppColorID; } else { hdnColorId.Value = "0"; } objColor = null; } objProduct = new tblProduct(); objProduct.Where.AppProductName.Value = hdnProductName.Value; objProduct.Query.Load(); if (objProduct.RowCount > 0) { this.Page.Title = objProduct.AppProductName; lblProductName.Text = objProduct.AppProductName; if (objProduct.s_AppDescription != "") { divDescription.InnerHtml = objProduct.s_AppDescription; } else { DataDescription.Visible = false; } if (objProduct.s_AppMetaKeyWord != "") { metaKeywords = objProduct.s_AppMetaKeyWord; } if (objProduct.s_AppMetaDescription != "") { metaDescription = objProduct.s_AppMetaDescription; } DivWashCare.InnerHtml = objProduct.s_AppWashCare; hdnPKID.Value = objProduct.s_AppProductID; if (objProduct.s_AppEstimatedDeliveryDays != "") { lblDeliveryDays.Text = objProduct.s_AppEstimatedDeliveryDays; } if (objProduct.s_AppIsSize != "") { if (!objProduct.AppIsSize) { divProductSize.Style.Add("display", "none"); hdnIsSize.Value = "false"; } else { divProductSize.Style.Add("display", "block"); hdnIsSize.Value = "true"; } } if (objProduct.s_AppIsColor != "") { if (!objProduct.AppIsColor) { divProductColor.Style.Add("display", "none"); hdnIsColor.Value = "false"; } else { divProductColor.Style.Add("display", "block"); hdnIsColor.Value = "true"; } } LoadColor(); LoadColorWiseImages(); LoadReviewList(); LoadRelatedProduct(); LoadRecentProduct(); if ((Session[appFunctions.Session.ClientUserID.ToString()] != null)) { if ((Session[appFunctions.Session.ClientUserName.ToString()]) != "" || (Session[appFunctions.Session.ClientUserID.ToString()]) != "0") { divReviewForm.Visible = true; btnClickHere.Visible = false; } else { divReviewForm.Visible = false; btnClickHere.Visible = true; } } else { divReviewForm.Visible = false; btnClickHere.Visible = true; } } objProduct = null; } LoadPixcelCode(); this.Page.Title = hdnProductName.Value; } }
protected void btnLogin_Click(object sender, EventArgs e) { tblCustomer objCustomer = new tblCustomer(); objCustomer.Where.AppEmailID.Value = txtEmail.Text.Trim(); objCustomer.Query.Load(); if (objCustomer.RowCount > 0) { objEncrypt = new clsEncryption(); if (string.Compare(objEncrypt.Decrypt(objCustomer.AppPassword, appFunctions.strKey), txtPassword.Text, false) != 0) { lblForError.InnerText = "Invalid Email or Password."; //DInfo.ShowMessage("Invalid User Name or Password.", Enums.MessageType.Error); } else { if (objCustomer.AppIsVerified) { if (chkRemeberMe.Checked) { httpCookie = new HttpCookie("FabyMartUsername", objEncrypt.Encrypt(txtEmail.Text, appFunctions.strKey)); httpCookie.Expires = DateTime.Today.AddDays(10); Response.Cookies.Add(httpCookie); httpCookie = new HttpCookie("FabyMartPassword", objEncrypt.Encrypt(txtPassword.Text, appFunctions.strKey)); httpCookie.Expires = DateTime.Today.AddDays(10); Response.Cookies.Add(httpCookie); } else { httpCookie = new HttpCookie("FabyMartUsername", ""); httpCookie.Expires = DateTime.Today.AddDays(0); Response.Cookies.Add(httpCookie); httpCookie = new HttpCookie("FabyMartPassword", ""); httpCookie.Expires = DateTime.Today.AddDays(0); Response.Cookies.Add(httpCookie); } Session[appFunctions.Session.ClientUserID.ToString()] = objCustomer.AppCustomerID; Session[appFunctions.Session.ClientUserName.ToString()] = objCustomer.AppFirstName + " " + objCustomer.AppLastName; objCommon = new clsCommon(); string strRedirect = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); objCommon = null; if (strRedirect != "") { if (strRedirect == "Cart") { Response.Redirect(GetAlias("Cart.aspx")); } else if (strRedirect == "wishlist") { Response.Redirect(GetAlias("MyFavouriteProduct.aspx")); } else if (strRedirect == "TrackOrder") { Response.Redirect(GetAlias("TrackOrder.aspx")); } else if (strRedirect == "WishList") { Response.Redirect(GetAlias("MyFavouriteProduct.aspx")); } else if (strRedirect == "order") { Response.Redirect(GetAlias("order.aspx")); } else { Response.Redirect(GetAlias("Default.aspx")); } } else { Response.Redirect(GetAlias("Default.aspx")); } } else { DInfo.ShowMessage("Your account is not verified, Please check your email to verify or contact to support", Enums.MessageType.Error); } } objEncrypt = null; } else { lblForError.InnerText = "Invalid Email or Password"; // DInfo.ShowMessage("Invalid User Name or Password.", Enums.MessageType.Error); } objCustomer = null; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ExitsSession(); SetUpPageContent(ref metaDescription, ref metaKeywords); SetRegulerExpression(); // ResetRegistrationCotrol(); if ((Request.Cookies.Get("FabyMartUsername") != null)) { if (!string.IsNullOrEmpty(Request.Cookies.Get("FabyMartUsername").Value)) { txtEmail.Text = objEncrypt.Decrypt(Request.Cookies.Get("FabyMartUsername").Value, appFunctions.strKey); if ((Request.Cookies.Get("FabyMartPassword") != null)) { if (!string.IsNullOrEmpty(Request.Cookies.Get("FabyMartPassword").Value)) { txtPassword.Attributes.Add("value", objEncrypt.Decrypt(Request.Cookies.Get("FabyMartPassword").Value, appFunctions.strKey)); } } chkRemeberMe.Checked = true; } } if ((Request.QueryString.Get("From") != null)) { string From = ""; objEncrypt = new clsEncryption(); From = objEncrypt.Decrypt(Request.QueryString.Get("From"), appFunctions.strKey); objEncrypt = null; if (From == "ApprovedPageTrue") { DInfo.ShowMessage("Your account has been activated successfully", Enums.MessageType.Successfull); } else if (From == "ApprovedPageFalse") { DInfo.ShowMessage("Your account is already activated", Enums.MessageType.Information); } } objCommon = new clsCommon(); string strRedirect = objCommon.GetParameterFromUrl(Enums.Enums_URLParameterType.ByNumber, "1"); objCommon = null; if (strRedirect != "") { if (strRedirect == "TrackOrder") { DInfo.ShowMessage("Please login first to track your order", Enums.MessageType.Information); } if (strRedirect == "WishList") { DInfo.ShowMessage("Please login first to see your wishlist", Enums.MessageType.Information); } } //ExitsSession(); //SetUpPageContent(ref metaDescription, ref metaKeywords); //SetRegulerExpression(); //if (Request.Cookies.Get("FabyMartUsername") != null) //{ // objEncrypt = new clsEncryption(); // if (Request.Cookies.Get("FabyMartUsername").Value != "") // { // txtEmail.Text = objEncrypt.Decrypt(Request.Cookies.Get("FabyMartUsername").Value, appFunctions.strKey); // if (Request.Cookies.Get("FabyMartPassword").Value != "") // { // txtPassword.Attributes.Add("value", objEncrypt.Decrypt(Request.Cookies.Get("FabyMartPassword").Value, appFunctions.strKey)); // chkRemeberMe.Checked = true; // } // } // objEncrypt = null; //} //else //{ // chkRemeberMe.Checked = false; //} //if ((Request.QueryString.Get("From") != null)) //{ // string From = ""; // objEncrypt = new clsEncryption(); // From = objEncrypt.Decrypt(Request.QueryString.Get("From"), appFunctions.strKey); // objEncrypt = null; // if (From == "ApprovedPageTrue") // { // DInfo.ShowMessage("Your account has been activated successfully", Enums.MessageType.Successfull); // } // else if (From == "ApprovedPageFalse") // { // DInfo.ShowMessage("Your account is already activated", Enums.MessageType.Information); // } //} } }