示例#1
0
        public async Task <IActionResult> Get(string id)
        {
            Spell resultObj = await m_service.Get(id);

            if (resultObj == null)
            {
                return(NotFound());
            }

            return(Ok(resultObj));
        }
示例#2
0
        private async void SpellSearchForm_Load(object sender, EventArgs e)
        {
            var loading = new LoadingForm
            {
                ProgressText = { Text = @"Loading: Spells" }
            };

            loading.Show();

            _allData = await _spellService.Get();

            loading.Close();
            GetPage();
        }
示例#3
0
        private async Task LoadSpell(string spellId)
        {
            if (string.IsNullOrWhiteSpace(spellId))
            {
                return;
            }

            _spell = await _spellService.Get(spellId);

            if (_spell == null)
            {
                MessageBox.Show($@"Object with ObjectId: {spellId} not found", @"Object not found");
                return;
            }

            BindingService.BindData(_spell, this);
        }