AddCourse.cshtml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "AddCourse";
  5. ComboGridOptions cgopStandard = new ComboGridOptions
  6. {
  7. TextField = "StandardName",
  8. ValueField = "StandardID",
  9. OnSelect = "reload",
  10. Name = "StandardID",
  11. ID = "StandardID",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center }
  17. },
  18. IsCheckOnSelect = true,
  19. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  20. IsPagination = true,
  21. IsShowRowNumbers = true,
  22. IsSingleSelect = false,
  23. }
  24. };
  25. }
  26. @section scripts{
  27. <script type="text/javascript">
  28. function reload() {
  29. $("#dgStandardAndMinorSpecialtyCourseViewList").cmsXDataTable("load", $.getDataGridParams("dgStandardAndMinorSpecialtyCourseViewList"));
  30. }
  31. //获取选中的数据
  32. function validChoose() {
  33. var d = [];
  34. $.each($("#dgStandardAndMinorSpecialtyCourseViewList").cmsXDataTable("getSelections"), function (index) {
  35. d.push(this);
  36. });
  37. return d;
  38. }
  39. function Course_Confirm() {
  40. var listData = validChoose();
  41. if (listData.length < 1) {
  42. $.messager.alert("系统提示", "请选择要添加的课程。");
  43. return;
  44. }
  45. top.$("#@(Request["WindowID"])").data("resultData", validChoose());
  46. top.$("#@(Request["WindowID"])").dialog("close");
  47. }
  48. </script>
  49. }
  50. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  51. <div class="p_title">
  52. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  53. 学生信息列表
  54. </div>*@
  55. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  56. <div class="current_navbar toolbar">
  57. <div class="func_info">
  58. <a class="easyui-linkbutton" href="javascript:Course_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  59. onfocus="this.blur()">选中</a>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <form id="formQuery" method="post">
  65. <div class="search_keyword">
  66. <div class="search_input">
  67. <ul>
  68. <li class="sn" style="padding-left: 5px;">年级:</li>
  69. <li class="sv">
  70. @Html.SchoolYearDropDownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "YearID", Name = "YearID", OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgStandardAndMinorSpecialtyCourseViewList" } })
  71. </li>
  72. <li class="sn" style="padding-left: 5px;">专业名称:</li>
  73. <li class="sv">
  74. @Html.ComboGrid(cgopStandard, new Dictionary<string, string> { { "data-condition", "dgStandardAndMinorSpecialtyCourseViewList" } })
  75. </li>
  76. </ul>
  77. </div>
  78. </div>
  79. </form>
  80. <div class="search_list">
  81. @Html.DataGrid(new DataGridOptions
  82. {
  83. Columns = new List<DataGridColumn>()
  84. {
  85. new CheckBoxFieldColumn{ HeaderText="", FieldName="MinorCourseID" },
  86. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  87. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center },
  88. new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", Align=AlignStyle.Center },
  89. new TextBoxColumn { FieldName="Credit", HeaderText="学分",IsRequired=true, Align=AlignStyle.Center },
  90. new TextBoxColumn { FieldName="TheoryCourse", HeaderText="理论学时",IsRequired=true, Align=AlignStyle.Center },
  91. new TextBoxColumn { FieldName="Practicehours", HeaderText="实践学时",IsRequired=true, Align=AlignStyle.Center },
  92. new TextBoxColumn { FieldName="TheoryWeeklyNum", HeaderText="理论周次", Width=60 },
  93. new TextBoxColumn { FieldName="PracticeWeeklyNum", HeaderText="实践周次", Width=60 },
  94. new TextBoxColumn { FieldName="TrialWeeklyNum", HeaderText="实验周次", Width=60 },
  95. new TextBoxColumn { FieldName="StartWeeklyNum", HeaderText="开始周次", IsRequired=true, Width=60 },
  96. new TextBoxColumn { FieldName="EndWeeklyNum", HeaderText="结束周次", IsRequired=true, Width=60 },
  97. new TextBoxColumn { FieldName="WeeklyHours", HeaderText="周学时", Width=60 },
  98. new TextBoxColumn { FieldName="WeeklyNum", HeaderText="每周次数", Width=60 },
  99. new BoundFieldColumn { FieldName="ResultTypeID", HeaderText="成绩类型", Align=AlignStyle.Center, Width=0.1, IsHidden=true },
  100. new BoundFieldColumn { FieldName="SchoolyearNumID", HeaderText="开课学年", Align=AlignStyle.Center, Width=0.1, IsHidden=true },
  101. new BoundFieldColumn { FieldName="SchoolcodeID", HeaderText="开课学期", Align=AlignStyle.Center, Width=0.1, IsHidden=true }
  102. },
  103. IsAutoLoad = false,
  104. IsCheckOnSelect = true,
  105. DataSourceUrl = Url.Content("~/MinorPlanApply/StandardAndMinorSpecialtyCourseViewList"),
  106. ID = "dgStandardAndMinorSpecialtyCourseViewList",
  107. IsPagination = true,
  108. IsShowRowNumbers = true,
  109. IsSingleSelect = false
  110. })
  111. </div>
  112. </div>