Ejemplo n.º 1
0
        private void UpdateInventories()
        {
            var inventory = _api.GetTroopInventoryById(Inventory.Id);

            Inventory.UpdateInventory(inventory);

            var girlScoutInventory = _api.GetGirlScoutInventoryById(SelectedGirlScout.Inventory.Id);

            SelectedGirlScout.Inventory.UpdateInventory(girlScoutInventory);
        }
Ejemplo n.º 2
0
        private void MakePayment()
        {
            var viewModel = new MakePaymentDialogViewModel();
            var result    = _dialogService.ShowDialog(this, viewModel);

            if (result.HasValue && result.Value)
            {
                _api.MakePayment(new MakePaymentDto()
                {
                    InventoryId  = Id,
                    Amount       = viewModel.Amount,
                    DateReceived = viewModel.DateReceived
                });
                var inventory = _api.GetGirlScoutInventoryById(Id);
                UpdateInventory(inventory);
            }
        }