Beispiel #1
0
        public ActionResult EditRole(UserRole role)
        {
            UserDomainLogic userDomainLogic = new UserDomainLogic();
            Message         message         = new Message();

            if (userDomainLogic.UpdateRole(role))
            {
                ModelState.Clear();
                role = new UserRole();
                message.MessageText = "Role updated successfully.";
                message.MessageType = MessageType.Success;
            }
            else
            {
                message.MessageText = "Role already exists.";
                message.MessageType = MessageType.Error;
            }
            return(Json(message, JsonRequestBehavior.AllowGet));;
        }