- Load Customers table
- Load Items table
- drop times rented
- drop quantity
- Checkout table
- Drop total
Date_Out DATETIME NOT NULL DEFAULT GETDATE()
- Shows list of all Items
- textbox for customer ID
- button for "Check Out"
INSERT INTO checkouts (customer_id, item_id) VALUES (textBoxCustID.Text, getDataGridViewItems.CurrentRow().id)
- Shows a list of all checked out items
SELECT * FROM checkouts ch JOIN customers cu ON ch.cust_id = cu.id JOIN items i ON ch.item_id = i.id WHERE check_in IS null
- Button for check_in
UPDATE checkouts SET check_in = GETDATE() WHERE id = getDataGridViewCheckedOutItems.CurrentRow().id