/* * Pre: * Post: Adds the new audtion to the database and updates all * coordinate information for the student */ public bool addToDatabase() { bool success = DbInterfaceStudentAudition.CreateStudentDistrictAudition(this); if (success) { //create coordinates if (coordinates.Count > 0) { success = success && createCoordinateRides(); } //update coordinate rides that already exist for the student List <int> existingAuditionIds = DbInterfaceStudentAudition.GetStudentDistrictAuditionIds(yearId); success = success && DbInterfaceStudentAudition.UpdateExistingCoordinates(existingAuditionIds); } return(success); }