Пример #1
0
        private void AddCookiesFromCupboard()
        {
            var viewModel = new AddCookiesFromCupboardDialogViewModel();
            var result    = _dialogService.ShowDialog(this, viewModel);

            if (!result.HasValue || !result.Value)
            {
                return;
            }

            var dto = new AddCookiesFromCupboardDto()
            {
                DateReceived     = viewModel.DateReceived,
                DoSiSos          = viewModel.DoSiSos,
                Savannah         = viewModel.Savannah,
                Samoas           = viewModel.Samoas,
                Smors            = viewModel.Smors,
                Tagalongs        = viewModel.Tagalongs,
                ThinMints        = viewModel.ThinMints,
                ToffeeTastic     = viewModel.ToffeeTastic,
                Trefoils         = viewModel.Trefoils,
                TroopInventoryId = Id
            };

            _api.AddCookiesFromCupboard(dto);
            var inventory = _api.GetTroopInventoryById(Id);

            UpdateInventory(inventory);
        }
Пример #2
0
        private void UpdateInventories()
        {
            var inventory = _api.GetTroopInventoryById(Inventory.Id);

            Inventory.UpdateInventory(inventory);

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

            SelectedGirlScout.Inventory.UpdateInventory(girlScoutInventory);
        }