public JsonResult RemoveAuthInGroup(int groupAuthId) { string result = new GroupSv().RemoveAuthInGroup(groupAuthId); if (!string.IsNullOrEmpty(result)) { return(Json(new ResultModel() { suc = false, msg = result })); } return(Json(new ResultModel() { suc = true })); }
public JsonResult UpdateGroup(int id, FormCollection col) { string name = col.Get("groupName"); string description = col.Get("description"); string result = new GroupSv().UpdateGroup(id, name, description); if (!string.IsNullOrEmpty(result)) { return(Json(new ResultModel() { suc = false, msg = result }, "text/html")); } return(Json(new ResultModel() { suc = true }, "text/html")); }
public JsonResult AddAuthInGroup(int groupId, string auth) { string[] auths = auth.Split(','); string result = ""; foreach (string au in auths) { int autId = Int32.Parse(au); result = new GroupSv().AddAuthInGroup(groupId, autId); if (!string.IsNullOrEmpty(result)) { return(Json(new ResultModel() { suc = false, msg = result })); } } return(Json(new ResultModel() { suc = true })); }
public JsonResult AddUserInGroup(int groupId, string users) { string[] userArr = users.Split(','); string result = ""; foreach (string user in userArr) { int userId = Int32.Parse(user); result = new GroupSv().AddUserInGroup(groupId, userId); if (!string.IsNullOrEmpty(result)) { return(Json(new ResultModel() { suc = false, msg = result })); } } return(Json(new ResultModel() { suc = true })); }