Beispiel #1
0
 public OrderCompletionViewModel(Services.IErpService erpService, IMvxNavigationService navigationService)
 {
     this.erpService        = erpService;
     this.navigationService = navigationService;
     this.DoneCommand       = new MvxAsyncCommand(OnDone);
     this.CancelCommand     = new MvxAsyncCommand(OnCancel);
 }
Beispiel #2
0
 public VendorDetailViewModel(Services.IErpService erpService, IMvxNavigationService navigationService)
 {
     this.erpService        = erpService;
     this.navigationService = navigationService;
     this.BeginEditCommand  = new Command(OnBeginEditVendor);
     this.CommitCommand     = new MvxAsyncCommand(OnCommitEditOrder);
     this.DeleteCommand     = new MvxAsyncCommand(OnDeleteVendor);
     this.CancelCommand     = new MvxAsyncCommand(OnCancel);
 }
Beispiel #3
0
 public ProductDetailViewModel(Services.IErpService erpService, IMvxNavigationService navigationService)
 {
     this.erpService                = erpService;
     this.navigationService         = navigationService;
     this.BeginEditCommand          = new Command(OnBeginEditProduct);
     this.CommitCommand             = new MvxAsyncCommand(OnCommitEditOrder);
     this.DeleteCommand             = new MvxAsyncCommand(OnDeleteProduct);
     this.CancelCommand             = new MvxAsyncCommand(OnCancel);
     this.SelectProductColorCommand = new Command <RadBrush>(OnSelectProductColor);
 }
Beispiel #4
0
 public CustomersListViewModel(Services.IErpService service, IMvxNavigationService navigationService, IMvxMessenger messenger)
 {
     this.service                     = service;
     this.navigationService           = navigationService;
     this.messenger                   = messenger;
     this.customerUpdatedMessageToken = messenger.SubscribeOnThreadPoolThread <CustomerUpdatedMessage>(OnCustomerUpdated);
     this.customerDeletedMessageToken = messenger.SubscribeOnMainThread <CustomerDeletedMessage>(OnCustomerDeleted);
     this.customerSearchMessageToken  = messenger.SubscribeOnMainThread <CustomerSearchMessage>(OnCustomerSearch);
     this.CreateCustomerCommand       = new MvxCommand(OnCreateCustomer);
     this.SearchCommand               = new MvxAsyncCommand(OnSearch);
     this.AboutCommand                = new MvxCommand(ShowAboutPage);
     this.listDescription             = "All Customers";
 }
Beispiel #5
0
 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";
 }
Beispiel #6
0
        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";
        }
 public SearchResultsViewModel(IMvxNavigationService navigationService, Services.IErpService erpService)
 {
     this.erpService        = erpService;
     this.navigationService = navigationService;
     this.CancelCommand     = new MvxAsyncCommand(OnCancel);
 }
Beispiel #8
0
 public DashboardPageViewModel(Services.IErpService service, IMvxNavigationService navigationService)
 {
     this.service           = service;
     this.navigationService = navigationService;
     this.AboutCommand      = new MvxCommand(ShowAboutPage);
 }
 public OrderScheduleViewModel(Services.IErpService service, IMvxNavigationService navigationService)
 {
     this.service              = service;
     this.navigationService    = navigationService;
     this.CompleteOrderCommand = new MvxAsyncCommand <Order>(CompleteOrder, CanCompleteOrder);
 }