// GET: ThanhToan
        public ActionResult Index()
        {
            List <GioHang> ds = GioHangBUS.DanhSach(User.Identity.GetUserId()).ToList();

            if (ds.Count() == 0)
            {
                return(RedirectToAction("../Shop/index"));
            }
            return(View(ds));
        }
        public ActionResult ThanhToan()
        {
            IEnumerable <v_GioHang> dsCTGH = GioHangBUS.DanhSach(User.Identity.GetUserId());
            int TongTien = 0;

            foreach (var item in dsCTGH)
            {
                TongTien += (int)item.SoLuong * (int)item.GiaBan;
            }
            ViewBag.Total = TongTien;
            ViewBag.id    = User.Identity.GetUserId();
            // OrderBUS.Them(User.Identity.GetUserId(), TongTien);
            //GioHangBUS.remove(User.Identity.GetUserId());
            return(View(dsCTGH));
        }
 // [Authorize]
 //GET: GioHang
 public ActionResult Index()
 {
     return(View(GioHangBUS.DanhSach(User.Identity.GetUserId())));
 }
示例#4
0
        // GET: GioHang

        public ActionResult Index()
        {
            ViewBag.TongTien = GioHangBUS.TongTien(User.Identity.GetUserId());
            return(View(GioHangBUS.DanhSach(User.Identity.GetUserId())));
        }