Ejemplo n.º 1
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();
     }
 }
Ejemplo n.º 2
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();
            }
        }
Ejemplo n.º 3
0
 private void LoadBooksOfTheDayCallback(ServiceLoadResult<BookOfDay> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.BooksOfTheDay = result.Entities;
     }
 }
 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();
     }
 }