Ejemplo n.º 1
0
 public List <BookBO> Add(BookBO book, List <BookBO> books) // Data Access Layer // passing Bussiness object Here
 {
     try
     {
         BookDA bookDA = new BookDA();
         // GetNextHighestBookId
         return(bookDA.Add(book, books));
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 2
0
        private void ButtonAddToList_Click(object sender, EventArgs e)
        {
            Book book = new Book();

            if ((BookValidation.isValidisbn(textboxisbn)) && (BookValidation.isValidName(textboxTitle)) && (BookValidation.isValidValues(textboxUnitPrice)) && (BookValidation.isValidYear(textboxYearPublished)) && (BookValidation.isValidValues(textboxQuantityOnHand)))
            {
                book.isbn          = Convert.ToInt32(textboxisbn.Text);
                book.Title         = textboxTitle.Text;
                book.UnitPrice     = Convert.ToInt32(textboxUnitPrice.Text);
                book.YearPublished = Convert.ToInt32(textboxYearPublished.Text);
                book.QOH           = Convert.ToInt32(textboxQuantityOnHand.Text);
                BookDA.Add(book);
                clearall();
            }
        }
Ejemplo n.º 3
0
 public void Add(Book book)
 {
     book.CreatedDate  = DateTime.Now;
     book.ModifiedDate = DateTime.Now;
     bookDA.Add(book);
 }