Esempio n. 1
0
        public JsonResult Modify(string RoleName, string Id)
        {
            var result = false;

            try
            {
                var model = new IdentityRole();
                if (!Id.Equals("0"))
                {
                    model.Id = Id;
                }
                model.Name = RoleName;
                result     = _roleServices.AddOrUpdateRole(model);
                return(Json(new MessageResults {
                    Status = "Success"
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(new MessageResults {
                    Status = "Error"
                }, JsonRequestBehavior.AllowGet));
            }
        }