RetakePlanTaskSettingView.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.RetakeManage
  9. {
  10. public class RetakePlanTaskSettingView : RetakePlanTaskView
  11. {
  12. /// <summary>
  13. /// 是否验证冲突
  14. /// </summary>
  15. [DisplayName("是否验证冲突")]
  16. public bool? IsNeedVerify { get; set; }
  17. /// <summary>
  18. /// 课程结构
  19. /// </summary>
  20. [DisplayName("课程结构")]
  21. public int? CourseStructureID { get; set; }
  22. /// <summary>
  23. /// 课程结构
  24. /// </summary>
  25. [DisplayName("课程结构")]
  26. public string CourseStructureName
  27. {
  28. get
  29. {
  30. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseStructure.ToString())
  31. .Where(x => x.Value == CourseStructureID)
  32. .Select(x => x.Name).FirstOrDefault();
  33. }
  34. }
  35. /// <summary>
  36. /// 课程属性
  37. /// </summary>
  38. [DisplayName("课程属性")]
  39. public int? CourseCategoryID { get; set; }
  40. /// <summary>
  41. /// 课程属性
  42. /// </summary>
  43. [DisplayName("课程属性")]
  44. public string CourseCategoryName
  45. {
  46. get
  47. {
  48. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseCategory.ToString())
  49. .Where(x => x.Value == CourseCategoryID)
  50. .Select(x => x.Name).FirstOrDefault();
  51. }
  52. }
  53. /// <summary>
  54. /// 课程性质
  55. /// </summary>
  56. [DisplayName("课程性质")]
  57. public int? CourseQualityID { get; set; }
  58. /// <summary>
  59. /// 课程性质
  60. /// </summary>
  61. [DisplayName("课程性质")]
  62. public string CourseQualityName
  63. {
  64. get
  65. {
  66. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString())
  67. .Where(x => x.Value == CourseQualityID)
  68. .Select(x => x.Name).FirstOrDefault();
  69. }
  70. }
  71. /// <summary>
  72. /// 理论周次
  73. /// </summary>
  74. [Required]
  75. [DisplayName("理论周次")]
  76. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
  77. public int? TheoryWeeklyNum { get; set; }
  78. /// <summary>
  79. /// 实践周次
  80. /// </summary>
  81. [Required]
  82. [DisplayName("实践周次")]
  83. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
  84. public int? PracticeWeeklyNum { get; set; }
  85. /// <summary>
  86. /// 实验周次
  87. /// </summary>
  88. [Required]
  89. [DisplayName("实验周次")]
  90. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
  91. public int? TrialWeeklyNum { get; set; }
  92. /// <summary>
  93. /// 上课周数
  94. /// </summary>
  95. [Required]
  96. [DisplayName("上课周数")]
  97. public int? SchoolweeksNum
  98. {
  99. get
  100. {
  101. return (TheoryWeeklyNum ?? 0) + (PracticeWeeklyNum ?? 0) + (TrialWeeklyNum ?? 0);
  102. }
  103. }
  104. /// <summary>
  105. /// 周学时
  106. /// </summary>
  107. [Required]
  108. [DisplayName("周学时")]
  109. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]//^[1-9]\d*|0$
  110. public int? WeeklyHours { get; set; }
  111. /// <summary>
  112. /// 每周次数
  113. /// </summary>
  114. [Required]
  115. [DisplayName("每周次数")]
  116. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
  117. public int? WeeklyNum { get; set; }
  118. /// <summary>
  119. /// 实践类型
  120. /// </summary>
  121. [DisplayName("实践类型")]
  122. public int? PracticeTypeID { get; set; }
  123. /// <summary>
  124. /// 实践类型
  125. /// </summary>
  126. [DisplayName("实践类型")]
  127. public string PracticeTypeName
  128. {
  129. get
  130. {
  131. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString())
  132. .Where(x => x.Value == PracticeTypeID)
  133. .Select(x => x.Name).FirstOrDefault();
  134. }
  135. }
  136. /// <summary>
  137. /// 考试方式
  138. /// </summary>
  139. [Required]
  140. [DisplayName("考试方式")]
  141. public int? ExaminationModeID { get; set; }
  142. /// <summary>
  143. /// 考试方式
  144. /// </summary>
  145. [DisplayName("考试方式")]
  146. public string ExaminationModeName
  147. {
  148. get
  149. {
  150. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  151. .Where(x => x.Value == CourseTypeID)
  152. .Select(x => x.Name).FirstOrDefault();
  153. }
  154. }
  155. /// <summary>
  156. /// 授课语言
  157. /// </summary>
  158. [DisplayName("授课语言")]
  159. public int? TeachinglanguageID { get; set; }
  160. /// <summary>
  161. /// 授课语言
  162. /// </summary>
  163. [DisplayName("授课语言")]
  164. public string TeachinglanguageName
  165. {
  166. get
  167. {
  168. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Teachinglanguage.ToString())
  169. .Where(x => x.Value == TeachinglanguageID)
  170. .Select(x => x.Name).FirstOrDefault();
  171. }
  172. }
  173. /// <summary>
  174. /// 精品课程
  175. /// </summary>
  176. [DisplayName("精品课程")]
  177. public int? CourseFineID { get; set; }
  178. /// <summary>
  179. /// 精品课程
  180. /// </summary>
  181. [DisplayName("精品课程")]
  182. public string CourseFineName
  183. {
  184. get
  185. {
  186. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseFine.ToString())
  187. .Where(x => x.Value == CourseFineID)
  188. .Select(x => x.Name).FirstOrDefault();
  189. }
  190. }
  191. /// <summary>
  192. /// 是否专业核心
  193. /// </summary>
  194. [DisplayName("是否专业核心")]
  195. public bool IsSpecialtycore { get; set; }
  196. /// <summary>
  197. /// 是否专业核心
  198. /// </summary>
  199. [DisplayName("是否专业核心")]
  200. public string IsSpecialtycoreName { get; set; }
  201. /// <summary>
  202. /// 是否合作开发课
  203. /// </summary>
  204. [DisplayName("是否合作开发课")]
  205. public bool IsCooperation { get; set; }
  206. /// <summary>
  207. /// 是否合作开发课
  208. /// </summary>
  209. [DisplayName("是否合作开发课")]
  210. public string IsCooperationName { get; set; }
  211. /// <summary>
  212. /// 是否必修课
  213. /// </summary>
  214. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
  215. public bool IsRequired { get; set; }
  216. /// <summary>
  217. /// 是否必修课
  218. /// </summary>
  219. [DisplayName("是否必修课")]
  220. public string IsRequiredName { get; set; }
  221. /// <summary>
  222. /// 是否网上选修课
  223. /// </summary>
  224. [DisplayName("是否网上选修课")]
  225. public bool IsElective { get; set; }
  226. /// <summary>
  227. /// 是否网上选修课
  228. /// </summary>
  229. [DisplayName("是否网上选修课")]
  230. public string IsElectiveName { get; set; }
  231. /// <summary>
  232. /// 是否网络课程
  233. /// </summary>
  234. [DisplayName("是否网络课程")]
  235. public bool IsNetworkCourse { get; set; }
  236. /// <summary>
  237. /// 是否网络课程
  238. /// </summary>
  239. [DisplayName("是否网络课程")]
  240. public string IsNetworkCourseName { get; set; }
  241. /// <summary>
  242. /// 是否学位或主干课
  243. /// </summary>
  244. [DisplayName("是否学位或主干课")]
  245. public bool IsMainCourse { get; set; }
  246. /// <summary>
  247. /// 是否学位或主干课
  248. /// </summary>
  249. [DisplayName("是否学位或主干课")]
  250. public string IsMainCourseName { get; set; }
  251. /// <summary>
  252. /// 处理方式
  253. /// </summary>
  254. [DisplayName("处理方式")]
  255. public int? HandleModeID { get; set; }
  256. /// <summary>
  257. /// 处理方式
  258. /// </summary>
  259. [DisplayName("处理方式")]
  260. public string HandleModeName
  261. {
  262. get
  263. {
  264. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  265. .Where(x => x.Value == HandleModeID)
  266. .Select(x => x.Name).FirstOrDefault();
  267. }
  268. }
  269. /// <summary>
  270. /// 是否需要教材
  271. /// </summary>
  272. [DisplayName("是否需要教材")]
  273. public bool IsNeedMaterial { get; set; }
  274. /// <summary>
  275. /// 是否需要教材
  276. /// </summary>
  277. [DisplayName("是否需要教材")]
  278. public string IsNeedMaterialName { get; set; }
  279. /// <summary>
  280. /// 排课明细
  281. /// </summary>
  282. [DisplayName("排课明细")]
  283. public string Scheduling { get; set; }
  284. /// <summary>
  285. /// 任课教师
  286. /// </summary>
  287. [DisplayName("任课教师")]
  288. public HashSet<RetakePlanTeacherListView> Teachers { get; set; }
  289. /// <summary>
  290. /// 任课教师
  291. /// </summary>
  292. [DisplayName("任课教师")]
  293. public string TeacherNames
  294. {
  295. get
  296. {
  297. var teacherNames = string.Join(",", Teachers.Select(x => x.Name).ToList());
  298. if (string.IsNullOrEmpty(teacherNames))
  299. {
  300. return "";
  301. }
  302. else
  303. {
  304. return teacherNames;
  305. }
  306. }
  307. }
  308. /// <summary>
  309. /// 重修计划授课方式ID
  310. /// </summary>
  311. [DisplayName("重修计划授课方式ID")]
  312. public Guid? RetakePlanTeachingModeTypeID { get; set; }
  313. /// <summary>
  314. /// 授课方式
  315. /// </summary>
  316. [DisplayName("授课方式")]
  317. public List<int> TeachingModeID { get; set; }
  318. /// <summary>
  319. /// 授课方式
  320. /// </summary>
  321. [DisplayName("授课方式")]
  322. public string TeachingModeName { get; set; }
  323. /// <summary>
  324. /// 重修计划授课地点ID
  325. /// </summary>
  326. [DisplayName("重修计划授课地点ID")]
  327. public Guid? RetakePlanTeachingPlaceID { get; set; }
  328. /// <summary>
  329. /// 授课地点
  330. /// </summary>
  331. [DisplayName("授课地点")]
  332. public List<int> TeachingPlaceID { get; set; }
  333. /// <summary>
  334. /// 授课地点名称
  335. /// </summary>
  336. [DisplayName("授课地点名称")]
  337. public string TeachingPlaceName { get; set; }
  338. /// <summary>
  339. /// 备注
  340. /// </summary>
  341. [DisplayName("备注")]
  342. public string Remarks { get; set; }
  343. /// <summary>
  344. /// 创建人
  345. /// </summary>
  346. [DisplayName("创建人")]
  347. public Guid? CreateUserID { get; set; }
  348. /// <summary>
  349. /// 创建时间
  350. /// </summary>
  351. [DisplayName("创建时间")]
  352. public DateTime? CreateTime { get; set; }
  353. }
  354. }