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

            if (chofer != null)
            {
                return(View("Display", chofer));
            }
            return(HttpNotFound());
        }
示例#2
0
 public ActionResult Update(Chofer chofer)
 {
     if (!ModelState.IsValid)
     {
         return(View("Update", chofer));
     }
     else
     {
         AdminChofer.Update(chofer);
         return(RedirectToAction("Index"));
     }
 }
示例#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"));
     }
 }
示例#4
0
        public ActionResult Update(int id)
        {
            Chofer c = AdminChofer.GetChofer(id);

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

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

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

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