StudentScoreInputView.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.CacheManage;
  6. namespace EMIS.ViewModel.ScoreManage
  7. {
  8. public class StudentScoreInputView
  9. {
  10. //序号
  11. public int No { get; set; }
  12. /// <summary>
  13. /// 成绩录入ID
  14. /// </summary>
  15. public Guid? ScoreID { get; set; }
  16. public Guid? CoursematerialID{get;set;}
  17. /// <summary>
  18. /// 期末设定ID
  19. /// </summary>
  20. public Guid? FinalExaminationID { get; set; }
  21. /// <summary>
  22. /// 学生ID
  23. /// </summary>
  24. public Guid? UserID { get; set; }
  25. /// <summary>
  26. /// 学号
  27. /// </summary>
  28. public string LoginID { get; set; }
  29. /// <summary>
  30. /// 姓名
  31. /// </summary>
  32. public string UserName { get; set; }
  33. /// <summary>
  34. /// 考试性质
  35. /// </summary>
  36. public int? ExamsCategoryID { get; set; }
  37. /// <summary>
  38. /// 考试性质
  39. /// </summary>
  40. public string ExamsCategoryName
  41. {
  42. get
  43. {
  44. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString())
  45. .Where(x => x.Value == ExamsCategoryID)
  46. .Select(x => x.Name).FirstOrDefault();
  47. }
  48. }
  49. /// <summary>
  50. /// 考试状态
  51. /// </summary>
  52. public int? ExamsStateID { get; set; }
  53. /// <summary>
  54. /// 考试性质
  55. /// </summary>
  56. public string ExamsStateName
  57. {
  58. get
  59. {
  60. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsState.ToString())
  61. .Where(x => x.Value == ExamsStateID)
  62. .Select(x => x.Name).FirstOrDefault();
  63. }
  64. }
  65. /// <summary>
  66. /// 总成绩
  67. /// </summary>
  68. public decimal? TotalScore { get; set; }
  69. /// <summary>
  70. /// 学分
  71. /// </summary>
  72. public decimal? Credit { get; set; }
  73. /// <summary>
  74. /// 绩点
  75. /// </summary>
  76. public decimal? GradePoint { get; set; }
  77. /// <summary>
  78. /// 备注
  79. /// </summary>
  80. public string Remarks { get; set; }
  81. //dictionary反序列化时,键必须为字符串或者对象……
  82. public Dictionary<string, StudentScoreInputDetailView> ScoreDetail { get; set; }
  83. public bool IsCanEdit { get; set; }
  84. public bool IsConvert { get; set; }
  85. public int? StarttermID { get; set; }
  86. /// <summary>
  87. /// 考试状态
  88. /// </summary>
  89. public int? RecordStatus { get; set; }
  90. }
  91. [Serializable]
  92. public class StudentScoreInputDetailView
  93. {
  94. public Guid? UserID { get; set; }
  95. public int? ScoreTypeID { get; set; }
  96. public decimal? Score { get; set; }
  97. public bool IsCanEdit { get; set; }
  98. public int? RecordStatus { get; set; }
  99. public static explicit operator StudentScoreInputDetailView(string jsonString)
  100. {
  101. return Newtonsoft.Json.JsonConvert.DeserializeObject<StudentScoreInputDetailView>(jsonString);
  102. }
  103. public override string ToString()
  104. {
  105. return Newtonsoft.Json.JsonConvert.SerializeObject(this);
  106. }
  107. }
  108. }