Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
            }
        }