public ActionResult DeleteConfirmed(int id) { DSTRCT dSTRCT = db.DSTRCTs.Find(id); db.DSTRCTs.Remove(dSTRCT); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "districtid,adaid,districtname")] DSTRCT dSTRCT) { if (ModelState.IsValid) { db.Entry(dSTRCT).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.adaid = new SelectList(db.ADAs, "adaid", "adaname", dSTRCT.adaid); return(View(dSTRCT)); }
public ActionResult Create([Bind(Include = "districtid,adaid,districtname")] DSTRCT dSTRCT) { if (ModelState.IsValid) { db.DSTRCTs.Add(dSTRCT); db.SaveChanges(); return(RedirectToAction("Create")); } ViewBag.adaid = new SelectList(db.ADAs, "adaid", "adaname", dSTRCT.adaid); return(View(dSTRCT)); }
// GET: DSTRCTs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DSTRCT dSTRCT = db.DSTRCTs.Find(id); if (dSTRCT == null) { return(HttpNotFound()); } return(View(dSTRCT)); }
// GET: DSTRCTs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DSTRCT dSTRCT = db.DSTRCTs.Find(id); if (dSTRCT == null) { return(HttpNotFound()); } ViewBag.adaid = new SelectList(db.ADAs, "adaid", "adaname", dSTRCT.adaid); return(View(dSTRCT)); }