示例#1
0
 public void SetCurrentBook(BookLocal book)
 {
     var books = GetBooksLocal().ToList();
     foreach (var b in books)
     {
         b.IsCurrent = false;
         db.SaveItem<BookLocal>(b);
     }
     book.ID = GetBookByPath(book.BookPath).ID;
     db.SaveItem<BookLocal>(book);
     var s = GetBooksLocal();
 }
示例#2
0
 public void UpdateBookPosition(BookLocal book)
 {
     _repository.UpdateBookPosition (book);
 }
示例#3
0
 public void SetCurrentBook(Book book)
 {
     //int id = 0;
     //Int32.TryParse(book.ID, out id);
     BookLocal local = new BookLocal() { BookPath = book.BookPath, Position = book.Position, IsCurrent = true};
     _repository.SetCurrentBook(local);
 }
示例#4
0
 public int SaveBookLocal(BookLocal item)
 {
     return _repository.SaveBookLocal(item);
 }
示例#5
0
 public void UpdateBookPosition(BookLocal book)
 {
     var lBook = db.GetItems<BookLocal>().FirstOrDefault(x => x.BookPath == book.BookPath);
     lBook.Position = book.Position;
     db.SaveItem (lBook);
 }
示例#6
0
 public int SaveBookLocal(BookLocal item)
 {
     return db.SaveItem<BookLocal>(item);
 }