StandardView.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using EMIS.ViewModel.Cache;
  7. using System.ComponentModel.DataAnnotations;
  8. namespace EMIS.ViewModel.UniversityInformationManage.Specialtyclass
  9. {
  10. public class StandardView
  11. {
  12. /// <summary>
  13. /// 专业名称
  14. /// </summary>
  15. [DisplayName("专业名称")]
  16. public int? StandardID { get; set; }
  17. /// <summary>
  18. /// 专业代码
  19. /// </summary>
  20. [DisplayName("专业代码")]
  21. public string StandardCode
  22. {
  23. get
  24. {
  25. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  26. .Where(x => x.Value == StandardID)
  27. .Select(x => x.Code).FirstOrDefault();
  28. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  29. }
  30. }
  31. /// <summary>
  32. /// 专业名称
  33. /// </summary>
  34. [DisplayName("专业名称")]
  35. public string StandardName
  36. {
  37. //get
  38. //{
  39. // return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  40. // .Where(x => x.Value == StandardID)
  41. // .Select(x => x.Name).FirstOrDefault();
  42. //}
  43. get;set;
  44. }
  45. }
  46. }