Пример #1
0
        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;
            }
        }
Пример #2
0
        // 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));
        }
Пример #3
0
 void ExecuteOpenBooksCmd()
 {
     ShowFunctionView();
     ContentView = new BooksStore();
 }