public static DataTable GetYieldTransitByCondition(string YieldTransitNo, string EMTinCarNo, string SellProjectname, string SendTime)
{
DataTable dt = new DataTable();
string strSql = string.Empty;
try
{
strSql += "select * from YieldTransitReturn_V where 是否退货=1 and 是否处理完=0 and 1=1 ";
if (!string.IsNullOrEmpty(YieldTransitNo))
{
strSql += "and 发货编号 like '%" + YieldTransitNo + "%' ";
}
if (!string.IsNullOrEmpty(EMTinCarNo))
{
strSql += " and 罐车编号 like '%" + EMTinCarNo + "%' ";
}
if (!string.IsNullOrEmpty(SellProjectname))
{
strSql += " and 工程名称 like '%" + SellProjectname + "%' ";
}
if (!string.IsNullOrEmpty(SendTime))
{
strSql += " and 发货时间 like '%" + SendTime + "%' ";
}
strSql += string.Format(" order by 序号 desc ");
Common.Conn.SqlHelper.getSqlTable(strSql, dt);
}
catch (Exception ex)
{
throw ex;
}
return dt;
}
模糊查询
最新推荐文章于 2023-05-10 19:50:39 发布