FreeSelectionCourseView.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.SelectCourse
  9. {
  10. public class FreeSelectionCourseView
  11. {
  12. /// <summary>
  13. /// 任选课程ID
  14. /// </summary>
  15. public System.Guid FreeSelectionCouseID { get; set; }
  16. /// <summary>
  17. /// 教研室ID
  18. /// </summary>
  19. [Required]
  20. [DisplayName("教研室ID")]
  21. public Nullable<System.Guid> DepartmentID { get; set; }
  22. /// <summary>
  23. /// 教研室
  24. /// </summary>
  25. [DisplayName("教研室")]
  26. public string DepartmentName { get; set; }
  27. /// <summary>
  28. /// 院系所ID
  29. /// </summary>
  30. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  31. public Guid? CollegeID { get; set; }
  32. /// <summary>
  33. /// 院系所
  34. /// </summary>
  35. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  36. public string CollegeName { get; set; }
  37. /// <summary>
  38. /// 选课编号
  39. /// </summary>
  40. [Required]
  41. [DisplayName("选课编号")]
  42. public string No { get; set; }
  43. /// <summary>
  44. /// 课程信息ID
  45. /// </summary>
  46. [Required]
  47. [DisplayName("课程信息ID")]
  48. public Nullable<System.Guid> CoursematerialID { get; set; }
  49. /// <summary>
  50. /// 课程代码
  51. /// </summary>
  52. [DisplayName("课程代码")]
  53. public string CourseCode { get; set; }
  54. /// <summary>
  55. /// 课程名称
  56. /// </summary>
  57. [DisplayName("课程名称")]
  58. public string CourseName { get; set; }
  59. /// <summary>
  60. /// 课程类型
  61. /// </summary>
  62. [Required]
  63. [DisplayName("课程类型")]
  64. public Nullable<int> CourseTypeID { get; set; }
  65. /// <summary>
  66. /// 课程类型
  67. /// </summary>
  68. public string CourseTypeName { get; set; }
  69. /// <summary>
  70. /// 课程结构
  71. /// </summary>
  72. //[Required]
  73. [DisplayName("课程结构")]
  74. public Nullable<int> CourseStructureID { get; set; }
  75. /// <summary>
  76. /// 课程结构
  77. /// </summary>
  78. [DisplayName("课程结构")]
  79. public string CourseStructureName { get; set; }
  80. /// <summary>
  81. /// 课程属性
  82. /// </summary>
  83. [DisplayName("课程属性")]
  84. public Nullable<int> CourseCategoryID { get; set; }
  85. /// <summary>
  86. /// 课程属性
  87. /// </summary>
  88. [DisplayName("课程属性")]
  89. public string CourseCategoryName { get; set; }
  90. /// <summary>
  91. /// 课程性质
  92. /// </summary>
  93. [DisplayName("课程性质")]
  94. public Nullable<int> CourseQualityID { get; set; }
  95. /// <summary>
  96. /// 课程性质
  97. /// </summary>
  98. [DisplayName("课程性质")]
  99. public string CourseQualityName { get; set; }
  100. /// <summary>
  101. /// 实践类型
  102. /// </summary>
  103. [DisplayName("实践类型")]
  104. public int? PracticeTypeID { get; set; }
  105. /// <summary>
  106. /// 实践类型
  107. /// </summary>
  108. [DisplayName("实践类型")]
  109. public string PracticeTypeNameStr { get; set; }
  110. /// <summary>
  111. /// 实践类型
  112. /// </summary>
  113. [DisplayName("实践类型")]
  114. public string PracticeTypeName
  115. {
  116. get
  117. {
  118. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString())
  119. .Where(x => x.Value == PracticeTypeID)
  120. .Select(x => x.Name).FirstOrDefault();
  121. }
  122. }
  123. /// <summary>
  124. /// 考试方式
  125. /// </summary>
  126. [Required]
  127. [DisplayName("考试方式")]
  128. public Nullable<int> ExaminationModeID { get; set; }
  129. /// <summary>
  130. /// 考试方式
  131. /// </summary>
  132. [DisplayName("考试方式")]
  133. public string ExaminationModeName { get; set; }
  134. /// <summary>
  135. /// 成绩类型
  136. /// </summary>
  137. [Required]
  138. [DisplayName("成绩类型")]
  139. public int? ResultTypeID { get; set; }
  140. /// <summary>
  141. /// 授课语言
  142. /// </summary>
  143. [DisplayName("授课语言")]
  144. public Nullable<int> TeachinglanguageID { get; set; }
  145. /// <summary>
  146. /// 授课语言
  147. /// </summary>
  148. [DisplayName("授课语言")]
  149. public string TeachinglanguageName { get; set; }
  150. /// <summary>
  151. /// 授课方式
  152. /// </summary>
  153. [DisplayName("授课方式")]
  154. public List<int> TeachingModeID { get; set; }
  155. /// <summary>
  156. /// 授课方式
  157. /// </summary>
  158. [DisplayName("授课方式")]
  159. public string TeachingModeName { get; set; }
  160. /// <summary>
  161. /// 开课学年
  162. /// </summary>
  163. [DisplayName("开课学年")]
  164. public Nullable<int> SchoolyearNumID { get; set; }
  165. /// <summary>
  166. /// 开课学年
  167. /// </summary>
  168. [DisplayName("开课学年")]
  169. public string SchoolyearNumName { get; set; }
  170. /// <summary>
  171. /// 学期
  172. /// </summary>
  173. [DisplayName("学期")]
  174. public Nullable<int> SchoolcodeID { get; set; }
  175. /// <summary>
  176. /// 学期
  177. /// </summary>
  178. [DisplayName("学期")]
  179. public string SchoolcodeName { get; set; }
  180. /// <summary>
  181. /// 开课学期
  182. /// </summary>
  183. [DisplayName("开课学期")]
  184. public Nullable<int> StarttermID { get; set; }
  185. /// <summary>
  186. /// 开课学期
  187. /// </summary>
  188. [DisplayName("开课学期")]
  189. public string StarttermName { get; set; }
  190. /// <summary>
  191. /// 学分
  192. /// </summary>
  193. [Required]
  194. [DisplayName("学分")]
  195. [RegularExpression(@"^(([1-9]+)|([0-9]+\.[0-9]{1,2}))$", ErrorMessage = "请输整数或保留2位小数")]
  196. public decimal Credit { get; set; }
  197. /// <summary>
  198. /// 总学时
  199. /// </summary>
  200. [DisplayName("总学时")]
  201. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  202. public int? Totalhours
  203. {
  204. get;
  205. set;
  206. //get
  207. //{
  208. // return ((TheoryCourse ?? 0) + (Practicehours ?? 0) + (Trialhours ?? 0));
  209. //}
  210. }
  211. /// <summary>
  212. /// 理论学时
  213. /// </summary>
  214. [Required]
  215. [DisplayName("理论学时")]
  216. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  217. public int? TheoryCourse { get; set; }
  218. /// <summary>
  219. /// 实践学时
  220. /// </summary>
  221. [Required]
  222. [DisplayName("实践学时")]
  223. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  224. public int? Practicehours { get; set; }
  225. /// <summary>
  226. /// 实验学时
  227. /// </summary>
  228. [Required]
  229. [DisplayName("实验学时")]
  230. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  231. public int? Trialhours { get; set; }
  232. /// <summary>
  233. /// 上课周数
  234. /// </summary>
  235. [DisplayName("上课周数")]
  236. public int? SchoolweeksNum
  237. {
  238. get
  239. {
  240. return (TheoryWeeklyNum ?? 0) + (PracticeWeeklyNum ?? 0) + (TrialWeeklyNum ?? 0);
  241. }
  242. }
  243. /// <summary>
  244. /// 每周次数
  245. /// </summary>
  246. [Required]
  247. [DisplayName("每周次数")]
  248. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  249. public int? WeeklyNum { get; set; }
  250. /// <summary>
  251. /// 理论周次
  252. /// </summary>
  253. [Required]
  254. [DisplayName("理论周次")]
  255. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  256. public int? TheoryWeeklyNum { get; set; }
  257. /// <summary>
  258. /// 实践周次
  259. /// </summary>
  260. [Required]
  261. [DisplayName("实践周次")]
  262. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  263. public int? PracticeWeeklyNum { get; set; }
  264. /// <summary>
  265. /// 实验周次
  266. /// </summary>
  267. [Required]
  268. [DisplayName("实验周次")]
  269. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  270. public int? TrialWeeklyNum { get; set; }
  271. /// <summary>
  272. /// 开始周次
  273. /// </summary>
  274. [DisplayName("开始周次")]
  275. [Required]
  276. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  277. public int? StartWeeklyNum { get; set; }
  278. /// <summary>
  279. /// 结束周次
  280. /// </summary>
  281. [Required]
  282. [DisplayName("结束周次")]
  283. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  284. public int? EndWeeklyNum { get; set; }
  285. /// <summary>
  286. /// 周学时
  287. /// </summary>
  288. [Required]
  289. [DisplayName("周学时")]
  290. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  291. public int? WeeklyHours { get; set; }
  292. /// <summary>
  293. /// 起止周次
  294. /// </summary>
  295. public string StartEndWeeklyNum
  296. {
  297. get
  298. {
  299. return (this.StartWeeklyNum.HasValue && this.EndWeeklyNum.HasValue) ?
  300. (this.StartWeeklyNum.Value.ToString() + "-" + this.EndWeeklyNum.Value.ToString()) : "";
  301. }
  302. }
  303. ///// <summary>
  304. ///// 授课地点
  305. ///// </summary>
  306. //[DisplayName("授课地点")]
  307. //public List<int> TeachingPlaceID { get; set; }
  308. ///// <summary>
  309. ///// 授课地点
  310. ///// </summary>
  311. //[DisplayName("授课地点")]
  312. //public string TeachingPlaceStr { get; set; }
  313. /// <summary>
  314. /// 是否启用
  315. /// </summary>
  316. [DisplayName("是否启用")]
  317. public bool IsEnable { get; set; }
  318. /// <summary>
  319. /// 是否启用
  320. /// </summary>
  321. [DisplayName("是否启用")]
  322. public string IsEnableDesc {
  323. get
  324. {
  325. return IsEnable == true ? "是" : "否";
  326. }
  327. }
  328. /// <summary>
  329. /// 备注
  330. /// </summary>
  331. [DisplayName("备注")]
  332. public string Remark { get; set; }
  333. /// <summary>
  334. /// RecordStatus
  335. /// </summary>
  336. public Nullable<int> RecordStatus { get; set; }
  337. /// <summary>
  338. /// CreateTime
  339. /// </summary>
  340. public Nullable<System.DateTime> CreateTime { get; set; }
  341. /// <summary>
  342. /// CreateUserID
  343. /// </summary>
  344. public Nullable<System.Guid> CreateUserID { get; set; }
  345. /// <summary>
  346. /// ModifyUserID
  347. /// </summary>
  348. public Nullable<System.Guid> ModifyUserID { get; set; }
  349. /// <summary>
  350. /// ModifyTime
  351. /// </summary>
  352. public Nullable<System.DateTime> ModifyTime { get; set; }
  353. }
  354. }