public EditPaymentMethodFlyoutViewModel(IPaymentMethodUserControlViewModel paymentMethodUserControlViewModel, ICheckoutDataRepository checkoutDataRepository)
 {
     _checkoutDataRepository = checkoutDataRepository;
     _viewModel = paymentMethodUserControlViewModel;
     SaveCommand = new DelegateCommand(SavePaymentInfo);
     GoBackCommand = new DelegateCommand(() => GoBack(), () => true);
 }
 public PaymentMethodFlyoutViewModel(IPaymentMethodUserControlViewModel paymentMethodViewModel, IResourceLoader resourceLoader)
 {
     _paymentMethodViewModel = paymentMethodViewModel;
     _resourceLoader = resourceLoader;
     
     SaveCommand = new DelegateCommand(SavePaymentMethod);
     GoBackCommand = new DelegateCommand(() => GoBack());
 }
        public PaymentMethodPageViewModel(IPaymentMethodUserControlViewModel paymentMethodViewModel, ICheckoutDataRepository checkoutDataRepository,
                                          IResourceLoader resourceLoader, IAccountService accountService, INavigationService navigationService)
        {
            _paymentMethodViewModel = paymentMethodViewModel;
            _checkoutDataRepository = checkoutDataRepository;
            _resourceLoader         = resourceLoader;
            _accountService         = accountService;
            _navigationService      = navigationService;

            SaveCommand = DelegateCommand.FromAsyncHandler(SaveAsync);
        }
Esempio n. 4
0
        public PaymentMethodPageViewModel(IPaymentMethodUserControlViewModel paymentMethodViewModel,
                                          ICheckoutDataRepository checkoutDataRepository,
                                          IResourceLoader resourceLoader,
                                          IAlertMessageService alertMessageService,
                                          IAccountService accountService,
                                          INavigationService navigationService)
        {
            _paymentMethodViewModel = paymentMethodViewModel;
            _checkoutDataRepository = checkoutDataRepository;
            _resourceLoader         = resourceLoader;
            _alertMessageService    = alertMessageService;
            _accountService         = accountService;
            _navigationService      = navigationService;

            SaveCommand = new DelegateCommand(async() => await SaveAsync());
        }
        public PaymentMethodPageViewModel(IPaymentMethodUserControlViewModel paymentMethodViewModel, 
            ICheckoutDataRepository checkoutDataRepository,
            IResourceLoader resourceLoader, 
            IAlertMessageService alertMessageService, 
            IAccountService accountService, 
            INavigationService navigationService)
        {
            _paymentMethodViewModel = paymentMethodViewModel;
            _checkoutDataRepository = checkoutDataRepository;
            _resourceLoader = resourceLoader;
            _alertMessageService = alertMessageService;
            _accountService = accountService;
            _navigationService = navigationService;

            SaveCommand = DelegateCommand.FromAsyncHandler(SaveAsync);
        }
        public CheckoutHubPageViewModel(INavigationService navigationService, IAccountService accountService, IOrderRepository orderRepository, IShoppingCartRepository shoppingCartRepository,
                                        IShippingAddressUserControlViewModel shippingAddressViewModel, IBillingAddressUserControlViewModel billingAddressViewModel, IPaymentMethodUserControlViewModel paymentMethodViewModel,
                                        IResourceLoader resourceLoader, IAlertMessageService alertMessageService)
        {
            _navigationService        = navigationService;
            _accountService           = accountService;
            _orderRepository          = orderRepository;
            _shoppingCartRepository   = shoppingCartRepository;
            _shippingAddressViewModel = shippingAddressViewModel;
            _billingAddressViewModel  = billingAddressViewModel;
            _paymentMethodViewModel   = paymentMethodViewModel;
            _alertMessageService      = alertMessageService;
            _resourceLoader           = resourceLoader;

            GoNextCommand = new DelegateCommand(GoNext);
        }
        public CheckoutHubPageViewModel(INavigationService navigationService, IAccountService accountService, IOrderRepository orderRepository, IShoppingCartRepository shoppingCartRepository,
                                        IShippingAddressUserControlViewModel shippingAddressViewModel, IBillingAddressUserControlViewModel billingAddressViewModel, IPaymentMethodUserControlViewModel paymentMethodViewModel,
                                        IFlyoutService flyoutService, IResourceLoader resourceLoader, IAlertMessageService alertMessageService)
        {
            _navigationService = navigationService;
            _accountService = accountService;
            _orderRepository = orderRepository;
            _shoppingCartRepository = shoppingCartRepository;
            _shippingAddressViewModel = shippingAddressViewModel;
            _billingAddressViewModel = billingAddressViewModel;
            _paymentMethodViewModel = paymentMethodViewModel;
            _flyoutService = flyoutService;
            _alertMessageService = alertMessageService;
            _resourceLoader = resourceLoader;

            GoBackCommand = new DelegateCommand(navigationService.GoBack, navigationService.CanGoBack);
            GoNextCommand = new DelegateCommand(GoNext);
        }