private void SaveSchedule() { Boolean ret = false; radWaitingBar1.StartWaiting(); SubjectAssignmentServiceClient schedService = new SubjectAssignmentServiceClient(); ret = schedService.CreateSchedule(createdSchedule.ToArray()); foreach (SubjectAssignment sa in createdSchedule) Log("C", "SubjectAssignments",sa); if (ret) { schedules = new List<SubjectAssignment>(schedService.GetAllSchedules()); createdSchedule.Clear(); InitializeLists(); LoadSchedules(); radWaitingBar1.StopWaiting(); MessageBox.Show(this, "Schedule saved successfully!"); } else { radWaitingBar1.StopWaiting(); MessageBox.Show("Error Saving"); } }
private void InitializeLists() { SubjectAssignmentServiceClient schedService = new SubjectAssignmentServiceClient(); scheduleList = new List<SubjectAssignment>(schedService.GetAllSchedules()); gradeLevels = new List<GradeLevel>(schedService.GetAllGradeLevels()); gradeLevels.RemoveAll(x => x.GradeLev == "0"); sections = new List<GradeSection>(schedService.GetAllSections()); }
private void frmScheduleDetails_Load(object sender, EventArgs e) { SubjectAssignmentServiceClient schedService = new SubjectAssignmentServiceClient(); schedules = new List<SubjectAssignment>(schedService.GetAllSchedules()); LoadSchedules(); }