Information générale
Catégorie:
The Mere Mortals .NET Framework
Hi Tim. You're correct about what the user might/can do after a search. I'm not refreshing the grid. I can see the "Added" record being removed before the application errors out. The only thing I'm doing with the primary bo is performing a search and add/delete records. I have no code in any of the buttons, except for the "Search" button.
Private Sub btnSearch_Click(sender As System.Object, e As System.EventArgs) Handles btnSearch.Click
If Me.txtSearchName.Text "NOT EQUAL" String.Empty Then
Me._employee.SearchEmployeeByName(Me.txtSearchName.Text)
If Me._employee.EntityList.Count = 0 Then
Me.ShowMessage("Your search resulted in no matching records.")
Me.txtSearchName.Focus()
Me.txtSearchName.Text = String.Empty
Else
Me.txtName.Focus()
End If
Else
Me.ShowMessage("You must enter an employee name to peform a search.")
End If
End Sub
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement