public ActionResult DeleteConfirmed(int id) { PhaseModels phaseModels = db.PhaseModels.Find(id); db.PhaseModels.Remove(phaseModels); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeletePhase(PhaseModels model) { var id = model.Id; PhaseModels phaseModels = db.PhaseModels.Find(id); phaseModels.Deleted = DateTime.Now; db.PhaseModels.AddOrUpdate(phaseModels); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,PhaseName")] PhaseModels phaseModels) { if (ModelState.IsValid) { db.Entry(phaseModels).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(phaseModels)); }
public ActionResult Create([Bind(Include = "Id,PhaseName")] PhaseModels phaseModels) { if (ModelState.IsValid) { db.PhaseModels.Add(phaseModels); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(phaseModels)); }
// GET: Phase/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PhaseModels phaseModels = db.PhaseModels.Find(id); if (phaseModels == null) { return(HttpNotFound()); } return(View(phaseModels)); }