我需要从员工数据库中读取记录并显示选定的项目(不在 Gridview 中)——这很好,除了存储在 varbinary(max) 中的图像。我需要逐步浏览记录 - 向前和向后。有一些记录没有图像。我在理解为每条记录使用该数据集的转换方法时遇到问题。
我正在使用 Visual Studio 2008 并 thryng 在 Windows 窗体应用程序中显示记录。
帮助将不胜感激。
下面是我的一些代码:
Public Class Form1
Private Sub GraduatesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduatesBindingNavigatorSaveItem.Click
Me.Validate()
Me.GraduatesBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Graduates_DatabaseDataSet)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Graduates_DatabaseDataSet.Graduates' table. You can move, or remove it, as needed.
Me.GraduatesTableAdapter.Fill(Me.Graduates_DatabaseDataSet.Graduates)
End Sub
Private Sub GraduatesBindingNavigator_RefreshItems(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduatesBindingNavigator.RefreshItems
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub PhotographLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub SurnameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SurnameTextBox.TextChanged
End Sub
Private Sub FillBysurnameToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Try
Me.GraduatesTableAdapter.FillBysurname(Me.Graduates_DatabaseDataSet.Graduates, SsnameToolStripTextBox.Text)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
End Sub
End Class