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 AjoutUtilisateurViewModel() { _usagerBusiness = new UsagerBusiness(); _utilisateurBusiness = new UtilisateurBusiness(); _validateAddingUtilisateur = new RelayCommand(() => AddingUtilisateur(), o => true); try { foreach (Usager usager in _usagerBusiness.GetAllUsagersNonUtilisateur()) { _collectionUsager.Add(usager); } } catch (Exception ex) { DialogService.ShowErrorWindow(ex.Message); } }
public UserControlUsagerViewModel() { _usagerBusiness = new UsagerBusiness(); _availableMoyenDePaiement = _usagerBusiness.GetAllMoyenDePaiements(); _openModifyingMoyenDePaiementWindow = new RelayCommand(() => DialogService.ShowYesNoWindow("Etes-vous sûr de vouloir modifier le moyen de paiement de " + SelectedUsager.Titre + " " + SelectedUsager.Nom + "\n" + SelectedUsager.Paiement + " => " + SelectedMoyenDePaiement, new Action(ModifyMoyenDePaiement)), o => true); try { foreach (Usager usager in _usagerBusiness.GetAllUsagers()) { _collectionUsager.Add(usager); } } catch (Exception ex) { DialogService.ShowErrorWindow(ex.Message); } }