public int UpdateGroup(string GroupID, string RoleID, string[] AddList, string[] RemoveList) { int retval = 0; int gid = Convert.ToInt32(GroupID); int rid = Convert.ToInt32(RoleID); try { using (AssociateConnDataContext asscon = new AssociateConnDataContext()) { if (AddList[0] != "none") { foreach (string AssociateID in AddList) { int id = Convert.ToInt32(AssociateID); retval = asscon.AddToGroup(id, gid, rid); } } //if (RemoveList[0] != "none") //{ // foreach (string AssociateID in RemoveList) // { // int id = Convert.ToInt32(AssociateID); // retval = asscon.RemoveFromGroup(id, gid, rid); // } //} } } catch (Exception ex) { throw ex; } return retval; }