private void NavToSection()
 {
     SelectedSection = null;
     AddEditMode     = false;
     Levels          = new ObservableCollection <Level>(_levelsRepository.GetLevels());
     if (Levels.Any())
     {
         SelectedLevelId = SelectedLevelId;
     }
     AddEditSectionViewModel.Initialize();
     AddEditSectionViewModel = addEditSectionViewModel;
 }
Пример #2
0
 public void PopulateComboBox()
 {
     Levels = new ObservableCollection <Level>(_levelsRepository.GetLevels());
     if (Levels.Any() && !EditMode)
     {
         SelectedLevelId = Levels.FirstOrDefault().LevelID;
     }
     else if (Levels.Any() && EditMode)
     {
         SelectedLevelId   = Student.LevelID;
         SelectedSectionId = Student.SectionID;
     }
 }
        public void LoadComboBox()
        {
            Levels = new ObservableCollection <Level>(_levelsRepository.GetLevels());
            if (Levels.Any())
            {
                SelectedLevelId = Levels.FirstOrDefault().LevelID;
            }

            SearchCriteria = new List <string>();
            SearchCriteria.Add("Student ID");
            SearchCriteria.Add("First Name");
            SearchCriteria.Add("Last Name");
            SelectedSearch = SearchCriteria[0];
        }