Protected Sub GetData(ByVal CondStr As String)
Dim conn As New SqlConnection(MasterClass.ConnStr)
conn.Open()
Dim da As New SqlDataAdapter(" select top 1 Leave .*,Student_first,Student_last,Major.Major_ID,Student_room,Student_tower " & _
" from Leave " & _
" join Student on (Student.Student_ID=Leave.Student_ID) " & _
" join Major on (major.Major_ID=Student.Major_ID) where 1=1 " & CondStr, conn)
Dim ds As New DataSet
da.Fill(ds, "Leave")
gv_Leave.DataSource = ds
gv_Leave.DataBind()
End Sub