Пример #1
0
        public ActionResult Edit(Guid id, BarnForm barnForm)
        {
            if (!ModelState.IsValid)
            {
                return(View(barnForm));
            }

            _barnService.Edit(barnForm.ToBarn());

            return(RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Editado"));
        }
Пример #2
0
        public ActionResult Create(BarnForm barnForm)
        {
            if (!ModelState.IsValid)
            {
                return View(barnForm);
            }

            var barn = barnForm.ToBarn();

            _barnService.Create(barn);

            return RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Creado");
        }
Пример #3
0
        public ActionResult Create(BarnForm barnForm)
        {
            if (!ModelState.IsValid)
            {
                return(View(barnForm));
            }

            var barn = barnForm.ToBarn();

            _barnService.Create(barn);

            return(RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Creado"));
        }
Пример #4
0
        public ActionResult Edit(Guid id, BarnForm barnForm)
        {
            if (!ModelState.IsValid)
            {
                return View(barnForm);
            }

            _barnService.Edit(barnForm.ToBarn());

            return RedirectToAction("Index", new BarnListFiltersModel().GetRouteValues()).WithSuccess("Galpón Editado");
        }