private void UpdateCommandeCollection() { _collectionPlatOfSelectedCommande.Clear(); _collectionCommande.Clear(); try { _commandeBusiness.GetAllCommandes().ForEach(c => _collectionCommande.Add(c)); } catch (Exception ex) { DialogService.ShowErrorWindow(ex.Message); } }
public UserControlFactureViewModel() { _commandeBusiness = new CommandeBusiness(); _platBusiness = new PlatBusiness(); _deleteCommand = new RelayCommand(() => DeletePlatFromCommande(), o => true); try { foreach (Commande c in _commandeBusiness.GetAllCommandes()) { _collectionCommande.Add(c); } } catch (Exception ex) { DialogService.ShowErrorWindow(ex.Message); } }