| | |
| | | Expression<Func<DtStockInfo, bool>> floor = null; |
| | | Expression<Func<DtStockInfo, bool>> areaId = null; |
| | | Expression<Func<DtStockInfo, bool>> materielCode = null; |
| | | Expression<Func<DtStockInfo, bool>> materielName = null; |
| | | foreach (var item in searchParametersList) |
| | | { |
| | | if (item.Name.Contains("locationStatus")) |
| | |
| | | { |
| | | materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode == item.Value); |
| | | } |
| | | else if (item.Name.Contains("materielName")) |
| | | { |
| | | materielName = x => x.StockInfoDetails.Any(d => d.MaterielName == item.Value); |
| | | } |
| | | } |
| | | //.IncludesAllFirstLayer() |
| | | var data = BaseDal.Db.Queryable<DtStockInfo>() |
| | |
| | | .WhereIF(floor != null, floor) |
| | | .WhereIF(areaId != null, areaId) |
| | | .WhereIF(materielCode != null, materielCode) |
| | | .WhereIF(materielName != null, materielName) |
| | | .OrderBy(orderByModels) |
| | | .ToPageList(options.Page, options.Rows, ref totalCount); |
| | | new PageGridData<DtStockInfo>(totalCount, data); |