Beispiel #1
0
 public void DelBook(BookItem book, Action<Exception> callback)
 {
     try
     {
         ServiceLocator.Current.GetInstance<IUserService>().GetLoginUser((lu, ex) =>
         {
             if (ex != null)
             {
                 callback(ex);
                 return;
             }
             var books = WebUtil.Delete<BookItem>(string.Format("api/books/{0}", lu.Domain), book);
             callback(null);
         });
     }
     catch (Exception ex)
     {
         logger.Warn(ex);
         callback(ex);
     }
 }
Beispiel #2
0
 public BookViewModel()
 {
     _book = new BookItem();
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the BookViewModel class.
 /// </summary>
 public BookViewModel(BookItem book)
 {
     _book = book;
 }