public ActionResult DeleteConfirmed(int id) { dmTyLeDongBHXH dmtyledongbhxh = db.dmTyLeDongBHXH.Find(id); db.dmTyLeDongBHXH.Remove(dmtyledongbhxh); db.SaveChanges(); TempData["Message"] = "Xóa thành công"; return(RedirectToAction("Index", "dmTyLeDongBH")); }
// // GET: /dmTyLeDongBH/Edit/5 public ViewResult Edit(int id = 0) { dmTyLeDongBHXH dmtyledongbhxh = db.dmTyLeDongBHXH.Find(id); //if (dmtyledongbhxh == null) //{ // return HttpNotFound(); //} return(View(dmtyledongbhxh)); }
// // GET: /dmTyLeDongBH/Details/5 public ActionResult Details(int id = 0) { dmTyLeDongBHXH dmtyledongbhxh = db.dmTyLeDongBHXH.Find(id); if (dmtyledongbhxh == null) { return(HttpNotFound()); } return(View(dmtyledongbhxh)); }
public ActionResult Edit(dmTyLeDongBHXH dmtyledongbhxh) { if (ModelState.IsValid) { db.Entry(dmtyledongbhxh).State = EntityState.Modified; db.SaveChanges(); TempData["Message"] = "Sửa thành công"; return(RedirectToAction("Index", "dmTyLeDongBH")); } return(View(dmtyledongbhxh)); }
public ActionResult Create(dmTyLeDongBHXH dmtyledongbhxh) { if (ModelState.IsValid) { db.dmTyLeDongBHXH.Add(dmtyledongbhxh); db.SaveChanges(); TempData["Message"] = "Thêm mới thành công"; return(RedirectToAction("Index", "dmTyLeDongBH")); } return(View(dmtyledongbhxh)); }