Beispiel #1
0
        public App()
        {
            //ICollectionView v1 = CollectionViewSource.GetDefaultView(MembersRepository.GetAll());
            //ICollectionView v2 = CollectionViewSource.GetDefaultView(MembersRepository.GetAll());

            MemberWindow mw = new MemberWindow();
            MembersViewModel mvm = new MembersViewModel();
            mw.DataContext = mvm;
            mw.grdData.DataContext= mvm.Members;
            mw.Show();
        }
Beispiel #2
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     MembersRepository.Delete(membersView.CurrentPosition);
     MembersViewModel mvm = new MembersViewModel();
     mvm.PositionAfterDelete();
     if (membersView.IsEmpty)
     {
         grdData.Visibility = Visibility.Hidden;
         grdNodata.Visibility = Visibility.Visible;
     }
 }
Beispiel #3
0
 public DeleteCommand(MembersViewModel parent)
 {
     _parent = parent;
 }
Beispiel #4
0
 public MemberWindow()
 {
     InitializeComponent();
     membersView = CollectionViewSource.GetDefaultView(MembersRepository.GetAll());
     mvm = new MembersViewModel();
 }