private void LoadData_UserMessage(string phone) { var recordCount = 0; //近一个星期数据 var stTime = DateTime.Parse(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd") + " 00:00:00"); var endTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59"); var data = MessageBLL.GetList_Map(phone, "", 0, stTime, endTime, 1, 20, out recordCount); ViewBag.UserMessageRecordCount = recordCount; ViewBag.UserMessageDataSource = data; }
public ActionResult btnUserMessageSearch_Click(JArray UserMessageGrid_fields, string phone, int type, DateTime startTime, DateTime endTime, int UserMessageGrid_pageIndex, int UserMessageGrid_pageSize) { var grid1 = UIHelper.Grid("UserMessageGrid"); var recordCount = 0; var stTime = DateTime.Parse(startTime.ToString("yyyy-MM-dd") + " 00:00:00"); var edTime = DateTime.Parse(endTime.ToString("yyyy-MM-dd") + " 23:59:59"); var data = MessageBLL.GetList_Map(phone, "", type, stTime, edTime, UserMessageGrid_pageIndex + 1, UserMessageGrid_pageSize, out recordCount); grid1.RecordCount(recordCount); grid1.DataSource(data, UserMessageGrid_fields); return(UIHelper.Result()); }