Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(New Globalization.CultureInfo("AR"))
'TODO: This line of code loads data into the 'MyData2017DataSet.Employees' table. You can move, or remove it, as needed. '
Me.EmployeesTableAdapter.Fill(Me.MyData2017DataSet.Employees)
View()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.EmployeesBindingSource.Filter = "[Ename] LIKE '" & Me.TextBox1.Text.Trim & "%'"
View()
End Sub
Private Sub EmployeesDataGridView_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles EmployeesDataGridView.CellClick
View()
End Sub
Private Sub View()
Dim idCard As Integer = 0
If EmployeesBindingSource.Position >= 0 Then
idCard = CType(EmployeesBindingSource.List(EmployeesBindingSource.Position), DataRowView).Item("Idcadr")
End If
Me.EjazhTableAdapter.FillByIdCard(Me.MyData2017DataSet.Ejazh, idCard)
Me.DorahTableAdapter.FillByIdCard(Me.MyData2017DataSet.Dorah, idCard)
Me.EjazhDataGridView.ClearSelection()
Me.DorahDataGridView.ClearSelection()
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End
End Sub
End Class