//orderNo='HY13013100003'
private List<Yee.Data.SqlClient.view_CoiOutOfStockRate> getList(int pageIndex, int pageSize, out int total,string orderNo)
{
using (ErpEntities db = new ErpEntities())
{
var query = from a in db.view_CoiOutOfStockRate
where a.OrderNo==orderNo
orderby a.OrderNo
select a;
total = query.Count();
return query.Skip(pageIndex * pageSize).Take(pageSize).ToList();
}
}
数据库里面是有这条记录的
但是这样查出来的结果query.count()是等于0.
你的orderNo是不是带有空格啊!
没有,取得是文本框的值!Trim掉的
string orderNo = this.txtOrderNo.Text.Trim();
equals会用吗 啊哈哈~