Linq 多件拼接

var q = from n in CC_
select n;
if (keys=="none")
{
q = q.Where(p => p.sales_account==sales);
}
if (keys1 != "")
{
q = q.Where(p => p.customer_name.Contains(keys1) || p.customer_code.Contains(keys1));
}

posted on 2012-10-19 19:00  淡定的无奈  阅读(153)  评论(0编辑  收藏  举报

导航