示例#1
0
        public ActionResult Edit(Guid id, DriverForm driverForm)
        {
            if (!ModelState.IsValid)
            {
                return(View(driverForm));
            }

            _driverService.Edit(driverForm.ToDriver());

            return(RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Editado"));
        }
        public ActionResult Create(DriverForm driverForm)
        {
            if (!ModelState.IsValid)
            {
                return View(driverForm);
            }

            var driver = driverForm.ToDriver();

            _driverService.Create(driver);

            return RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Creado");
        }
示例#3
0
        public ActionResult Create(DriverForm driverForm)
        {
            if (!ModelState.IsValid)
            {
                return(View(driverForm));
            }

            var driver = driverForm.ToDriver();

            _driverService.Create(driver);

            return(RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Creado"));
        }
        public ActionResult Edit(Guid id, DriverForm driverForm)
        {
            if (!ModelState.IsValid)
            {
                return View(driverForm);
            }

            _driverService.Edit(driverForm.ToDriver());

            return RedirectToAction("Index", new DriverListFiltersModel().GetRouteValues()).WithSuccess("Conductor Editado");
        }