/// <summary> /// 排 /// </summary> /// <param name="yybh"></param> /// <param name="qdid"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="count"></param> /// <returns></returns> public List <PqQyModel> GetQuDaoPqList(string yybh, int qdid, int pageIndex, int pageSize, ref int count) { StringBuilder strWhere = new StringBuilder(); if (!string.IsNullOrEmpty(yybh)) { strWhere.AppendFormat(" a.yybh='{0}'", yybh); } if (qdid > 0) { strWhere.AppendFormat(" AND a.qdid = {0}", qdid); } PageEntity pageEntity = new PageEntity() { TableName = " dbo.pq_qy a INNER JOIN dbo.xt_qdjbxx b ON a.qdid=b.qdid INNER JOIN dbo.xt_dsfbz c ON b.qdid=c.id and a.yybh=b.yybh ", Fields = "a.pqbh,a.qdid,a.ksrq,a.jsrq,a.jzsj,a.tqts,a.tjrs,a.xxr,c.dsfbz as qdmc", PageIndex = pageIndex, PageSize = pageSize, WhereStr = strWhere.ToString(), OrderBy = "a.cjsj desc" }; var list = new PagingService().GetPage <PqQyModel>(pageEntity, out count); list.ForEach(x => { x.xxr = x.xxr.Replace("0", "星期日").Replace("1", "星期一").Replace("2", "星期二").Replace("3", "星期三").Replace("4", "星期四").Replace("5", "星期五").Replace("6", "星期六").Replace("|", ","); }); return(list); }
public PageData <Issue> GetPage(int dialogueId, int page) { return(RepositoryProvider.Do(repo => { var data = repo.GetCollection <Issue>(i => i.DialogueId == dialogueId); return PagingService.GetPaging(data, page, 100); })); }
public PageData <Language> GetPage(int page) { return(RepositoryProvider.Do(repo => { var data = repo.GetCollection <Language>() .Where(language => language.ParentId == null).OrderBy(language => language.Name); var pageData = PagingService.GetPaging(data, page); return pageData; })); }
public PageData <Actor> GetPage(int idDialogue, int page) { return(RepositoryProvider.Do(repo => { var data = repo.GetCollection <Actor>() .Where(a => a.DialogueId == idDialogue); var pageData = PagingService.GetPaging(data, page); return pageData; })); }
public PageData <Dialogue> GetPage(DialoguePageParams @params) { return(RepositoryProvider.Do(repo => { var data = repo.GetCollection <Dialogue>() .Where(FilterQuery(@params.IdUser, @params.Name, @params.LanguageId)); var pageData = PagingService.GetPaging(data, @params.Page, @params.SizePage); return pageData; })); }
/// <summary> /// /// </summary> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="count"></param> /// <param name="yybh"></param> /// <param name="qybh"></param> /// <returns></returns> public List <dynamic> GetPageList(int pageIndex, int pageSize, ref int count, string yybh, string qybh, int type) { StringBuilder strWhere = new StringBuilder(); if (!string.IsNullOrEmpty(yybh)) { strWhere.AppendFormat(" a.yybh='{0}'", yybh); } if (!string.IsNullOrEmpty(qybh)) { strWhere.AppendFormat(" and a.qybh= '{0}'", qybh); } if (type == 0) { strWhere.AppendFormat(" and b.sfqd=0"); } else { strWhere.AppendFormat(" and b.sfqd=1"); } PageEntity pageEntity = new PageEntity(); pageEntity = new PageEntity() { TableName = " dbo.pq_qysz a INNER JOIN dbo.qy_jbxx b ON a.yybh=b.yybh AND a.qybh=b.bh and b.sfqy=1 ", Fields = "a.pqbh,a.yybh,a.qybh,a.ksrq,a.jsrq,a.tqts,a.jzsj,a.xxr,a.tjrs,b.mc", PageIndex = pageIndex, PageSize = pageSize, WhereStr = strWhere.ToString(), OrderBy = "a.cjsj desc" }; var list = new PagingService().GetPage <dynamic>(pageEntity, out count); list.ForEach(x => { x.xxr = x.xxr.Replace("0", "星期日").Replace("1", "星期一").Replace("2", "星期二").Replace("3", "星期三").Replace("4", "星期四").Replace("5", "星期五").Replace("6", "星期六").Replace("|", ","); }); return(list); }
public EntityBaseService(IRepositoryProvider provider) { RepositoryProvider = provider; PagingService = new PagingService(); }