public ActionResult DeleteConfirmed(long id) { khuyenmaihethong khuyenmaihethong = db.khuyenmaihethongs.Find(id); db.khuyenmaihethongs.Remove(khuyenmaihethong); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "khuyenmaihethong_id,tenkhuyenmaihethong,ngaybatdau,ngayketthuc,muckhuyenmaihethongtoida")] khuyenmaihethong khuyenmaihethong) { if (ModelState.IsValid) { db.Entry(khuyenmaihethong).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(khuyenmaihethong)); }
public ActionResult Create([Bind(Include = "khuyenmaihethong_id,tenkhuyenmaihethong,ngaybatdau,ngayketthuc,muckhuyenmaihethongtoida")] khuyenmaihethong khuyenmaihethong) { if (ModelState.IsValid) { db.khuyenmaihethongs.Add(khuyenmaihethong); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(khuyenmaihethong)); }
// GET: khuyenmaihethongs/Details/5 public ActionResult Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } khuyenmaihethong khuyenmaihethong = db.khuyenmaihethongs.Find(id); if (khuyenmaihethong == null) { return(HttpNotFound()); } return(View(khuyenmaihethong)); }