Ejemplo n.º 1
0
 //[HttpPost]
 //[ValidateAntiForgeryToken]
 public ActionResult Reciept(RecieptViewModel checkOutVehicle)
 {
     if (ModelState.IsValid)
     {
         return(View(checkOutVehicle));
     }
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            ParkedVehicle parkedVehicle = db.ParkedVehicles.Find(id);

            db.ParkedVehicles.Remove(parkedVehicle);
            db.SaveChanges();
            RecieptViewModel CheckOutVehicle = new RecieptViewModel
            {
                Id        = parkedVehicle.Id,
                Type      = parkedVehicle.Type,
                RegNr     = parkedVehicle.RegNr,
                TimeStamp = parkedVehicle.TimeStamp,
            };

            return(RedirectToAction("Reciept", CheckOutVehicle));
        }