加一个隐藏的Label标签,内容为空,假定标签名为Label1
Afterload:
Dim cmd As New SQLCommand
Dim ds As DataTable
cmd.C
cmd.CommandText = "SELECT * Fr om {核价系统}"
ds = cmd.ExecuteReader(True)
Dim drt As DataTable = DataTables("核价系统_Table1")
Dim tbl As Table = Tables("核价系统_Table1")
tbl.DataSource = ds
e.Form.Controls("lable1").Text= “Ok”
Tables("核价系统_Table1").RaiseCurrentChanged
CurrentChanged :
if e.Form.Controls("lable1").Text <> “Ok” then
Return
end if
Dim pbx As WinForm.PictureBox = Forms("核价系统").Controls("PictureBox1")
If Tables("核价系统_Table1").Current Is Nothing Then
MessageBox.Show( "1")
pbx.Image = Nothing
Else
MessageBox.Show( "2")
pbx.Image = Tables("核价系统_Table1").Current.DataRow.SQlLoadImage("款式图片") '从后台提取照片并显示
End If