コード例 #1
0
 private void LoadBooksOfTheDayCallback(ServiceLoadResult <BookOfDay> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.BooksOfTheDay = result.Entities;
     }
 }
コード例 #2
0
 private void GetCheckoutsCallback(ServiceLoadResult <Checkout> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.Checkouts        = result.Entities;
         this.SelectedCheckout = this.Checkouts.FirstOrDefault();
     }
 }
コード例 #3
0
 private void LoadCategoriesCallback(ServiceLoadResult <Category> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.Categories       = result.Entities;
         this.SelectedCategory = Categories.FirstOrDefault();
         LoadBooksByCategory();
     }
 }
コード例 #4
0
        private void LoadBooksCallback(ServiceLoadResult <Book> result)
        {
            if (result.Error != null)
            {
                // handle error
            }
            else if (!result.Cancelled)
            {
                if (Books == null)
                {
                    Books = result.Entities as ICollection <Book>;
                }
                else
                {
                    foreach (var book in result.Entities)
                    {
                        Books.Add(book);
                    }
                }

                SelectedBook = Books.FirstOrDefault();
            }
        }