// GET: SanPham/Details/5
        public ActionResult Details(int id)
        {
            var BinhLuan       = BinhLuanBUS.DanhSach(id);
            var ChiTietSP      = SanPhamBus.ChiTiet(id);
            var ChiTietLoaiSP  = LoaiBus.ChiTietViewModel(ChiTietSP.MaLoai);
            var ChitTietHangSP = HangBus.ChiTietViewModel(ChiTietSP.MaLoai);

            return(View(new SanPhamViewModel()
            {
                LoaiSP = ChiTietLoaiSP, HangSP = ChitTietHangSP, SanPham = ChiTietSP, BinhLuanSP = BinhLuan
            }));
        }
Пример #2
0
 public ActionResult Index(string MaSP)
 {
     ViewBag.MaSP = MaSP;
     return View(BinhLuanBUS.DanhSach(MaSP));
 }
Пример #3
0
 // GET: api/APIBinhLuan
 public IEnumerable <BinhLuan> Get(int MaSanPham)
 {
     return(BinhLuanBUS.DanhSach(MaSanPham));
 }
Пример #4
0
 public ActionResult Index(int MaSanPham)
 {
     ViewBag.MaSanPham = MaSanPham;
     return(View(BinhLuanBUS.DanhSach(MaSanPham)));
 }