Ejemplo n.º 1
0
        private void HandleDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var shipOrderViewModel = DataContext as ShipOrderViewModel;

            if (shipOrderViewModel == null)
            {
                throw new InvalidCastException("The data context should be correct type");
            }

            _shipOrderViewModel = shipOrderViewModel;
        }
        private void SetupShipOrderControl()
        {
            var shipOrderViewModel = new ShipOrderViewModel(_gameViewModel.SelectedShip, _gameViewModel.ShipOrderEditor);

            ShipOrderControl.DataContext = shipOrderViewModel;
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Ship([FromBody] ShipOrderViewModel orderViewModel)
        {
            await _orderAppService.Ship(orderViewModel);

            return(Response(orderViewModel));
        }
Ejemplo n.º 4
0
        public Task Ship(ShipOrderViewModel customerViewModel)
        {
            var placeCommand = _mapper.Map <ShipOrderCommand>(customerViewModel);

            return(Bus.SendCommand(placeCommand));
        }