private void remOrUpdate() { if (Request["rem"] != null) { SR.RemoveFromCart(ClientId, int.Parse(Request["rem"])); Response.Redirect("ShoppingCart.aspx"); } else if (Request["clear"] != null) { SR.ClearTheCart(ClientId); Response.Redirect("ShoppingCart.aspx"); } else if (Request["prodId"] != null) { SR.EditFromCart( ClientId, int.Parse(Request["prodId"]), int.Parse(Request["quantity"]), SR.GetProduct(int.Parse(Request["prodId"])).Unit_Price *int.Parse(Request["quantity"]) ); Response.Redirect("ShoppingCart.aspx"); } }
protected void ClearCart_Click(object sender, EventArgs e) { SR.ClearTheCart(ClientId); }