Exemplo n.º 1
0
        public JsonResult SaveRole(string guid = "")
        {
            string roleName    = Request["roleName"].ToString();
            string roleDesc    = Request["roleDesc"].ToString();
            string permissions = Request["permissions"].ToString();

            if (string.IsNullOrWhiteSpace(guid))
            {
                _roleFactory.AddRole(roleName, roleDesc, permissions);
            }
            else
            {
                _roleFactory.Save(guid, roleName, roleDesc, permissions);
            }
            return(Json(new { result = 1 }));
        }