var query = from dt in tblProduct.AsEnumerable()
where dt.Field<string>("StockNo") =="" select dt; if (query.ToList().Count > 0) { Alert.ShowInTop("数据不全,仓库不能为空"); return; }var queryDesc = from dt in tblProduct.AsEnumerable()
orderby dt.Field<string>("Count") descending select dt; tblProduct = queryDesc.CopyToDataTable();foreach (DataRow Row in tblProduct.Rows)
{ if (Row["ProductNo"].ToString() == itemNO) { Row["Count"] ="";} }