public ProductsReportPageViewModel(Services.INorthwindService northwindService)
        {
            this.northwindService = northwindService;

            northwindService.GetProductsAsync(10)
            .ContinueWith(antc => this.Products = antc.Result.OrderBy(c => c.UnitPrice).ToArray(),
                          System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext());
        }
示例#2
0
        public CustomerDetailsPageViewModel(Services.INorthwindService northwindService, INavigationService navigationService)
        {
            this.northwindService  = northwindService;
            this.navigationService = navigationService;

            acceptCommand = new DelegateCommand(OnAcceptEdit);
            cancelCommand = new DelegateCommand(OnCancelEdit);
        }
示例#3
0
        public MainPageViewModel(Services.INorthwindService northwindService, INavigationService navigationService)
        {
            this.northwindService  = northwindService;
            this.navigationService = navigationService;

            northwindService.GetCustomersAsync()
            .ContinueWith(antc => this.Customers = antc.Result,
                          System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext());

            addNewCommand       = new DelegateCommand(AddNewCustomer);
            editCustomerCommand = new DelegateCommand(EditCustomer, IsCustomerAvailable);
            editCustomerCommand.ObservesProperty(() => this.SelectedCustomer);
            deleteCustomerCommand = new DelegateCommand(DeleteCustomer, IsCustomerAvailable);
            deleteCustomerCommand.ObservesProperty(() => this.SelectedCustomer);
            detailsCommand = new DelegateCommand(ShowDetails);
        }
示例#4
0
 public ListPageModel(Services.INorthwindService northwindService)
 {
     this.northwindService = northwindService;
 }
示例#5
0
 public ListPageModel(Services.INorthwindService northwindService)
 {
     this.northwindService = northwindService;
     this.deleteCommand    = new Command <Customer>(DeleteCustomer);
 }
示例#6
0
 public DataGridPageModel(Services.INorthwindService northwindService)
 {
     this.northwindService = northwindService;
 }
 public CustomerDetailsPageModel(Services.INorthwindService northwindService)
 {
     this.northwindService = northwindService;
 }
示例#8
0
 public CustomerDetailsPageModel(Services.INorthwindService northwindService)
 {
     this.northwindService = northwindService;
     this.saveCommand      = new Command(OnSave);
     this.cancelCommand    = new Command(OnCancel);
 }