public ActionResult DeleteConfirmed(int id) { SurveyHeader surveyheader = db.SurveyHeader.Find(id); db.SurveyHeader.Remove(surveyheader); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /SurveyHeader/Details/5 public ActionResult Details(int id = 0) { SurveyHeader surveyheader = db.SurveyHeader.Find(id); if (surveyheader == null) { return(HttpNotFound()); } return(View(surveyheader)); }
public ActionResult Edit(SurveyHeader surveyheader) { if (ModelState.IsValid) { db.Entry(surveyheader).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.OrganizationID = new SelectList(db.Organization, "ID", "Name", surveyheader.OrganizationID); return(View(surveyheader)); }
// // GET: /SurveyHeader/Edit/5 public ActionResult Edit(int id = 0) { SurveyHeader surveyheader = db.SurveyHeader.Find(id); if (surveyheader == null) { return(HttpNotFound()); } ViewBag.OrganizationID = new SelectList(db.Organization, "ID", "Name", surveyheader.OrganizationID); return(View(surveyheader)); }
public ActionResult Create(SurveyHeader surveyheader) { if (ModelState.IsValid) { db.SurveyHeader.Add(surveyheader); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.OrganizationID = new SelectList(db.Organization, "ID", "Name", surveyheader.OrganizationID); return(View(surveyheader)); }