public ActionResult DeleteConfirmed(string id) { DiemCTHKy diemCTHKy = db.DiemCTHKys.Find(id); db.DiemCTHKys.Remove(diemCTHKy); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MaMon,MSSV,ID_HocKi,DiemTH,DiemQT,DiemThi1,DiemThi2,TiLeDiemTH,TiLeDiemQT,TiLeDiemThi1,TiLeDiemThi2,DiemTKHe10,DiemTKHe4,DiemTKChu")] DiemCTHKy diemCTHKy) { if (ModelState.IsValid) { db.Entry(diemCTHKy).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MSSV = new SelectList(db.DiemHocKys, "MSSV", "MSSV", diemCTHKy.MSSV); ViewBag.MaMon = new SelectList(db.MonHocs, "MaMon", "TenMon", diemCTHKy.MaMon); return(View(diemCTHKy)); }
// GET: Admin/DiemCTHKies/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DiemCTHKy diemCTHKy = db.DiemCTHKys.Find(id); if (diemCTHKy == null) { return(HttpNotFound()); } return(View(diemCTHKy)); }
// GET: Admin/DiemCTHKies/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DiemCTHKy diemCTHKy = db.DiemCTHKys.Find(id); if (diemCTHKy == null) { return(HttpNotFound()); } ViewBag.MSSV = new SelectList(db.DiemHocKys, "MSSV", "MSSV", diemCTHKy.MSSV); ViewBag.MaMon = new SelectList(db.MonHocs, "MaMon", "TenMon", diemCTHKy.MaMon); return(View(diemCTHKy)); }