Пример #1
0
        public TicketPaymentViewModel()
        {
            _ticketService  = new TicketService();
            _paymentService = new PaymentService();

            CreditCard = new CreditCard();

            PaymentCommand        = new MvvmHelpers.Commands.AsyncCommand(Payment);
            CreditCardScanCommand = new MvvmHelpers.Commands.AsyncCommand(CreditCardScan);
        }
        public ProcessesFilterViewModel()
        {
            ActionTypes        = new ObservableCollection <ActionType>();
            Places             = new ObservableCollection <Place>();
            Areas              = new ObservableCollection <Area>();
            TimeVsPlanStatuses = new ObservableCollection <string>();

            ClearActionTypeCommand = new Command(
                execute: () =>
            {
                SelectedActionType = null;
            },
                canExecute: () =>
            {
                return(!IsWorking);
            });
            ClearPlaceCommand = new Command(
                execute: () =>
            {
                SelectedPlace = null;
            },
                canExecute: () =>
            {
                return(!IsWorking);
            });
            ClearAreaCommand = new Command(
                execute: () =>
            {
                SelectedArea = null;
            },
                canExecute: () =>
            {
                return(!IsWorking);
            });
            ClearSetCommand = new Command(
                execute: () =>
            {
                SelectedSet = null;
            },
                canExecute: () =>
            {
                return(!IsWorking);
            });
            ClearTimeVsPlanCommand = new Command(
                execute: () =>
            {
                SelectedTimeVsPlanStatus = null;
            },
                canExecute: () =>
            {
                return(!IsWorking);
            });
            ClearAllCommand  = new AsyncCommand(ClearAll);
            SetFilterCommand = new AsyncCommand(SetFilter);
        }
Пример #3
0
 public TicketScanViewModel()
 {
     TicketScanCommand        = new MvvmHelpers.Commands.AsyncCommand(TicketScan);
     TicketTextChangedCommand = new Command(TicketTextChanged);
     TicketPaidHistoryCommand = new Command(TicketPaidHistory);
 }