Public Sub frmReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim connect_1 As SqlConnection = New SqlConnection("Data Source=(local)\SQLEXPRESS;Initial Catalog=DORMITORY;Integrated Security=True")
Dim SqlString_1 As String = "SELECT* from DetailRent"
Dim sqlCom As SqlCommand = New SqlCommand(SqlString_1, connect_1)
connect_1.Open()
Dim sqlAdapter As SqlDataAdapter = New SqlDataAdapter(sqlCom)
Dim ds_1 As New DataSet()
sqlAdapter.Fill(ds_1, "DetailRent")
dgvReport_In.AutoGenerateColumns = False
dgvReport_In.DataSource = ds_1
dgvReport_In.DataMember = "DetailRent"
connect_1.Close()
Dim connect_2 As SqlConnection = New SqlConnection("Data Source=(local)\SQLEXPRESS;Initial Catalog=DORMITORY;Integrated Security=True")
Dim SqlString_2 As String = "SELECT* from BookRoom"
Dim sqlCom_2 As SqlCommand = New SqlCommand(SqlString_2, connect_2)
connect_2.Open()
Dim sqlAdapter_2 As SqlDataAdapter = New SqlDataAdapter(sqlCom)
Dim ds_2 As New DataSet()
sqlAdapter.Fill(ds_2, "BookRoom")
dgvReport_BookRoom.AutoGenerateColumns = False
dgvReport_BookRoom.DataSource = ds_2