16,554
社区成员
发帖
与我相关
我的任务
分享
If Not tmp.StartsWith("ok") Then
If ZYT_Connection.State = ConnectionState.Closed Then ZYT_Connection.Open()
Dim SqlInfoNR1 As New SqlCommand("select INFO_NR1 from info where info_id='" & TreeView_ML.SelectedNode.Tag & "'", ZYT_Connection)
Dim mFILENAME As String = TreeView_ML.SelectedNode.Tag & ".doc"
Dim ByteArr() As Byte
ByteArr = SqlInfoNR1.ExecuteScalar
Try
If (ByteArr.Length > 0) Then
Dim fs As FileStream = New FileStream(mFILENAME, FileMode.OpenOrCreate)
Dim w As New BinaryWriter(fs)
w.Write(ByteArr)
w.Flush()
w.Close()
fs.Close()
Dim temp_path As New FileInfo(mFILENAME)
AxWebBrowser1.Navigate("about:blank")
AxWebBrowser1.Navigate(temp_path.DirectoryName & "\" & temp_path.Name)
Else
End If
Catch ex As Exception
MessageBox.Show("系统出错:" & Chr(13) & ex.Message, "转写本地文件出错提示", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If ZYT_Connection.State = ConnectionState.Open Then ZYT_Connection.Close()
End Try
Else
TextBox1.Text = TreeView_ML.SelectedNode.Text
' bt_tq01.PerformClick()
End If