public ActionResult Create(int MaSanPham = 0, String NoiDung = "") { if (MaSanPham == 0) { return(Redirect("/")); } BinhLuanBUS.Them(MaSanPham, User.Identity.Name, User.Identity.GetUserId(), NoiDung); return(RedirectToAction("Details", "SanPham", new { Id = MaSanPham })); }
public ActionResult Create(int MaSanPham = 0, string NoiDungBinhLuan = "") { if (MaSanPham == 0) { return(Redirect("/")); } BinhLuanBUS.Them(NoiDungBinhLuan, MaSanPham, User.Identity.GetUserId(), User.Identity.Name); return(RedirectToAction("Details", "Product", new { id = MaSanPham })); }
// GET: api/BinhLuanApi/5 //public string Get(int id) //{ // return "value"; //} // POST: api/BinhLuanApi public void Post([FromBody] BinhLuan binhluan) { BinhLuanBUS.Them(binhluan.MaSanPham, User.Identity.GetUserId(), User.Identity.Name, binhluan.NoiDung); }
// GET: api/APIBinhLuan/5 //public string Get(int id) //{ // return "value"; //} // POST: api/APIBinhLuan public void Post([FromBody] BinhLuan bl) { BinhLuanBUS.Them(bl.NoiDungBinhLuan, bl.MaSanPham, User.Identity.GetUserId(), User.Identity.Name); }
public ActionResult Create(String MaSanPham, String NoiDung) { BinhLuanBUS.Them(MaSanPham, User.Identity.GetUserId(), User.Identity.Name, NoiDung); return RedirectToAction("Details", "Shop", new { Id = MaSanPham }); }