従業員データベースからレコードを読み取り、選択した項目 (Gridview ではなく) を表示する必要があります。これは、varbinary(max) に格納されている画像を除いて問題ありません。レコードを順方向と逆方向にたどる必要があります。画像のないレコードもあります。各レコードにそのデータセットを使用した変換方法を理解するのに問題があります。
私はVisual Studio 2008を使用しており、Windowsフォームアプリケーションでレコードを表示するためにthryngを使用しています。
助けていただければ幸いです。
以下は私のコードの一部です:
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