public ActionResult DeleteConfirmed(int id) { ExpectedWeightLoss expectedWeightLoss = db.ExpectedWeightLosses.Find(id); db.ExpectedWeightLosses.Remove(expectedWeightLoss); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,UserID,Weight1,Weight2,Weight3,Weight4,Weight5,Weight6,Weight7,Weight8,Weight9,Weight10,Weight11,Weight12,Weight13,Weight14,Weight15")] ExpectedWeightLoss expectedWeightLoss) { if (ModelState.IsValid) { db.Entry(expectedWeightLoss).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(expectedWeightLoss)); }
public ActionResult Create([Bind(Include = "ID,UserID,Weight1,Weight2,Weight3,Weight4,Weight5,Weight6,Weight7,Weight8,Weight9,Weight10,Weight11,Weight12,Weight13,Weight14,Weight15")] ExpectedWeightLoss expectedWeightLoss) { if (ModelState.IsValid) { db.ExpectedWeightLosses.Add(expectedWeightLoss); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(expectedWeightLoss)); }
// GET: ExpectedWeightLosses/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExpectedWeightLoss expectedWeightLoss = db.ExpectedWeightLosses.Find(id); if (expectedWeightLoss == null) { return(HttpNotFound()); } return(View(expectedWeightLoss)); }