예제 #1
0
 private void ShowAddGerecht()
 {
     SelectedGerecht = new GerechtVM();
     RaisePropertyChanged("SelectedGerecht");
     addGerechtWindow = new AddGerecht();
     addGerechtWindow.Show();
 }
예제 #2
0
 private void ShowAddGerecht()
 {
     SelectedGerecht = new GerechtVM();
     RaisePropertyChanged("SelectedGerecht");
     addGerechtWindow = new AddGerecht();
     addGerechtWindow.Show();
 }
예제 #3
0
        public MainViewModel()
        {
            ShowAddGerechtCommand = new RelayCommand(ShowAddGerecht);
            SaveGerechtCommand = new RelayCommand(SaveGerecht);
            SelectedGerecht = new GerechtVM();

            context = new MyContext();

            //1. ophalen gerechten
            IEnumerable<GerechtVM> gerechten = context.Gerechten
                .ToList().Select(g => new GerechtVM(g));
            Gerechten = new ObservableCollection<GerechtVM>(gerechten);
        }
예제 #4
0
        public MainViewModel()
        {
            ShowAddGerechtCommand = new RelayCommand(ShowAddGerecht);
            SaveGerechtCommand    = new RelayCommand(SaveGerecht);
            SelectedGerecht       = new GerechtVM();

            context = new MyContext();

            //1. ophalen gerechten
            IEnumerable <GerechtVM> gerechten = context.Gerechten
                                                .ToList().Select(g => new GerechtVM(g));

            Gerechten = new ObservableCollection <GerechtVM>(gerechten);
        }