示例#1
0
        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");
            }
        }
示例#2
0
 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());
 }
示例#3
0
 private void frmScheduleDetails_Load(object sender, EventArgs e)
 {
     SubjectAssignmentServiceClient schedService = new SubjectAssignmentServiceClient();
     schedules = new List<SubjectAssignment>(schedService.GetAllSchedules());
     LoadSchedules();
 }