SelectedList.cshtml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "List";
  5. }
  6. @section scripts{
  7. <script src="~/Scripts/Business/SelectCourseManage/StudentSelectCourse.js" type="text/javascript"></script>
  8. <script type="text/javascript">
  9. var nonSelect = "@DropdownList.SELECT_ALL";
  10. $(function () {
  11. mnu = $.SystemGeneral.getUrlParam("MNU");
  12. });
  13. function selectCourseClick(index, row) {
  14. $(event.srcElement).attr("disabled", "disabled");
  15. if (row.IsSelected) {
  16. cancelSelectCourse(row.SelectCourseTypeID, row.CoursematerialID, row.CourseName, row.TeacherIDs, $(event.srcElement));
  17. } else {
  18. selectCourse(row.SelectCourseTypeID, row.CoursematerialID, row.CourseName, row.TeacherIDs, $(event.srcElement));
  19. }
  20. }
  21. function cancelSelectCourse(selectCourseTypeID, coursematerialID, courseName, teacherIDs, control) {
  22. $.messager.confirm("系统提示", "是否确定取消修读" + courseName + "?",
  23. function (r) {
  24. if (r) {
  25. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentSelectCourse/CancelSelectCourse', {
  26. grademajorID: $("#GrademajorID").val(),
  27. coursematerialID: coursematerialID,
  28. selectCourseTypeID: selectCourseTypeID,
  29. teacherIDs: teacherIDs
  30. }, function (data) {
  31. if (data.IsSuccess) {
  32. $.messager.alert("系统提示", "取消成功。");
  33. location.reload(true);
  34. } else {
  35. $.messager.alert("系统提示", data.Message);
  36. }
  37. control.removeAttr("disabled");
  38. }
  39. );
  40. } else {
  41. control.removeAttr("disabled");
  42. }
  43. });
  44. }
  45. function reload() {
  46. $("#dgStudentSelectCourseList").cmsXDataTable("load", $.getDataGridParams("dgStudentSelectCourseList"));
  47. }
  48. </script>
  49. }
  50. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  51. @Html.Position()
  52. <div class="p_SearchTitle">
  53. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  54. 查询条件
  55. </div>
  56. </div>
  57. <div class="p_title">
  58. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  59. 选修课程列表
  60. </div>
  61. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  62. </div>
  63. <div class="search_list">
  64. @Html.DataGrid(new DataGridOptions
  65. {
  66. Columns = new List<DataGridColumn>()
  67. {
  68. new BoundFieldColumn { FieldName="SchoolYearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.06 },
  69. //new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, OverflowLength=18, Width=0.14 },
  70. //new BoundFieldColumn { FieldName="Credit", HeaderText="学分", Align=AlignStyle.Center, Width=0.03 },
  71. //new BoundFieldColumn { FieldName="DefaultClassName", HeaderText="课程班级", Align=AlignStyle.Center, OverflowLength=20, Width=0.16 },
  72. //new BoundFieldColumn { FieldName="SelectCourseTypeName", HeaderText="课程类型", Align=AlignStyle.Center, OverflowLength=12, Width=0.1 },
  73. //new BoundFieldColumn { FieldName="PeopleNumlimit", HeaderText="人数上限", Align=AlignStyle.Center, Width=0.06 },
  74. //new BoundFieldColumn { FieldName="StudentCount", HeaderText="已选人数", Align=AlignStyle.Center, Width=0.06 },
  75. //new BoundFieldColumn { FieldName="TeacherNames", HeaderText="任课教师", Align=AlignStyle.Center, Width=0.12 },
  76. //new BoundFieldColumn { FieldName="IsNeedMaterialName", HeaderText="是否需要教材", Align=AlignStyle.Center },
  77. //new BoundFieldColumn { FieldName="", HeaderText="教材名称", Align=AlignStyle.Center },
  78. //new BoundFieldColumn { FieldName="WeeklyNum", HeaderText="周次", Align=AlignStyle.Center },
  79. //new BoundFieldColumn { FieldName="CoursesTimeName", HeaderText="上课时间", Align=AlignStyle.Center },
  80. //new BoundFieldColumn { FieldName="ClassroomName", HeaderText="上课教室", Align=AlignStyle.Center },
  81. //new BoundFieldColumn { FieldName="CampusName", HeaderText="校区", Align=AlignStyle.Center },
  82. //new BoundFieldColumn { FieldName="", HeaderText="报修时间", Align=AlignStyle.Center }
  83. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1 },
  84. new BoundFieldColumn { FieldName="SelectCourseTypeName", HeaderText="选修类型", Align=AlignStyle.Center, Width=0.05 },
  85. new BoundFieldColumn { FieldName="Credit", HeaderText="学分", Align=AlignStyle.Center, Width=0.03 },
  86. new BoundFieldColumn { FieldName="StartEndWeeklyNum", HeaderText="起止周次", Align=AlignStyle.Center, Width=0.06 },
  87. new BoundFieldColumn { FieldName="WeekdayTimesSegmentName", HeaderText="上课时间", Align=AlignStyle.Center, Width=0.1 },
  88. new BoundFieldColumn { FieldName="TeacherNames", HeaderText="任课教师", Align=AlignStyle.Center, Width=0.06 },
  89. new BoundFieldColumn { FieldName="ClassroomName", HeaderText="上课教室", Align=AlignStyle.Center, Width=0.05 },
  90. new BoundFieldColumn { FieldName="RecordStatusName", HeaderText="状态", Align=AlignStyle.Center, Width=0.04 }
  91. },
  92. IsCheckOnSelect = true,
  93. DataSourceUrl = Url.Content("~/StudentSelectCourse/SelectedList"),
  94. ID = "dgStudentSelectCourseList",
  95. IsPagination = false,
  96. IsShowRowNumbers = true,
  97. IsSingleSelect = false
  98. })
  99. </div>
  100. </div>