Exemplo n.º 1
0
        /// <summary>
        /// 获取用户的到期提醒事项Json数据
        /// </summary>
        /// <param name="pm">页面传递的分页对象</param>
        /// <returns></returns>
        public ActionResult GetAlerts(PageModel pm)
        {
            pm.PageIndex++;
            var alerts = _schedule.GetAlerts(User.Identity.GetUserId().ToInt());
            var pager  = new Pager <EventModel>(alerts, pm.PageIndex, pm.PageSize);

            return(Json(new
            {
                data = GetUrl(pager),
                total = pager.RecordCount,
            }, JsonRequestBehavior.AllowGet));
        }