public ActionResult DeleteConfirmed(int id) { OwnersInformation ownersInformation = db.OwnersInformations.Find(id); db.OwnersInformations.Remove(ownersInformation); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TicketNumber,FirstName,LastName,Make,Model,Color,LicensePlate,ParkedLocation,ParkedBy,exp")] OwnersInformation ownersInformation) { if (ModelState.IsValid) { db.Entry(ownersInformation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ParkedBy = new SelectList(db.Drivers, "DriversId", "Firstname", ownersInformation.ParkedBy); return(View(ownersInformation)); }
public ActionResult Create([Bind(Include = "TicketNumber,FirstName,LastName,Make,Model,Color,LicensePlate,ParkedLocation,ParkedBy,exp")] OwnersInformation ownersInformation) { if (ModelState.IsValid) { ownersInformation.Arrival = DateTime.Now; db.OwnersInformations.Add(ownersInformation); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ParkedBy = new SelectList(db.Drivers, "DriversId", "Firstname", ownersInformation.ParkedBy); return(View(ownersInformation)); }
// GET: OwnersInformations/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OwnersInformation ownersInformation = db.OwnersInformations.Find(id); if (ownersInformation == null) { return(HttpNotFound()); } return(View(ownersInformation)); }
// GET: OwnersInformations/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OwnersInformation ownersInformation = db.OwnersInformations.Find(id); if (ownersInformation == null) { return(HttpNotFound()); } ViewBag.ParkedBy = new SelectList(db.Drivers, "DriversId", "Firstname", ownersInformation.ParkedBy); return(View(ownersInformation)); }