コード例 #1
0
 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 }));
 }
コード例 #2
0
 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 }));
 }
コード例 #3
0
        // 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);
        }
コード例 #4
0
        // 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);
        }
コード例 #5
0
        public ActionResult Create(String MaSanPham, String NoiDung)
        {

            BinhLuanBUS.Them(MaSanPham, User.Identity.GetUserId(), User.Identity.Name, NoiDung);
            return RedirectToAction("Details", "Shop", new { Id = MaSanPham });
        }