private void btnSearch_Click(object sender, EventArgs e) { string name = this.txtName.Text; string sql = ""; if (name=="") { sql = "select * from company"; } else { sql = "select * from company where name like '" + name + "'"; } FrmSearch fs = new FrmSearch(sql); fs.ShowDialog(); }
private void btnSearch_Click(object sender, EventArgs e) { string name = this.txtName.Text; string sql = ""; if (name == "") { sql = "select * from company"; } else { sql = "select * from company where name like '" + name + "'"; } FrmSearch fs = new FrmSearch(sql); fs.ShowDialog(); }