public GymCustomer(string firstName, string lastName, int trainerId) { GymCustomerFirstName = firstName; GymCustomerLastName = lastName; GymCustomerTableAdapter customerTableAdapter = new GymCustomerTableAdapter(); customerTableAdapter.Insert(GymCustomerFirstName, GymCustomerLastName, trainerId); }
private void Window_Loaded(object sender, RoutedEventArgs e) { gymManagementSystemDatabaseDataSet = ((GymManagementSystemDatabaseDataSet)(this.FindResource("gymManagementSystemDatabaseDataSet"))); roomTableAdapter = new GymRoomTableAdapter(); trainerTableAdapter = new GymTrainerTableAdapter(); customerTableAdapter = new GymCustomerTableAdapter(); trainerWithRoomNameTableAdapter = new GymTrainerWithRoomNameTableAdapter(); equipmentWithRoomNameTableAdapter = new GymEquipmentWithRoomNameTableAdapter(); customerWithTrainerNameTableAdapter = new GymCustomerWithTrainerNameTableAdapter(); trainerFullNamesTableAdapter = new GymTrainerFullNamesTableAdapter(); customerWithExercisePlanTableAdapter = new GymCustomerWithExercisePlanTableAdapter(); customerWithoutExercisePlanTableAdapter = new GymCustomerWithoutExercisePlanTableAdapter(); gymScheduleAvailabilityTableAdapter = new GymScheduleAvailabilityTableAdapter(); allCustomersWithExercisePlanTableAdapter = new AllGymCustomersWithExercisePlansTableAdapter(); upcomingSchedulesByCustomerIdTableAdapter = new UpcomingSchedulesByCustomerIdTableAdapter(); RefreshAllDataTables(); MenuManagementView_Click(sender, e); // TODO: Add code here to load data into the table UpcomingSchedulesByCustomerId. // This code could not be generated, because the gymManagementSystemDatabaseDataSetUpcomingSchedulesByCustomerIdTableAdapter.Fill method is missing, or has unrecognized parameters. GymManagementSystem.GymManagementSystemDatabaseDataSetTableAdapters.UpcomingSchedulesByCustomerIdTableAdapter gymManagementSystemDatabaseDataSetUpcomingSchedulesByCustomerIdTableAdapter = new GymManagementSystem.GymManagementSystemDatabaseDataSetTableAdapters.UpcomingSchedulesByCustomerIdTableAdapter(); System.Windows.Data.CollectionViewSource upcomingSchedulesByCustomerIdViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("upcomingSchedulesByCustomerIdViewSource"))); upcomingSchedulesByCustomerIdViewSource.View.MoveCurrentToFirst(); }