Sub BindRecieveToGridview1(ByVal gridview As GridView)
conn.Connect()
Mysql = "SELECT t.StateSend,c.carlicense,sd.name_staffDriver, sn.name_staffNurse,tr.insideSendTime FROM transrefer_table t,carrefer_table c,staffdriver_table sd,staffnurse_table sn, transrefering_table tr WHERE (t.RN=tr.RN)AND(tr.id_car=c.id_car)AND (tr.id_staffDriver=sd.id_staffDriver)AND(tr.id_staffNurse=sn.id_staffNurse)AND(tr.RN NOT IN (SELECT RN FROM barricadeaccept_table))"
Dim cmm As New MySql.Data.MySqlClient.MySqlCommand(Mysql, conn.myConnection)
conn.MyReader = cmm.ExecuteReader
If conn.MyReader.HasRows Then
gridview.DataSource = conn.MyReader gridview.DataBind()
Else
MsgBox("ไม่พบข้อมูลในตาราง ฐานข้อมูล", MsgBoxStyle.Critical, "ผลการค้นหา")
conn.MyReader.Close()
End If
conn.MyReader.Close()
End Sub