public EditBillingAddressFlyoutViewModel(IBillingAddressUserControlViewModel billingAddressUserControlViewModel, ICheckoutDataRepository checkoutDataRepository) { _checkoutDataRepository = checkoutDataRepository; _viewModel = billingAddressUserControlViewModel; SaveCommand = new DelegateCommand(SaveBillingAddress); GoBackCommand = new DelegateCommand(() => GoBack(), () => true); }
public ShoppingCartPageViewModel(IShoppingCartRepository shoppingCartRepository, INavigationService navigationService, IAccountService accountService, ISignInUserControlViewModel signInUserControlViewModel, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, ICheckoutDataRepository checkoutDataRepository, IOrderRepository orderRepository, IEventAggregator eventAggregator) { _shoppingCartRepository = shoppingCartRepository; _navigationService = navigationService; _accountService = accountService; _signInUserControlViewModel = signInUserControlViewModel; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; _checkoutDataRepository = checkoutDataRepository; _orderRepository = orderRepository; CheckoutCommand = new DelegateCommand(async() => await CheckoutAsync(), CanCheckout); RemoveCommand = new DelegateCommand <ShoppingCartItemViewModel>(async vm => await Remove(vm)); IncrementCountCommand = new DelegateCommand(async() => await IncrementCount()); DecrementCountCommand = new DelegateCommand(async() => await DecrementCount(), CanDecrementCount); // Subscribe to the ShoppingCartUpdated event if (eventAggregator != null) { eventAggregator.GetEvent <ShoppingCartUpdatedEvent>().Subscribe(UpdateShoppingCartAsync); } }
public ChangeDefaultsFlyoutViewModel(ICheckoutDataRepository checkoutDataRepository, IResourceLoader resourceLoader) { _checkoutDataRepository = checkoutDataRepository; _resourceLoader = resourceLoader; GoBackCommand = new DelegateCommand(() => GoBack()); }
public CheckoutSummaryPageViewModel(INavigationService navigationService, IOrderService orderService, IOrderRepository orderRepository, IShippingMethodService shippingMethodService, ICheckoutDataRepository checkoutDataRepository, IShoppingCartRepository shoppingCartRepository, IAccountService accountService, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, ISignInUserControlViewModel signInUserControlViewModel) { _navigationService = navigationService; _orderService = orderService; _orderRepository = orderRepository; _shippingMethodService = shippingMethodService; _checkoutDataRepository = checkoutDataRepository; _shoppingCartRepository = shoppingCartRepository; _resourceLoader = resourceLoader; _accountService = accountService; _alertMessageService = alertMessageService; _signInUserControlViewModel = signInUserControlViewModel; SubmitCommand = DelegateCommand.FromAsyncHandler(SubmitAsync, CanSubmit); EditCheckoutDataCommand = new DelegateCommand(EditCheckoutData); SelectCheckoutDataCommand = new DelegateCommand(async() => await SelectCheckoutDataAsync()); AddCheckoutDataCommand = new DelegateCommand(AddCheckoutData); }
public EditPaymentMethodFlyoutViewModel(IPaymentMethodUserControlViewModel paymentMethodUserControlViewModel, ICheckoutDataRepository checkoutDataRepository) { _checkoutDataRepository = checkoutDataRepository; _viewModel = paymentMethodUserControlViewModel; SaveCommand = new DelegateCommand(SavePaymentInfo); GoBackCommand = new DelegateCommand(() => GoBack(), () => true); }
public CheckoutSummaryPageViewModel(INavigationService navigationService, IOrderService orderService, IOrderRepository orderRepository, IShippingMethodService shippingMethodService, ICheckoutDataRepository checkoutDataRepository, IShoppingCartRepository shoppingCartRepository, IAccountService accountService, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, ISignInUserControlViewModel signInUserControlViewModel) { _navigationService = navigationService; _orderService = orderService; _orderRepository = orderRepository; _shippingMethodService = shippingMethodService; _checkoutDataRepository = checkoutDataRepository; _shoppingCartRepository = shoppingCartRepository; _resourceLoader = resourceLoader; _accountService = accountService; _alertMessageService = alertMessageService; _signInUserControlViewModel = signInUserControlViewModel; SubmitCommand = DelegateCommand.FromAsyncHandler(SubmitAsync, CanSubmit); EditCheckoutDataCommand = new DelegateCommand(EditCheckoutData); SelectCheckoutDataCommand = new DelegateCommand(async () => await SelectCheckoutDataAsync()); AddCheckoutDataCommand = new DelegateCommand(AddCheckoutData); }
public ShippingAddressUserControlViewModel(ICheckoutDataRepository checkoutDataRepository, ILocationService locationService, IResourceLoader resourceLoader) { _address = new Address(); _checkoutDataRepository = checkoutDataRepository; _locationService = locationService; _resourceLoader = resourceLoader; }
public ShoppingCartPageViewModel(IShoppingCartRepository shoppingCartRepository, INavigationService navigationService, IAccountService accountService, ISignInUserControlViewModel signInUserControlViewModel, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, ICheckoutDataRepository checkoutDataRepository, IOrderRepository orderRepository, IEventAggregator eventAggregator) { _shoppingCartRepository = shoppingCartRepository; _navigationService = navigationService; _accountService = accountService; _signInUserControlViewModel = signInUserControlViewModel; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; _checkoutDataRepository = checkoutDataRepository; _orderRepository = orderRepository; CheckoutCommand = DelegateCommand.FromAsyncHandler(CheckoutAsync, CanCheckout); RemoveCommand = DelegateCommand<ShoppingCartItemViewModel>.FromAsyncHandler(Remove); IncrementCountCommand = DelegateCommand.FromAsyncHandler(IncrementCount); DecrementCountCommand = DelegateCommand.FromAsyncHandler(DecrementCount, CanDecrementCount); // Subscribe to the ShoppingCartUpdated event if (eventAggregator != null) { eventAggregator.GetEvent<ShoppingCartUpdatedEvent>().Subscribe(UpdateShoppingCartAsync); } }
public ShippingAddressUserControlViewModel(ICheckoutDataRepository checkoutDataRepository, ILocationService locationService, IResourceLoader resourceLoader, IAlertMessageService alertMessageService) { _address = new Address(); _checkoutDataRepository = checkoutDataRepository; _locationService = locationService; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; }
public BillingAddressUserControlViewModel(ICheckoutDataRepository checkoutDataRepository, ILocationService locationService, IResourceLoader resourceLoader, IAlertMessageService alertMessageService) { _address = new Address(); _isEnabled = true; _checkoutDataRepository = checkoutDataRepository; _locationService = locationService; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; }
public ChangeDefaultsFlyoutViewModel(ICheckoutDataRepository checkoutDataRepository, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, IAccountService accountService) { _checkoutDataRepository = checkoutDataRepository; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; _accountService = accountService; SaveCommand = new DelegateCommand(async() => await SaveAsync()); Initialize(); }
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); }
public ChangeDefaultsFlyoutViewModel(ICheckoutDataRepository checkoutDataRepository, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, IAccountService accountService) { _checkoutDataRepository = checkoutDataRepository; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; _accountService = accountService; SaveCommand = DelegateCommand.FromAsyncHandler(SaveAsync); Initialize(); }
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 ShoppingCartPageViewModel(IShoppingCartRepository shoppingCartRepository, INavigationService navigationService, IAccountService accountService, IFlyoutService flyoutService, IResourceLoader resourceLoader, IAlertMessageService alertMessageService, ICheckoutDataRepository checkoutDataRepository, IOrderRepository orderRepository, IEventAggregator eventAggregator) { _shoppingCartRepository = shoppingCartRepository; _navigationService = navigationService; _accountService = accountService; _flyoutService = flyoutService; _resourceLoader = resourceLoader; _alertMessageService = alertMessageService; _checkoutDataRepository = checkoutDataRepository; _orderRepository = orderRepository; CheckoutCommand = DelegateCommand.FromAsyncHandler(CheckoutAsync, CanCheckout); EditAmountCommand = new DelegateCommand(OpenEditAmountFlyout); RemoveCommand = DelegateCommand<ShoppingCartItemViewModel>.FromAsyncHandler(Remove); GoBackCommand = new DelegateCommand(navigationService.GoBack); IncrementCountCommand = DelegateCommand.FromAsyncHandler(IncrementCount); DecrementCountCommand = DelegateCommand.FromAsyncHandler(DecrementCount, CanDecrementCount); // Subscribe to the ShoppingCartUpdated event eventAggregator.GetEvent<ShoppingCartUpdatedEvent>().Subscribe(UpdateShoppingCartAsync); }
public PaymentMethodUserControlViewModel(ICheckoutDataRepository checkoutDataRepository) { _paymentMethod = new PaymentMethod(); _checkoutDataRepository = checkoutDataRepository; }