예제 #1
0
        // ----- Constructors
        public CustomerListViewModel(
            IMessenger messenger,
            ICustomerListService customerListService,
            IDialogService dialogService)
        {
            _messenger           = messenger;
            _customerListService = customerListService;
            _dialogService       = dialogService;

            CreateCustomerCommand         = new AsyncCommand(CreateCustomer);
            RefreshCommand                = new AsyncCommand(RefreshCustomerList);
            DeleteCustomerCommand         = new AsyncCommand <CustomerListItem>(DeleteCustomer);
            DisplayCustomerDetailsCommand = new Command <CustomerListItem>(DisplayCustomerDetails);
        }
예제 #2
0
        public CreateNewOrderViewModel(
            IMessenger messenger,
            ICustomerListService customerListService,
            IOrderDetailService orderDetailService,
            IProductListService productListService)
        {
            _customerListService = customerListService;
            _orderDetailService  = orderDetailService;
            _productListService  = productListService;

            CreateNewOrderItemCommand = new Command(CreateNewOrder);
            SaveCommand = new AsyncCommand(Save);

            messenger.Register <CreateNewOrderMessage>(this, CreateNewOrderMessageReceived);
        }
예제 #3
0
 public CustomersController(ICustomerCreationService customerCreationService, ICustomerListService customerListService)
 {
     _customerCreationService = customerCreationService;
     _customerListService     = customerListService;
 }