Exemple #1
0
 // POST: api/BinhLuanAPI
 public void Post([FromBody] BinhLuan bl)
 {
     bl.MaTK      = User.Identity.GetUserId();
     bl.TinhTrang = 0;
     bl.ThoiGian  = DateTime.Now;
     bl.TenTK     = User.Identity.Name;
     BinhLuanBus.ThemBinhLuan(bl);
 }
        // GET: SanPham/Details/5
        public ActionResult Details(int id)
        {
            var BinhLuan = BinhLuanBus.DanhSach(id);
            var ChiTiet  = SanPhamBus.ChiTiet(id);
            var data     = new SanPhamViewModels()
            {
                SanPham = ChiTiet, BinhLuanSP = BinhLuan
            };

            return(View(data));
        }