public void TcUpdatePGroupUser() { List <User> listUser = _provider.getAllUser(); List <User> user = new List <User>(); listUser[0].Checked = true; listUser[1].Checked = true; user.Add(listUser[0]); user.Add(listUser[1]); Assert.AreEqual(_provider.updatePGroupUser(4, user.ToArray()), true); Assert.AreEqual(_provider.updatePGroupUser(1000, user.ToArray()), false); }
public JsonResult UpdatePGoupUser(int ID, User[] ListUser) { try { return(Json(new { success = _provider.updatePGroupUser(ID, ListUser) })); } catch (Exception ex) { return(Json(new { success = false, content = ex.Message.ToString() })); } }