public string _UserProfitList(string sqlwhere) { if (string.IsNullOrEmpty(sqlwhere)) { sqlwhere += "1=1"; } else sqlwhere += " and 1=1"; sqlwhere += " and id in (select id from custom_user where rid=10) "; UserProfitBll ob = new UserProfitBll(); List<UserProfit> orderList = new List<UserProfit>(); orderList = ob.GetModelList(sqlwhere); int rows = ob.GetRecordCount(sqlwhere); string output = JsonConvert.SerializeObject(orderList); string json = @"{""Rows"":" + output + @",""Total"":""" + rows + @"""}"; return json; }