public static string IntegralList(int pageindex, int pagesize, int comid, string key = "") { int totalcount = 0; try { B2bFinanceData fdate = new B2bFinanceData(); var crmdata = new B2bCrmData(); var list = fdate.IntegralList(pageindex, pagesize, comid, out totalcount, 0, key); IEnumerable result = ""; if (list != null) { result = from finance in list select new { Id = finance.Id, OrderId = finance.OrderId, Mid = finance.Mid, Money = finance.Money, OrderName = finance.OrderName, Subdate = finance.Subdate, Comid = finance.Comid, Ptype = finance.Ptype, Admin = finance.Admin, Ip = finance.Ip, Crm = crmdata.GetB2bCrmById(finance.Mid) } } ; return(JsonConvert.SerializeObject(new { type = 100, totalCount = totalcount, msg = result })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, totalCount = 0, msg = ex.Message })); throw; } }