示例#1
0
文件: DictOp.cs 项目: wang2650/Bap
        /// <summary>
        /// 字典列表
        /// </summary>
        /// <param name="methodName"></param>
        /// <param name="opUserId"></param>
        /// <param name="bgDt"></param>
        /// <param name="endDt"></param>
        /// <param name="Ip"></param>
        /// <param name="pageModel"></param>
        /// <returns></returns>
        public ListResult <WXQ.Enties.Dict> GetDictList(string GroupName, PageModel pageModel)
        {
            DictManager DictManager             = new DictManager();
            ListResult <WXQ.Enties.Dict> result = new ListResult <Enties.Dict>();

            System.Linq.Expressions.Expression <Func <Enties.Dict, bool> > express = Expressionable.Create <WXQ.Enties.Dict>()
                                                                                     .AndIF(!string.IsNullOrEmpty(GroupName), m => SqlFunc.Contains(m.GroupName, GroupName)).ToExpression();//拼接表达式

            result.Result = string.IsNullOrEmpty(GroupName) ? DictManager.GetPageList(express, pageModel, d => d.GroupName, OrderByType.Asc) : DictManager.GetPageList(express, pageModel, d => d.OrderBy, OrderByType.Asc);


            result.PageSize  = pageModel.PageSize;
            result.PageIndex = pageModel.PageIndex;
            result.Total     = pageModel.PageCount;
            return(result);
        }