public void LoadProduct() { DataTable dtCart = new DataTable(); if ((HttpContext.Current.Session[appFunctions.Session.Cart.ToString()] != null)) { dtCart = (DataTable)HttpContext.Current.Session[appFunctions.Session.Cart.ToString()]; } dgvCart.DataSource = null; dgvCart.DataBind(); if (dtCart.Rows.Count > 0) { // lblTotalPrice.Text = dtCart.Compute("sum(appTotalPrice)","").ToString(); lblTotalPrice.Text = Session[appFunctions.Session.CurrencyImage.ToString()].ToString() + "" + Math.Round(Convert.ToDecimal(Session[appFunctions.Session.CurrencyInRupee.ToString()].ToString()) * Convert.ToDecimal(dtCart.Compute("sum(appTotalPrice)", "").ToString()), 0).ToString(); // lblTotalPrice.Text = Math.Round(Convert.ToDecimal(Session[appFunctions.Session.CurrencyInRupee.ToString()].ToString()) * Convert.ToDecimal(dtCart.Compute("sum(appTotalPrice)", "").ToString()), 2).ToString(); divProductTotalPrice.Style.Add("display", "block"); dgvCart.DataSource = dtCart; dgvCart.DataBind(); } else { DInfo.ShowMessage("No data found.", BusinessLayer.Enums.MessageType.Information); divProductTotalPrice.Style.Add("display", "none"); MpeCart.Hide(); Response.Redirect(Request.RawUrl); } MpeCart.Show(); }
protected void btnContinueShopping_Click(object sender, EventArgs e) { if (UpdateCart()) { MpeCart.Hide(); Response.Redirect(Request.RawUrl); } }
protected void btnplaceorder_Click(object sender, EventArgs e) { if (UpdateCart()) { if ((Session[appFunctions.Session.ClientUserID.ToString()] != null)) { if (string.IsNullOrEmpty(Session[appFunctions.Session.ClientUserName.ToString()].ToString()) | Session[appFunctions.Session.ClientUserID.ToString()].ToString() == "0") { MpeCart.Hide(); CustLogin.ShowLogin(); } else { Response.Redirect(objPageBase.GetAlias("Order.aspx")); } } else { MpeCart.Hide(); CustLogin.ShowLogin(); } } }
protected void imbtnClose_Click(object sender, EventArgs e) { MpeCart.Hide(); Response.Redirect(Request.RawUrl); }
protected void dgvCart_RowDeleting(object sender, GridViewDeleteEventArgs e) { MpeCart.Hide(); Response.Redirect(Request.RawUrl); }