private void UpdateListChoixClient() { ClientsService srvCli = new ClientsService(); List <Client> AllCli = srvCli.GetAllClients(); foreach (Client cli in AllCli) { ClientViewModel newCli = new ClientViewModel(srvCli, cli); ListeChoixClient.Add(newCli); } }
private void NouveauClient() { NewClient nc = new NewClient(); ClientViewModel ncVM = new ClientViewModel(new ClientsService(), new Client()); nc.DataContext = ncVM; nc.ShowDialog(); if (ncVM.ID != 0) { ListeChoixClient.Add(ncVM); CurrentReservation.Client = ncVM; NotifyPropertyChanged("CurrentReservationClient"); } }