有一段代码如下:
private void Page_Load(object sender, System.EventArgs e)
{
If(!IsPostback)
{
string sSQl = "select Name from InfBuy where flag = 1";
DataSet dts = OracleEngine.ExcuteDataSet(0,CommandType.Text,sSQl);
DtgGrid1.DataSource = dts;
DtgGrid1.DataBind();
}
}private void btnSearch_Click(object sender, System.EventArgs e)
{
//判断下拉框是否为空
if( ) sSQl = sSQL + "AND Name Like '%" + DtgGrid1.selectItem.Text + "%'";
……………………}
其中,InfBuy表中第一条记录为空,请问:if括号中的条件该怎么表达?谢谢!
private void Page_Load(object sender, System.EventArgs e)
{
If(!IsPostback)
{
string sSQl = "select Name from InfBuy where flag = 1";
DataSet dts = OracleEngine.ExcuteDataSet(0,CommandType.Text,sSQl);
DtgGrid1.DataSource = dts;
DtgGrid1.DataBind();
}
}private void btnSearch_Click(object sender, System.EventArgs e)
{
//判断下拉框是否为空
if( ) sSQl = sSQL + "AND Name Like '%" + DtgGrid1.selectItem.Text + "%'";
……………………}
其中,InfBuy表中第一条记录为空,请问:if括号中的条件该怎么表达?谢谢!
///则为空.
就是它