Exemplo n.º 1
0
        public List <ItemsDetailEntity> GetList(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));
            }
            return(service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList());
        }
Exemplo n.º 2
0
        public List <ItemsDetailEntity> GetItemsDetail(string encode)
        {
            var expression = ExtLinq.True <ItemsEntity>();

            if (!string.IsNullOrEmpty(encode))
            {
                expression = expression.And(t => t.F_EnCode.Contains(encode));
            }
            ItemsEntity itemType = serviceItem.FindEntity(expression);

            List <ItemsDetailEntity> details = new List <ItemsDetailEntity>();

            details = serviceItemDetails.IQueryable().ToList().Where(t => t.F_ItemId == itemType.F_Id).ToList();

            return(details);
        }
Exemplo n.º 3
0
        public List <MemberEntity> GetList(Pagination pagination, string keyword)
        {
            var expression = ExtLinq.True <MemberEntity>();

            if (!string.IsNullOrEmpty(keyword))
            {
                expression = expression.And(t => t.FullName.Contains(keyword) || t.ContactNumber.Contains(keyword) || t.VisitingCardNumber.Contains(keyword) || t.CredentialInformation.Contains(keyword));
            }
            List <MemberEntity> list = service.FindList(expression, pagination);

            foreach (var info in list)
            {
                info.Nationality = ItemsDetailService.IQueryable(item => item.F_Id == info.Nationality).FirstOrDefault().F_ItemName;
            }

            return(list);
        }
        public Task <List <ItemsDetailEntity> > GetList(string itemId, string keyword, string tenantId)
        {
            var expression = ExtLinq.True <ItemsDetailEntity>();

            if (!string.IsNullOrEmpty(itemId))
            {
                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(x => x.TenantId == tenantId);

            return(service.IQueryable(expression).OrderBy(t => t.SortCode).ToListAsync());
        }
Exemplo n.º 5
0
        public List <ItemsDetailEntity> GetList(string itemId = "", string keyword = "")
        {
            //cacheKey = cacheKey + "0_" + itemId + "_" + keyword;//拼接有参key值
            //var cacheList = cache.GetCache<List<ItemsDetailEntity>>(cacheKey);
            //if (cacheList == null)
            //{
            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));
            }
            var cacheList = service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList();

            //    cache.WriteCache<List<ItemsDetailEntity>>(cacheList, cacheKey, "UserCacheDependency", "Sys_ItemsDetail");
            //}
            return(cacheList);
        }
Exemplo n.º 6
0
 public List <ItemsDetailEntity> GetList()
 {
     return(service.IQueryable().ToList());
 }