public DictionaryTypeViewModel(DictionaryTypeEditWindow dictionaryEditWindow, DictionaryType SelectedDictionaryType) { this.SelectedDictionaryType = SelectedDictionaryType; SelectedDictionaryType.IsSessionGroup = true; this.SourceWindow = dictionaryEditWindow; this.SaveCommand = new RelayCommand(SaveDictionaryType, CanExecute); this._contextDal = new DictionaryTypeDAL(); }
private void EditDictionaryType(object param) { DictionaryTypeEditWindow target = new DictionaryTypeEditWindow((DictionaryType)((DataGrid)param).SelectedItem) { Owner = this.SourceWindow }; SwitchWindows(target, true); this.DictionaryList = ReloadDictionaryList(); }
private void CreateDictionaryType() { DictionaryType dictionaryType = new DictionaryType(); DictionaryTypeEditWindow target = new DictionaryTypeEditWindow(dictionaryType) { Owner = this.SourceWindow }; SwitchWindows(target, true); this.DictionaryTypeList = ReloadDictionaryTypeList(); }