Public Class frmBookingHistory
    Private Sub frmBookingList_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        BookedRooms()
    End Sub

    Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged
        sql = BookedRooms() & "  and  concat (`ROOMNUM`,' ', `ROOM`,' ',`G_FNAME` , ' ' , `G_LNAME`) LIKE '%" & txtSearch.Text & "%'"
        RETRIEVEDTG(dtgList, sql)
    End Sub

    Private Sub btnCheckedout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheckedout.Click
        Try
            sql = "UPDATE `tblpayment` SET `STATUS` = 'CHECKED-OUT' WHERE `TRANSNUM`=" & dtgList.CurrentRow.Cells(0).Value
            result = CUD(sql)
            If result = False Then
                MsgBox("ERROR TO UPDATE tblpayment", MsgBoxStyle.Exclamation)
            Else
                MsgBox("Guest has been checked-out.")
            End If

            BookedRooms()
        Catch ex As Exception

        End Try
    End Sub

    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
        Try
            Form1.FrmViewBookRooms1.txtTransno.Text = dtgList.CurrentRow.Cells(0).Value
            'Form1.addContent(Form1.FrmViewBookRooms1)

        Catch ex As Exception

        End Try
    End Sub

End Class
