public ActionResult DeleteConfirmed(int id) { drivercheckinMk2 drivercheckinMk2 = db.drivercheckinMk2.Find(id); db.drivercheckinMk2.Remove(drivercheckinMk2); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "drivercheckin,email,dateandtime,address,lognlat,comment,testtext,testtexts")] drivercheckinMk2 drivercheckinMk2) { if (ModelState.IsValid) { db.Entry(drivercheckinMk2).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(drivercheckinMk2)); }
// GET: drivercheckinMk2/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } drivercheckinMk2 drivercheckinMk2 = db.drivercheckinMk2.Find(id); if (drivercheckinMk2 == null) { return(HttpNotFound()); } return(View(drivercheckinMk2)); }
public ActionResult Create([Bind(Include = "drivercheckin,email,dateandtime,address,lognlat,comment,testtext,testtexts")] drivercheckinMk2 drivercheckinMk2) { if (ModelState.IsValid) { drivercheckinMk2.email = User.Identity.Name; drivercheckinMk2.dateandtime = DateTime.Now; drivercheckinMk2.lognlat = drivercheckinMk2.testtexts; drivercheckinMk2.address = drivercheckinMk2.testtext; db.drivercheckinMk2.Add(drivercheckinMk2); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(drivercheckinMk2)); }