public ActionResult Them(string masanpham, string tensanpham, int gia, int soluong) { try { GioHangBUS.Them(masanpham, User.Identity.GetUserId(), gia, soluong, tensanpham); return(RedirectToAction("Index")); } catch { return(RedirectToAction("../Shop/Index")); } }
public ActionResult Them(string masanpham, string tensanpham, int soluong, int gia, string hinhchinh) { try { GioHangBUS.Them(masanpham, User.Identity.GetUserId(), tensanpham, soluong, gia, hinhchinh); return(RedirectToAction("Index")); //them thanh cong } catch { return(RedirectToAction("../MobiShop/Index")); //them ko thanh cong } }
public ActionResult Them(int maSanPham) { GioHangBUS.Them(maSanPham, User.Identity.GetUserId()); return(RedirectToAction("Index")); }