public void DeleteDictionaryType(DictionaryType param) { RefreshContext(); DictionaryTypeDAL dtd = new DictionaryTypeDAL(); dtd.LogicalDelete(param); }
public SessionGroupEditViewModel(SessionGroupEditWindow sessionGroupEditWindow, SessionGroup selectedSessionGroup) { this.SourceWindow = sessionGroupEditWindow; this._contextDal = new SessionGroupDAL(); this.SelectedSessionGroup = selectedSessionGroup; this.SaveCommand = new RelayCommand(SaveSessionGroup, CanExecute); this.TeacherList = new ObservableCollection <Teacher>(((SessionGroupDAL)_contextDal).TeacherList); this.SemesterList = new ObservableCollection <Semester>(((SessionGroupDAL)_contextDal).SemesterList); this.DictionaryDal = new DictionaryTypeDAL(); this.SessionGroupTypes = new ObservableCollection <DictionaryType>(DictionaryDal.FindAll(x => x.IsSessionGroup != null && x.IsSessionGroup == true)); if (SelectedSessionGroup.Semester == null) { if (SemesterList.Where(x => x.IsActive).SingleOrDefault() != null) { this.SelectedSessionGroup.SemesterID = SemesterList.Where(x => x.IsActive).FirstOrDefault().ID; GenerateTeams = true; } } if (SelectedSessionGroup.ID != 0) { SelectedSessionGroupTypeID = SessionGroupTypes.First().ID; } }
public DictionaryDAL() { this.DictionaryTypeDal = new DictionaryTypeDAL(); }