Beispiel #1
0
        public ActionResult Create(Roles BS)
        {
            if (ModelState.IsValid)
            {
                string InsertUser = User.Identity.GetUserName();

                var r = RolesBL.Create(BS, InsertUser);

                if (!r)
                {
                    ViewBag.Mensaje = "Ha ocurrido un error inesperado.";
                    return(View("~/Views/Shared/Error.cshtml"));
                }
                else
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(View(BS));
        }