public ActionResult Sua(int id) { Giay entity = giayDAO.getShoeById(id); var dm = new DanhMucDAO(); ViewBag.Categories = dm.GetAll(); return(View(entity)); }
public ActionResult ThemSlide(int id) { var giay = giayDAO.getShoeById(id); SlideNewProduct entity = new SlideNewProduct(); entity.shoeId = id; entity.createdAt = DateTime.Now; entity.isActive = true; entity.title = giay.shoeName; var res = sl.Them(entity); if (res < 0) { ModelState.AddModelError("", "Thêm slide xảy ra lỗi. Xin thử lại!"); } return(RedirectToAction("Them")); }