123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.SystemView;
- using EMIS.ViewModel;
- namespace EMIS.DataLogic.SystemDAL
- {
- public class DictionaryDAL
- {
- public DictionaryItemRepository DictionaryItemRepository { get; set; }
- public IQueryable<DictionaryItemView> GetDictionaryItemQuery(DictionaryItem dictionaryCode)
- {
- var code = dictionaryCode.ToString();
- return GetDictionaryItemQuery(code);
- }
- public IQueryable<DictionaryItemView> GetDictionaryItemQuery(string dictionaryCode)
- {
- var query = DictionaryItemRepository
- .GetList(w => w.DictionaryCode == dictionaryCode)
- .Select(s => new DictionaryItemView
- {
- DictionaryCode = s.DictionaryCode,
- Code = s.Code,
- Name = s.Name,
- Value = s.Value,
- OrderNo = s.OrderNo,
- });
- return query;
- }
- }
- }
|