Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
明白了,加载窗口时执行下列代码可以解决问题:
Dim cmd As New SQLcommand
cmd.Con nection Name = "zygl"
cmd.CommandText = "Select 住院ID,入院日期,床位,住院号,姓名,性别,年龄,入院诊断,出院申请 From [住院登记] where 出院结账 = False"
Dim dst As WinForm.DataList = e.Form.Controls("DataList1")
dst.DataTable = cmd.ExecuteReader()
dst.Build()
Dim dst2 As WinForm.DataList = e.Form.Controls("DataList2")
if dst.count = 1 then
Dim dr1 as DataRow = dst.Current
dim str as string = dr1("住院ID")
cmd.CommandText = "SELECT * FROM [长嘱] where 住院ID = '"& str &"'"
dst2.DataTable = cmd.ExecuteReader()
dst2.Build()
end if