public ActionResult DeleteConfirmed(int id) { HearingMst hearingMst = db.HearingMsts.Find(id); db.HearingMsts.Remove(hearingMst); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,CaseMstID,CurrentDate,NextDate")] HearingMst hearingMst) { if (ModelState.IsValid) { db.Entry(hearingMst).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CaseMstID = new SelectList(db.CaseMsts, "ID", "Name", hearingMst.CaseMstID); return(View(hearingMst)); }
public ActionResult Create([Bind(Include = "ID,CaseMstID,CurrentDate,NextDate")] HearingMst hearingMst) { if (ModelState.IsValid) { db.HearingMsts.Add(hearingMst); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CaseMstID = new SelectList(db.CaseMsts, "ID", "Name", hearingMst.CaseMstID); return(View(hearingMst)); }
// GET: HearingMsts/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HearingMst hearingMst = db.HearingMsts.Find(id); if (hearingMst == null) { return(HttpNotFound()); } return(View(hearingMst)); }
// GET: HearingMsts/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HearingMst hearingMst = db.HearingMsts.Find(id); if (hearingMst == null) { return(HttpNotFound()); } ViewBag.CaseMstID = new SelectList(db.CaseMsts, "ID", "Name", hearingMst.CaseMstID); return(View(hearingMst)); }