protected void BindTopCartItems() { Label lblTopNoItems = (Label)this.Page.Master.FindControl("lblTopNoItems"); Label lblTopTotal = (Label)this.Page.Master.FindControl("lblTopTotal"); if (Session["Cart"] != null) { clsCart = new clsAddToCart(); lblTopNoItems.Text = clsCart.TotalItems().ToString(); if (clsCart.TotalItems() != 0) { lblTopTotal.Text = Math.Round(clsCart.TotalPrice()).ToString(); } else { lblTopTotal.Text = "0"; } } else { lblTopNoItems.Text = "0"; lblTopTotal.Text = "0"; } }
protected void BindOrderSummary() { clsCart = new clsAddToCart(); lblTotalItems.Text = clsCart.TotalItems().ToString(); lblTotalAmount.Text = "Rs. " + Math.Round(clsCart.TotalPrice()).ToString(); lblFinalAmount1.Text = "Rs. " + Math.Round(clsCart.TotalPrice()).ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["MemberInfo"] != null) { if (HttpContext.Current.Session["Cart"] != null) { clsCart = new clsAddToCart(); if (clsCart.TotalItems() <= 0) { Response.Redirect("MemberDashBoard.aspx"); } } if (!IsPostBack) { BindShippingInfo(); BindOrderSummary(); } } else { HttpContext.Current.Session["CameFrom"] = "CheckOut_Login"; Response.Redirect("Register.aspx"); } pnlShippingPin.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["MemberInfo"] != null) { if (HttpContext.Current.Session["Cart"] != null) { clsCart = new clsAddToCart(); if (clsCart.TotalItems() <= 0) { Response.Redirect("Checkout_Login.aspx"); } } if (!IsPostBack) { BindCart(); BindFinalAmt(); BindOrderSummary(); BindShippingSummary(); setCoupoCodePanel(); } } else { HttpContext.Current.Session["CameFrom"] = "CheckOut_Login"; Response.Redirect("Checkout_Login.aspx"); } }
protected void BindCart() { clsCart = new clsAddToCart(); if (clsCart.TotalItems() <= 0) { ShowMessageThenRedirectTo("Cart is empty", "default"); } rptrCart.DataSource = clsCart.BindCart(); rptrCart.DataBind(); }
protected void BindTopCartItems() { if (Session["Cart"] != null) { clsCart = new clsAddToCart(); lblTopNoItems.Text = clsCart.TotalItems().ToString(); if (clsCart.TotalItems() != 0) { lblTopTotal.Text = Math.Round(clsCart.TotalPrice()).ToString(); } else { lblTopTotal.Text = "0"; } } else { lblTopNoItems.Text = "0"; lblTopTotal.Text = "0"; } }