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.GetList(expression, m => m.F_SortCode).ToList());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 字典键值对
        /// </summary>
        /// <returns></returns>
        private Dictionary <string, object> GetDataItemList()
        {
            List <ItemsDetail>          itemdata       = _itemsDetailSevice.GetList();
            Dictionary <string, object> dictionaryItem = new Dictionary <string, object>();
            List <Items> itemsList = _itemsService.Queryable(u => u.DeleteMark == false).ToList();

            foreach (Items item in itemsList)
            {
                List <ItemsDetail>          dataItemList       = itemdata.FindAll(t => t.FId == item.Id);
                Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>();
                foreach (ItemsDetail itemList in dataItemList)
                {
                    dictionaryItemList.Add(itemList.ItemCode, itemList.ItemName);
                }
                dictionaryItem.Add(item.EnCode, dictionaryItemList);
            }
            return(dictionaryItem);
        }
Exemplo n.º 3
0
 public Page <Sys_ItemsDetail> GetList(long pageIndex, long pageSize, string itemId, string keyWord)
 {
     return(_itemsDetailRepository.GetList(pageIndex, pageSize, itemId, keyWord));
 }