public bool AddTeams(Team[] teamsToAdd, int[] deletedTeams) { StoredProcedureDataContext dbmlObject = new StoredProcedureDataContext(); for (int i = 0; i < deletedTeams.Length; i++) { dbmlObject.DeleteTeam(deletedTeams[i]); } for (int i = 0; i < teamsToAdd.Length; i++) { dbmlObject.AddTeams(teamsToAdd[i].TeamName, teamsToAdd[i].CompanyID); } dbmlObject.SubmitChanges(); return true; }
public bool AddTeams(Team[] teamsToAdd, int[] deletedTeams) { StoredProcedureDataContext dbmlObject = new StoredProcedureDataContext(); for (int i = 0; i < deletedTeams.Length; i++) { dbmlObject.DeleteTeam(deletedTeams[i]); } for (int i = 0; i < teamsToAdd.Length; i++) { dbmlObject.AddTeams(teamsToAdd[i].TeamName, teamsToAdd[i].CompanyID); } dbmlObject.SubmitChanges(); return(true); }