public async Task <ActionResult> PostList(int pageindex = 1)
        {
            WebListSearch search = new WebListSearch();

            TryUpdateModel(search);
            PageInfo <MessageModel> models = await messageProvider.WebList(search);

            return(View(models));
        }
Пример #2
0
 /// <summary>
 /// web后台列表页功能 add by caoheyang 20150616
 /// </summary>
 public async Task <PageInfo <MessageModel> > WebList(WebListSearch model)
 {
     string where = " 1=1 ";
     where        = where + (model.SendType == -1 ? "" : string.Format(" and SendType={0}", model.SendType));
     where        = where + (model.MessageType == -1 ? "" : string.Format(" and MessageType={0}", model.MessageType));
     where        = where + (model.PushWay == -1 ? "" : string.Format(" and PushWay={0}", model.PushWay));
     where        = where + (model.SentStatus == -1 ? "" : string.Format(" and SentStatus={0}", model.SentStatus));
     where        = where + (model.PubDateStart == null ? "" : string.Format(" and SendTime>='{0} 00:00:00'", model.PubDateStart.Value.ToString("yyyy-MM-dd")));
     where        = where + (model.PubDateEnd == null ? "" : string.Format(" and SendTime<='{0} 23:59:59'", model.PubDateEnd.Value.ToString("yyyy-MM-dd")));
     return(new PageHelper().GetPages <MessageModel>(SuperMan_Read, model.PageIndex, where, "Id desc", "Id,PushWay,MessageType,SendType,substring(Content,1,15) as Content,UpdateBy,SendTime,SentStatus,CreateTime", " message (nolock)", SystemConst.PageSize, true));
 }
Пример #3
0
 /// <summary>
 /// web后台列表页功能 add by caoheyang 20150616
 /// </summary>
 public async Task <PageInfo <MessageModel> > WebList(WebListSearch model)
 {
     return(await messageDao.WebList(model));
 }