Beispiel #1
0
        public ActionResult Display(int id)
        {
            Chofer chofer = AdminChofer.GetChofer(id);

            if (chofer != null)
            {
                return(View("Display", chofer));
            }
            return(HttpNotFound());
        }
Beispiel #2
0
 public ActionResult Update(Chofer chofer)
 {
     if (!ModelState.IsValid)
     {
         return(View("Update", chofer));
     }
     else
     {
         AdminChofer.Update(chofer);
         return(RedirectToAction("Index"));
     }
 }
Beispiel #3
0
 public ActionResult Create(Auto auto)
 {
     auto.Chofer = AdminChofer.GetChofer(auto.Chofer.ChoferID);
     if (!ModelState.IsValid)
     {
         return(View("Create", auto));
     }
     else
     {
         AdminAuto.Create(auto);
         return(RedirectToAction("Index"));
     }
 }
Beispiel #4
0
        public ActionResult Update(int id)
        {
            Chofer c = AdminChofer.GetChofer(id);

            return(View("Update", c));
        }
Beispiel #5
0
        public ActionResult _ChoferDropdown()
        {
            List <Chofer> choferes = AdminChofer.GetChoferes();

            return(PartialView("_ChoferList", choferes));
        }
Beispiel #6
0
        public ActionResult _ChoferList(int number = 0)
        {
            List <Chofer> choferes = AdminChofer.GetChoferes();

            return(PartialView("_ChoferList", choferes));
        }
Beispiel #7
0
        // GET: Chofer
        public ActionResult Index()
        {
            List <Chofer> choferes = AdminChofer.GetChoferes();

            return(View(choferes));
        }
Beispiel #8
0
 public ActionResult DeleteConfirmed(int id)
 {
     AdminChofer.Delete(id);
     return(RedirectToAction("Index"));
 }