コード例 #1
0
        // 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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 // [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())));
        }