async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { BooksItem.Clear(); var items = await BooksStore.GetItemsAsync(true); foreach (var item in items) { BooksItem.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
// GET: /<controller>/ public IActionResult Index() { /* * Book b = new Book(); * b.ISBN = "12345"; * b.Title = "การพัฒนา Web Apps"; * b.Price = 345; */ BooksStore bs = new BooksStore(); var bLists = bs.GetAllBooks(); return(View(bLists)); }
void ExecuteOpenBooksCmd() { ShowFunctionView(); ContentView = new BooksStore(); }