public static double GetTotalCommandesForClient(Client client)
 {
     if (_commandes != null && _commandes.Any())
     {
         var cdes = _commandes.Where(c => c.NumeroClient == client.NumeroClient);
         if (cdes.Any())
         {
             return cdes.Sum(c => c.TotalCommande);
         }
     }
     return 0;
 }
 public static void Save(Client client)
 {
     if (_clients!= null && _clients.Any())
     {
         var clts = _clients.Where(c => c.Id == client.Id);
         if (clts.Any())
         {
             clts.First().Nom = client.Nom;
             clts.First().Ville = client.Ville;
             clts.First().NumeroClient = client.NumeroClient;
         }
     }
 }
 public ListCommandesPageViewModel(Client client)
 {
     AddCommand = new RelayCommand(Add);
     _clientCurrent = client;
 }
 public ClientPageViewModel(Client client)
 {
     ClientCurrent = client;
     SaveCommand = new RelayCommand(Save);
     LoadCommandesCommand = new RelayCommand(LoadCommandes);
 }