123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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; }
- /// <summary>
- ///
- /// </summary>
- /// <param name="dictionaryCode"></param>
- /// <returns></returns>
- public IQueryable<DictionaryItemView> GetDictionaryItemQuery(DictionaryItem dictionaryCode)
- {
- var code = dictionaryCode.ToString();
- return GetDictionaryItemQuery(code);
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="dictionaryCode"></param>
- /// <returns></returns>
- 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,
- });
- return query;
- }
- }
- }
|