public ActionResult DeleteConfirmed(string id) { PrototypeModel prototypeModel = db.PrototypeModels.Find(id); db.PrototypeModels.Remove(prototypeModel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Acct_Num,Account_Type,Date,Time,Amount,Store,Location,State,Cardholder_Name")] PrototypeModel prototypeModel) { if (ModelState.IsValid) { db.Entry(prototypeModel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(prototypeModel)); }
public ActionResult Create([Bind(Include = "Acct_Num,Account_Type,Date,Time,Amount,Store,Location,State,Cardholder_Name")] PrototypeModel prototypeModel) { if (ModelState.IsValid) { db.PrototypeModels.Add(prototypeModel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(prototypeModel)); }
// GET: PrototypeModels/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PrototypeModel prototypeModel = db.PrototypeModels.Find(id); if (prototypeModel == null) { return(HttpNotFound()); } return(View(prototypeModel)); }