link
public IEnumerable InsuranceSearch(InsuranceSC sc, out int TotalCount) { var data = from q in InsuranceDAL.InsuranceSearch(sc, out TotalCount).AsEnumerable() select new { Id=q.Field<int>("Id"), IPOutId = q.Field<int>("IPOutId"), SIName = String.IsNullOrEmpty(q.Field<string>("SIName")) ? "" : q.Field<string>("SIName"), IPSupplierId = q.Field<int>("IPSupplierId"), IPName = q.Field<string>("IPName"), IPPrice = q.Field<decimal>("IPPrice"), IPCoverage = q.Field<decimal>("IPCoverage"), IPStartDate = q.Field<DateTime>("IPStartDate").ToString("yyyy-MM-dd"), IPEndDate = q.Field<DateTime>("IPEndDate").ToString("yyyy-MM-dd"), IPValidDays = q.Field<int>("IPValidDays"), IPTaskOffType = q.Field<byte>("IPTaskOffType")==2?"比例":"固定值", IPTaskOffAmount = q.Field<decimal>("IPTaskOffAmount"), IPMaxCopies = q.Field<int>("IPMaxCopies"), IPFlag = q.Field<byte>("IPFlag") }; return data; }