Beispiel #1
0
        private void AddBorrowOrder()
        {
            borrowDate = Convert.ToDateTime(txtBorrowDate.Text);

            //Creates an object of Borrow class
            Borrow borrow = new Borrow(memberID, borrowDate, dueReturnDate);

            //Adds a new borrow order to database
            int borrowID = borrow.AddBorrowOrder(borrow);

            for (int i = 0; i < 3; i++)
            {
                if (bookID[i] != -1)
                {
                    //Adds borrow details into database
                    BorrowDetails borrowDetails = new BorrowDetails(borrowID, bookID[i]);
                }
            }
        }