Ejemplo n.º 1
0
        /// <summary>
        /// 使用sql查询
        /// </summary>
        /// <param name="enCode"></param>
        /// <returns></returns>
        public List <ItemsDetailEntity> FildSql(string enCode)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(enCode);
            return(service.FindList(strSql.ToString()).ToList());
        }
Ejemplo n.º 2
0
        public List <ItemsDetailEntity> GetList(string itemId, string keyword, Pagination pagination)
        {
            var expression = ExtLinq.True <ItemsDetailEntity>();

            expression = expression.And(t => t.ItemId == itemId);
            if (!string.IsNullOrEmpty(keyword))
            {
                expression = expression.And(t => t.ItemName.Contains(keyword));
                expression = expression.Or(t => t.ItemCode.Contains(keyword));
            }
            expression = expression.And(t => t.DeleteMark != true);
            return(service.FindList(expression, pagination));
        }
Ejemplo n.º 3
0
        public IEnumerable <ItemsDetailEntity> GetList(Pagination pagination, string keyword = "", string itemId = "")
        {
            var expression = ExtLinq.True <ItemsDetailEntity>();

            if (!string.IsNullOrEmpty(itemId))
            {
                expression = expression.And(t => t.F_ItemId == itemId);
            }
            if (!string.IsNullOrEmpty(keyword))
            {
                expression = expression.And(t => t.F_ItemName.Contains(keyword));
                expression = expression.Or(t => t.F_ItemCode.Contains(keyword));
            }
            return(service.FindList(expression, pagination));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获得数据字典列表信息【分页】
        /// </summary>
        /// <param name="itemId"></param>
        /// <param name="keyword"></param>
        /// <returns></returns>
        public List <ItemsDetailEntity> GetList(Pagination pagination, string itemId = "", string keyword = "")
        {
            var expression = ExtLinq.True <ItemsDetailEntity>();

            if (!string.IsNullOrEmpty(itemId))
            {
                expression = expression.And(t => t.F_ItemId == itemId);
            }
            if (!string.IsNullOrEmpty(keyword))
            {
                expression = expression.And(t => t.F_ItemName.Contains(keyword));
                expression = expression.Or(t => t.F_ItemCode.Contains(keyword));
            }
            ResultClass <List <ItemsDetailEntity> > _ret = service.FindList(expression, pagination);

            if (_ret.Result)
            {
                return(_ret.ResultData.ToList());
            }
            return(new List <ItemsDetailEntity>());
        }