Ejemplo n.º 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);
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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.
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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());
 }
Ejemplo n.º 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());
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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);
 }