代码改变世界

Linq学习

2014-04-03 18:28  Patrick.Lee  阅读(145)  评论(0编辑  收藏  举报

                IEnumerable<DataRow> cbCurrent = from dr in cbRows.AsEnumerable()
                                                 where
                                                 dr.Field<string>("ObjectNO").ToString() == row["运输单号"].ToString() ||
                                                 dr.Field<string>("ObjectNO").ToString() == row["报关任务单"].ToString()
                                                 select dr;

 

 

            //收入
            DataRow[] srRows = chargeTable.Select(" chargeType = 1 and chargeSort <> 3");
            //代垫
            DataRow[] ddRows = chargeTable.Select(" chargeType = 1 and chargeSort = 3");
            //应付
            DataRow[] yfRows = chargeTable.Select(" chargeType = 2");
            //业务成本
            DataRow[] cbRows = chargeTable.Select(" chargeType = 3");