HighChat动态绑定数据 数据后台绑定
Posted elsons
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HighChat动态绑定数据 数据后台绑定相关的知识,希望对你有一定的参考价值。
后台绑定数据,直接返回json数据
IList<SummaryHour> adHourData = summarybll.FindList(str); List<int> Hour = new List<int>() { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; List<int> downNumber = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; List<int> RegisterNumber = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; List<int> ClickNumber = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; double max = 1; if (adHourData.Count() > 0) { max = adHourData.OrderByDescending(x => x.DownNumber).FirstOrDefault().DownNumber; Hour.Clear(); downNumber.Clear(); RegisterNumber.Clear(); ClickNumber.Clear(); foreach (var item in adHourData) { Hour.Add(item.Hour); downNumber.Add(item.DownNumber); RegisterNumber.Add(item.RegisterNumber); ClickNumber.Add(item.ClickNumber); } } results = new { Hour = Hour, DownNumber = downNumber, RegisterNumber = RegisterNumber, ClickNumber = ClickNumber, max = max, type = 0 }; return Json(results);
以上是关于HighChat动态绑定数据 数据后台绑定的主要内容,如果未能解决你的问题,请参考以下文章