예제 #1
0
        public List <SysUser> GetList(Pagination pagination, string keyword)
        {
            var expression = base.GetFilterEnabled();

            if (!string.IsNullOrEmpty(keyword))
            {
                expression = expression.And(t => t.Account.Contains(keyword));
                expression = expression.Or(t => t.RealName.Contains(keyword));
                expression = expression.Or(t => t.MobilePhone.Contains(keyword));
            }
            return(_SysUserRespository.GetPagList(expression, pagination));
        }
예제 #2
0
        public List <SysUser> GetList(Pagination pagination, string keyword)
        {
            var expression = ExtLinq.True <SysUser>();

            if (!string.IsNullOrEmpty(keyword))
            {
                expression = expression.And(t => t.Account.Contains(keyword));
                expression = expression.Or(t => t.RealName.Contains(keyword));
                expression = expression.Or(t => t.MobilePhone.Contains(keyword));
            }
            expression = expression.And(t => t.Account != "admin");
            return(_SysUserRespository.GetPagList(expression, pagination));
        }