Ejemplo n.º 1
0
        protected void cmdAdd_Click(object sender, EventArgs e)
        {
            int cartid = Convert.ToInt32(Session["CartId"]);
            int userid = Convert.ToInt32(Session["UserId"]);

            shipment.Insert(userid, txtName.Text, txtAddress.Text, TxtPlace.Text, TxtDistrict.Text, TxtState.Text,
                            TxtPincode.Text, TxtMobile.Text, cartid);
            var GetallCartData = _cart.GetCartData(userid);

            foreach (var item in GetallCartData)
            {
                _cart.Delete(item.CartId);
            }
            txtAddress.Text = "";
            if (RadioButtonList2.SelectedIndex == 0)
            {
                Response.Write("<script>alert('successfully completed')</script>");
                Response.Redirect("~/Customer/UserHomePage.aspx");
            }
            else
            {
                Response.Redirect("~/Customer/NetBanking.aspx");
            }
        }