public OrderDetailViewModel(Services.IErpService erpService, Services.IContextService contextService, IMvxNavigationService navigationService, IMvxMessenger messenger, IAuthenticationService authenticationService) { this.erpService = erpService; this.contextService = contextService; this.navigationService = navigationService; this.messenger = messenger; this.CurrentUserName = authenticationService.UserName; this.BeginEditCommand = new MvxAsyncCommand(OnBeginEditOrder); this.DeleteCommand = new MvxAsyncCommand(OnDeleteOrder); this.CommitCommand = new MvxAsyncCommand(OnCommitEditOrder); this.CancelCommand = new MvxAsyncCommand(OnCancel); this.AllProducts = new Telerik.XamarinForms.Common.ObservableItemCollection <OrderDetail>(); this.AllProducts.ItemPropertyChanged += OnAllProductsItemPropertyChanged; this.orderSearchPerformedMessageToken = messenger .SubscribeOnMainThread <OrderSearchPerformedMessage>((obj) => IsSearchEmpty = obj.IsEmpty); this.emptyImageName = "Item_add.png"; }
public CustomerDetailViewModel(Services.IErpService erpService, Services.IContextService contextService, IMvxNavigationService navigationService, IMvxMessenger messenger, IAuthenticationService authenticationService) { this.erpService = erpService; this.contextService = contextService; this.navigationService = navigationService; this.messenger = messenger; this.CurrentUserName = authenticationService.UserName; this.BeginEditCommand = new Command(OnBeginEditCustomer); this.CommitCommand = new MvxAsyncCommand(OnCommitEditCustomer); this.DeleteCommand = new MvxAsyncCommand(OnDeleteCustomer); this.CancelCommand = new MvxAsyncCommand(OnCancel); this.DeleteAddressCommand = new MvxCommand <CustomerAddress>(OnDeleteCustomerAddress); this.EditAddressCommand = new MvxCommand <CustomerAddress>(OnEditCustomerAddress); this.CreateAddressCommand = new MvxCommand(OnCreateCustomerAddress); this.CommitAddressCommand = new MvxCommand(OnCommitCustomerAddress); this.customerSearchPerformedMessageToken = messenger .SubscribeOnMainThread <CustomerSearchPerformedMessage>((obj) => IsSearchEmpty = obj.IsEmpty); this.emptyImageName = "Item_add.png"; }