public DataTable SearchProduct(string Region,string ProductName, string Manufacturer)
{
string strSql = string.Empty;
strSql = "SELECT " +
"Guid ," +
"ProductNumber ," +
"ProductName ," +
"ProductStyle ," +
"ProductOrigin ," +
"PackUnit ," +
"ReferencePrice ," +
当Region = NUll时候要求ReferencePrice 列的值都为* 该怎么修改?
{
string strSql = string.Empty;
strSql = "SELECT " +
"Guid ," +
"ProductNumber ," +
"ProductName ," +
"ProductStyle ," +
"ProductOrigin ," +
"PackUnit ," +
"ReferencePrice ," +
当Region = NUll时候要求ReferencePrice 列的值都为* 该怎么修改?
------> "ReferencePrice = case when Region is null then '*' else ReferencePrice end ," +
是Region参数
strSql = "SELECT " +
"Guid ," +
"ProductNumber ," +
"ProductName ," +
"ProductStyle ," +
"ProductOrigin ," +
"PackUnit ,"
if Region = string.Empty
strSql = strSql +
"ReferencePrice ='*',"
else
strSql = strSql +
"ReferencePrice ," strSql = strSql + ...