public ActionResult DeleteConfirmed(int id) { Chitietkhenthuong chitietkhenthuong = db.Chitietkhenthuongs.Find(id); db.Chitietkhenthuongs.Remove(chitietkhenthuong); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Machitietkhenthuong,Manv,Makhenthuong,Lydokhenthuong,Tienthuong")] Chitietkhenthuong chitietkhenthuong) { if (ModelState.IsValid) { db.Entry(chitietkhenthuong).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Makhenthuong = new SelectList(db.Khenthuongs, "Makhenthuong", "Tenkhenthuong", chitietkhenthuong.Makhenthuong); ViewBag.Manv = new SelectList(db.Thongtinnhansus, "Manv", "Hoten", chitietkhenthuong.Manv); return(View(chitietkhenthuong)); }
// GET: Chitietkhenthuongs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Chitietkhenthuong chitietkhenthuong = db.Chitietkhenthuongs.Find(id); if (chitietkhenthuong == null) { return(HttpNotFound()); } return(View(chitietkhenthuong)); }
// GET: Chitietkhenthuongs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Chitietkhenthuong chitietkhenthuong = db.Chitietkhenthuongs.Find(id); if (chitietkhenthuong == null) { return(HttpNotFound()); } ViewBag.Makhenthuong = new SelectList(db.Khenthuongs, "Makhenthuong", "Tenkhenthuong", chitietkhenthuong.Makhenthuong); ViewBag.Manv = new SelectList(db.Thongtinnhansus, "Manv", "Hoten", chitietkhenthuong.Manv); return(View(chitietkhenthuong)); }