public UserControlEditTicketViewModel() { Messenger.Default.Register <Tuple <Utilisateur, Tuple <List <Plat>, float> > >(this, (msg) => GetData(msg)); CanPay = false; _usagerBusiness = new UsagerBusiness(); _commandeBusiness = new CommandeBusiness(); _validateCarte = new RelayCommand(() => CheckCarte(), o => true); _validatePaiement = new RelayCommand(() => Pay(), o => true); }
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); } }