123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.Entities;
- using EMIS.ViewModel;
- using EMIS.ViewModel.CacheManage;
- namespace EMIS.Utility
- {
- public class DictionaryHelper
- {
- /// <summary>
- ///
- /// </summary>
- /// <param name="dictionaryItem"></param>
- /// <returns></returns>
- public static IEnumerable<Sys_DictionaryItem> GetDictionaryValue(DictionaryItem dictionaryItem)
- {
- return GetDictionaryValue(dictionaryItem.ToString());
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="dictionaryValue"></param>
- /// <param name="dictionaryCode"></param>
- /// <returns></returns>
- public static Sys_DictionaryItem GetSingleDictionary(int dictionaryValue, string dictionaryCode)
- {
- return GetDictionaryValue(dictionaryCode).FirstOrDefault(x => x.Value == dictionaryValue);
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="dictionaryCode"></param>
- /// <returns></returns>
- public static IEnumerable<Sys_DictionaryItem> GetDictionaryValue(string dictionaryCode)
- {
- return IdNameExt.GetDictionaryItem(dictionaryCode);
- }
- }
- }
|