我需要帮助在C#中创建搜索按钮,因为在Visual Basic中我有这个代码
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Me.CostumersBindingSource.Filter = "[ID] = ' " & Me.TextBox1.Text & "'"
End Sub
但我希望c#或任何想法都一样!!!
答案 0 :(得分:0)
这与C#
中的代码相同private void Button1_Click(object sender, EventArgs e)
{
this.CostumersBindingSource.Filter = "[ID] = ' " + this.TextBox1.Text + "'";
}