Exemplo n.º 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"));
        }
Exemplo n.º 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");
        }
Exemplo n.º 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"));
        }
Exemplo n.º 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");
        }