Beispiel #1
0
        private bool LoadTermSY()
        {
            currentTermSY = Db.GetCurrentTermSY(SQL.ConString);

            if (currentTermSY != null)
            {
                gridTable.Visibility          = Visibility.Visible;
                gridTable.IsEnabled           = true;
                lblNotAvailable.Visibility    = Visibility.Hidden;
                btnSections.IsEnabled         = true;
                btnSections.Visibility        = Visibility.Visible;
                cbEnrollmentStatus.Visibility = Visibility.Visible;
                cbEnrollmentStatus.IsEnabled  = true;
                return(true);
            }
            else
            {
                gridTable.Visibility          = Visibility.Hidden;
                gridTable.IsEnabled           = false;
                lblNotAvailable.Visibility    = Visibility.Visible;
                btnSections.IsEnabled         = false;
                btnSections.Visibility        = Visibility.Hidden;
                cbEnrollmentStatus.Visibility = Visibility.Hidden;
                cbEnrollmentStatus.IsEnabled  = false;
                return(false);
            }
        }
 public EnrollmentSectionView(Student student, TermSchoolYear currentTermSY, DataTable dtInclude)
 {
     InitializeComponent();
     LoadBaseSchedule();
     myStudent      = student;
     this.dtInclude = dtInclude;
     dtInclude.Columns.Add("SectionCode", typeof(string));
     this.currentTermSY            = currentTermSY;
     dgIncludedCourses.ItemsSource = dtInclude.DefaultView;
     LoadTimeSlot();
 }
 private void cbTermSY_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (cbTermSY.SelectedIndex != -1)
     {
         LoadCourseSchedules(lTermSY[cbTermSY.SelectedIndex].ID);
         tbCourse.Text = "Search Course";
         TermSchoolYear selectedTermSY  = lTermSY[cbTermSY.SelectedIndex];
         string         strTermStartEnd = string.Format("Term Duration: {0} - {1}", selectedTermSY.DateStart.ToString("MMMM dd, yyyy"), selectedTermSY.DateEnd.ToString("MMMM dd, yyyy"));
         statusTermStartEnd.Content = strTermStartEnd;
     }
 }
Beispiel #4
0
        public StudentEnrollmentView()
        {
            InitializeComponent();
            currentTermSY = Db.GetCurrentTermSY(SQL.ConString);

            if (currentTermSY == null)
            {
                MessageBox.Show("Enrollment has not yet started!", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
                this.Close();
            }
            else
            {
                lblTermSY.Content = currentTermSY.TermSY;
                tbSearchStudentNumber.Focus();
                dgEnrolledCourses.ItemsSource = enrolledCourses;
            }
        }