private void tsbtnCheckIn_Click(object sender, EventArgs e)// on click of checkin it will add the checkin date to selected booking if the checkin is todays date { if (lblBookingID.Text == "BookingID") { MessageBox.Show("Please select a guest to check out"); } else { CheckInandOutCalls.InsertCheckin(Convert.ToInt16(lblBookingID.Text)); CurrentBookings(); } }
private void btnCheckOut_Click(object sender, EventArgs e) // adds todays date to checkout field and all the costs to the right tables in the database { if ((Convert.ToInt32(txtRoomCharge.Text) >= 30) && (Convert.ToInt32(txtWifiCharge.Text) >= 0) && (Convert.ToInt32(txtBarCharge.Text) >= 0 && lblBookedTo.Text == DateTime.Today.ToShortDateString())) { CheckInandOutCalls.InsertBilling(Convert.ToInt32(lblGuestID.Text), Convert.ToInt32(txtWifiCharge.Text), Convert.ToInt32(txtBarCharge.Text), Convert.ToInt32(txtRoomCharge.Text), Total); CheckInandOutCalls.InsertCheckOut(Room); this.Close(); } else { MessageBox.Show("Please make sure bar and wifi charges are entered and Guest checking out has been selected."); } }