예제 #1
0
        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);
            }
        }
예제 #2
0
        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");
            }
        }