public ActionResult DeleteConfirmed(int id) { DataSetSection dataSetSection = db.DataSetSections.Find(id); db.DataSetSections.Remove(dataSetSection); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DSSID,DataSetSectionShortName,DataSetSectionName,DataSetNameSectionPersian,DataSetNameSectionPashto,FKDSSDataSetID")] DataSetSection dataSetSection) { if (ModelState.IsValid) { db.Entry(dataSetSection).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FKDSSDataSetID = new SelectList(db.DataSetTbls, "DSId", "DataSetShortName", dataSetSection.FKDSSDataSetID); return(View(dataSetSection)); }
// GET: DataSetSections/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DataSetSection dataSetSection = db.DataSetSections.Find(id); if (dataSetSection == null) { return(HttpNotFound()); } return(View(dataSetSection)); }
// GET: DataSetSections/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DataSetSection dataSetSection = db.DataSetSections.Find(id); if (dataSetSection == null) { return(HttpNotFound()); } ViewBag.FKDSSDataSetID = new SelectList(db.DataSetTbls, "DSId", "DataSetShortName", dataSetSection.FKDSSDataSetID); return(View(dataSetSection)); }