예제 #1
0
        /// <summary>
        /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
        /// </summary>
        /// <param name="b">The book that needs to be saved to the database</param>
        public void Edit(Book b)
        {
            bookRepository.Edit(b);
            var e = EventArgs.Empty;

            OnUpdated(e);
        }
예제 #2
0
 /// <summary>
 /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
 /// </summary>
 /// <param name="b"></param>
 public void Edit(Book book)
 {
     bookRepository.Edit(book);
     if (Updated != null)
     {
         Updated(this, EventArgs.Empty);
     }
 }
예제 #3
0
 /// <summary>
 /// The Edit method makes sure that the given Book object is saved to the database and raises the OnChanged() event.
 /// </summary>
 /// <param name="b">The edited book</param>
 public void Edit(Book b)
 {
     if (b != null)
     {
         bookRepository.Edit(b);
         OnChanged(EventArgs.Empty);
     }
     else
     {
         throw new ArgumentNullException();
     }
 }
예제 #4
0
 /// <summary>
 /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
 /// </summary>
 /// <param name="b"></param>
 public void Edit(Book b)
 {
     bookRepository.Edit(b);
     // TODO: Raise the Updated event.
 }
예제 #5
0
 /// <summary>
 /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
 /// </summary>
 /// <param name="b"></param>
 public void Edit(Book b)
 {
     bookRepository.Edit(b);
     OnUpdate();
 }
예제 #6
0
        /// <summary>
        /// Method to edit a book
        /// </summary>
        /// <param name="item">book to edit</param>
        public void Edit(Book item)
        {
            var booktoedit = bookRepo.Find(item.Id);

            bookRepo.Edit(booktoedit);
        }
예제 #7
0
 /// <summary>
 /// Method to edit an existing book.
 /// </summary>
 /// <param name="book">Book</param>
 public void EditBook(Book book)
 {
     bookRepository.Edit(book);
     Updated.Invoke(this, new EventArgs());
 }
예제 #8
0
        /// <summary>
        /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
        /// </summary>
        /// <param name="b">Book object to be saved.</param>
        public void Edit(Book b)
        {
            bookRepository.Edit(b);

            OnUpdated(new EventArgs());
        }
예제 #9
0
 /// <summary>
 /// Validates and sends a specific book object to repository for editing in database and then raises the OnUpdated event.
 /// </summary>
 /// <param name="book">Book object to edit in database.</param>
 public void Edit(Book book)
 {
     ValidateInputs(book, false);
     BookRepository.Edit(book);
     OnUpdated(book, EventArgs.Empty);
 }
예제 #10
0
 /// <summary>
 /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
 /// </summary>
 /// <param name="book"></param>
 public void Edit(Book book)
 {
     bookRepository.Edit(book);
     OnUpdated();
 }
예제 #11
0
 /// <summary>
 /// The Edit method makes sure that the given Book object is saved to the database and raises the Updated() event.
 /// </summary>
 /// <param name="b"></param>
 public void Edit(Book b)
 {
     bookRepository.Edit(b);
     OnUpdated(EventArgs.Empty);
 }