如何根据会议议题表的当前行 来自动打开议题资料的第一行对应的二进制未见到web浏览控件里呢?
想实现点击会议议题某行 就自动打开关联议题资料的第一行数据 到web浏览控件内!不管第一行数据是啥,只要这个数据行不为空,都显示出来!
会议议题表的当前行事件代码:正常实现议题资料的所有关联行数据显示出来
Dim zs1 As Integer = Tables(e.form.name & "_table1").Count
If zs1 >0 Then
If Tables(e.form.name & "_table1").Current("uuid")<>"" Then
vars("议题uuid")=Tables(e.form.name & "_table1").Current("uuid")
vars("议题标题")=Tables(e.form.name & "_table1").Current("议题标题")
Tables(e.form.name & "_table2").Filter="uuid='" & Tables(e.form.name & "_table1").Current("uuid") &"'and 会议主题='" & Tables(e.form.name & "_table1").Current("议题标题") &"'"
Else
Tables(e.form.name & "_table2").Filter="uuid='XXXXXXX'and 会议主题='" & Tables(e.form.name & "_table1").Current("议题标题") &"'"
vars("议题uuid")=""
vars("议题标题")=""
End If
Else
Tables(e.form.name & "_table2").Filter="uuid='XXXXXXX' and 会议主题='" & Tables(e.form.name & "_table1").Current("议题标题") &"'"
End If
议题资料事件代码 正常实现双击某行能够对应打开对应的二进制文件到web浏览控件内
If Tables(e.form.name & "_table2").Current Is Nothing Then
Return
End If
Dim dr As DataRow = Tables(e.form.name & "_table2").Current.DataRow
Dim fl As String = ProjectPath & dr("文件名")
If FileSys.FileExists(fl) AndAlso CRCCheckFile(fl) = dr.SQLGetValue("CRC值") Then '如果本地存在同名文件且CRC校验值相同
'则直接使用本地文件
Else '否则从数据库提取文件
If dr.SQLLoadFile("附件",fl) = False Then '如果提取文件失败
Messagebox.Show("附件提取失败,可能并不存在附件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
End If
'Dim Proc As New Process '打开文件
'Proc.File = fl
'Proc.Start()
Dim wb As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
wb.Address=fl