public IActionResult DatHang(string tendangnhap) { string checktendangnhap = HttpContext.Session.GetString("TenDangNhap"); if (checktendangnhap != null && checktendangnhap != "") { TaiKhoan taikhoan = new TaiKhoan(); taikhoan = taikhoanbus.CheckTaiKhoan(tendangnhap); List <GioHang> list = giohangbus.GetGioHangs(tendangnhap); List <TaiKhoan> listmerchant = giohangbus.GetMerchants(tendangnhap); List <DiaChi> listaddress = taikhoanbus.GetAllAddress(tendangnhap); DiaChi firstAddress = taikhoanbus.GetFirstAddress(tendangnhap); List <HangSanPham> hang = hangsanphambus.GetHangSanPhams(); ViewBag.Hang = hang; ViewBag.TaiKhoan = taikhoan; ViewBag.Merchants = listmerchant; ViewBag.FirstAddress = firstAddress; ViewBag.ListAddress = listaddress; return(View(list)); } return(RedirectToAction("Index", "Home")); }