private void ShowAll()
        {
            List <DataBaseTournament> list = DataBaseTournament.GetTourtnaments();

            Tournaments     = new ObservableCollection <TournamentsViewModel>(list.Select(b => new TournamentsViewModel(b)));
            FullTournaments = Tournaments;
        }
        public ViewModelGetRequest()
        {
            ShowList       = new RelayCommand(arg => OpenList(), arg => CanOpenList());
            ShowAll        = new RelayCommand(arg => OpenAll());
            SelectPhoto    = new RelayCommand(arg => SelectPh());
            SavePlayer     = new RelayCommand(arg => Save(), arg => CanSave());
            DeletePlayer   = new RelayCommand(arg => Delete(), arg => CanDelete());
            Collection     = new ObservableCollection <DataBaseViewModel>();
            FullCollection = Collection;
            Tournaments    = new ObservableCollection <DataBaseTournament>();
            var lst = DataBaseTournament.GetTourtnaments();

            Tournaments = new ObservableCollection <DataBaseTournament>(lst);
            //SelectedCellChangedCommand = new MyCommand(SelectedCellChanged);
        }
 public TournamentsViewModel(DataBaseTournament db)
 {
     Payment        = db.Payment;
     IsOnline       = db.IsOnline;
     Date           = db.Date;
     DATE           = db.DATE;
     City           = db.City;
     Organization   = db.Organization;
     TournamentName = db.TournamentName;
     WinRatio       = db.WinRatio;
     Players        = db.Players;
     FirstPlace     = db.FirstPlace;
     SecondPlace    = db.SecondPlace;
     ThirdPlace     = db.ThirdPlace;
     isChecked      = db.isChecked;
     Place          = db.Place;
     CountPlayers   = db.CountPlayers;
     CountPlace     = db.CountPlayers;
 }
 private void Show()
 {
     try
     {
         DateTime DOB;
         if (Date == null)
         {
             DOB = default(DateTime);
         }
         else
         {
             DOB = DateTime.Parse(Date);
         }
         List <DataBaseTournament> list = DataBaseTournament.GetTourtnaments(Payment, false, DOB, City, Organization, TournamentName);
         Tournaments     = new ObservableCollection <TournamentsViewModel>(list.Select(b => new TournamentsViewModel(b)));
         FullTournaments = Tournaments;
     }
     catch (Exception ex)
     {
         List <DataBaseTournament> list = DataBaseTournament.GetTourtnaments();
         Tournaments     = new ObservableCollection <TournamentsViewModel>(list.Select(b => new TournamentsViewModel(b)));
         FullTournaments = Tournaments;
     }
 }