EvaluationStudentList.cshtml 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "EvaluationStudentList";
  5. Guid? evaluationStudentSettingID = new Guid(Request["evaluationStudentSettingID"]);
  6. }
  7. @section scripts{
  8. <script type="text/javascript">
  9. var nonSelect = "@DropdownList.SELECT_ALL";
  10. var mnu = "";
  11. //加载
  12. $(function () {
  13. mnu = $.SystemGeneral.getUrlParam("MNU");
  14. var evaluationStudentSettingID = top.$("#@(Request["WindowID"])").data("inputData");
  15. $("#evaluationStudentSettingID").val(evaluationStudentSettingID);
  16. });
  17. //刷新
  18. function reload() {
  19. $("#dgEvaluationStudentList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationStudentList"));
  20. }
  21. //获取选中的数据All
  22. function validChooseAll() {
  23. var d = [];
  24. $.each($("#dgEvaluationStudentList").cmsXDataTable("getSelections"), function (index) {
  25. d.push(this);
  26. });
  27. return d;
  28. }
  29. //获取选中的数据
  30. function validChoose() {
  31. var d = [];
  32. $.each($("#dgEvaluationStudentList").cmsXDataTable("getSelections"), function (index) {
  33. d.push(this.UserID);
  34. });
  35. return d;
  36. }
  37. //添加
  38. function EvaluationStudentDetailt_Add() {
  39. var evaluationStudentSettingID = document.getElementById("evaluationStudentSettingID").value;
  40. var d = [];
  41. d.push(evaluationStudentSettingID);
  42. $.popupTopWindow('添加学生', CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/EvaluationStudentEdit?evaluationStudentSettingID=' + evaluationStudentSettingID + '&MNU=' +
  43. mnu, 720, 345, reload, d);
  44. }
  45. //删除
  46. function EvaluationStudentDetail_Delete() {
  47. var evaluationStudentSettingID = document.getElementById("evaluationStudentSettingID").value;
  48. var d = validChoose().join(',');
  49. if (d == "") {
  50. $.messager.alert("系统提示", "请选择您要删除的信息。");
  51. return;
  52. }
  53. var id = validChooseAll();
  54. if ($.grep(id, function (v, i) { return v.IsEvaluation == true; }).length > 0) {
  55. $.messager.alert("系统提示", "只能对未评状态的信息进行删除。");
  56. return;
  57. }
  58. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  59. if (r) {
  60. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/EvaluationStudentDelete', { evaluationStudentSettingID: evaluationStudentSettingID, userIDs: d }, function (data) {
  61. if (data.IsSuccess) {
  62. $.messager.alert("系统提示", data.Message);
  63. $("#dgEvaluationStudentList").cmsXDataTable('load');
  64. } else {
  65. $.messager.alert("系统提示", data.Message);
  66. }
  67. });
  68. }
  69. });
  70. }
  71. //设置列颜色为红色
  72. function SetRedColumn(index, row, value) {
  73. return " <span style=\"color: red;\">" + value + "</span>";
  74. }
  75. //Excel导出
  76. function EvaluationStudentDetail_Export() {
  77. $("#formQuery").submit();
  78. }
  79. </script>
  80. }
  81. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  82. <form id="formQuery" method="post" action="@Url.Content("~/EvaluationStudentSetting/EvaluationStudentListExcel?evaluationStudentSettingID=" + evaluationStudentSettingID)">
  83. @Html.PositionCondition("EvaluationStudent")
  84. <div class="search_keyword">
  85. <div class="search_input">
  86. <ul>
  87. <li class="sn" style="padding-left: 5px;color: red;">评价状态:</li>
  88. <li class="sv">
  89. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, DropdownListBindType.SelectAll,
  90. new ComboGridOptions
  91. {
  92. ID = "IsEvaluationDropdown",
  93. Name = "IsEvaluationDropdown",
  94. OnSelect = "reload"
  95. }, new Dictionary<string, string> { { "data-condition", "dgEvaluationStudentList" } })
  96. </li>
  97. <li class="sn" style="padding-left: 5px;color: red;">在校状态:</li>
  98. <li class="sv">
  99. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, DropdownListBindType.SelectAll,
  100. new ComboGridOptions
  101. {
  102. ID = "DictionaryInschoolStatus",
  103. Name = "DictionaryInschoolStatus",
  104. OnSelect = "reload"
  105. }, new Dictionary<string, string> { { "data-condition", "dgEvaluationStudentList" } })
  106. </li>
  107. </ul>
  108. </div>
  109. </div>
  110. <div class="p_title">
  111. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  112. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("StuDetail")</div>
  113. </div>
  114. </form>
  115. <div class="search_list">
  116. @Html.Hidden("evaluationStudentSettingID")
  117. @Html.DataGrid(new DataGridOptions
  118. {
  119. Columns = new List<DataGridColumn>()
  120. {
  121. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  122. //new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.08 },
  123. new BoundFieldColumn { FieldName="StudentNo", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  124. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  125. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="SexID", Width=0.02 },
  126. //new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, OrderFieldName="GradeID", Width=0.03, CustomFormatFun="SetRedColumn" },
  127. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.08 },
  128. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.08 },
  129. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", Width=0.04, CustomFormatFun="SetRedColumn" },
  130. //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, OrderFieldName="StudentStatus", Width=0.04 },
  131. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  132. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  133. //new BoundFieldColumn { FieldName="CourseStructureName", HeaderText="课程结构", Align=AlignStyle.Center, OrderFieldName="CourseStructureID", Width=0.05, OverflowLength=5 },
  134. //new BoundFieldColumn { FieldName="CourseCategoryName", HeaderText="课程属性", Align=AlignStyle.Center, OrderFieldName="CourseCategoryID", Width=0.05, OverflowLength=5 },
  135. new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", Align=AlignStyle.Center, OrderFieldName="CourseTypeID", Width=0.05, OverflowLength=5 },
  136. new BoundFieldColumn { FieldName="StaffCode", HeaderText="教师工号", Align=AlignStyle.Center, Width=0.04 },
  137. new BoundFieldColumn { FieldName="StaffName", HeaderText="任课教师", Align=AlignStyle.Center, Width=0.04 },
  138. //new BoundFieldColumn { FieldName="TitleName", HeaderText="职称", Align=AlignStyle.Center, OrderFieldName="TitleID", Width=0.03 },
  139. new BoundFieldColumn { FieldName="TeachingMethodName", HeaderText="任课方式", Align=AlignStyle.Center, OrderFieldName="TeachingMethodID", Width=0.04 },
  140. //new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, OrderFieldName="ParticipateTypeID", Width=0.04 },
  141. //new BoundFieldColumn { FieldName="EvaluationTypeCode", HeaderText="评价类型编号", Align=AlignStyle.Center, Width=0.06 },
  142. //new BoundFieldColumn { FieldName="EvaluationTypeName", HeaderText="评价类型", Align=AlignStyle.Center, Width=0.04 },
  143. //new BoundFieldColumn { FieldName="EvaluationTableCode", HeaderText="评价表编号", Align=AlignStyle.Center, Width=0.05 },
  144. new BoundFieldColumn { FieldName="EvaluationTableName", HeaderText="评价表名", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  145. new BoundFieldColumn { FieldName="OpenStateName", HeaderText="开放状态", Align=AlignStyle.Center, OrderFieldName="OpenState", Width=0.04, CustomFormatFun="SetRedColumn" },
  146. new BoundFieldColumn { FieldName="IsEvaluationName", HeaderText="评价状态", Align=AlignStyle.Center, OrderFieldName="IsEvaluation", Width=0.04, CustomFormatFun="SetRedColumn" }
  147. },
  148. IsPostBack = true,
  149. IsCheckOnSelect = true,
  150. DataSourceUrl = Url.Content("~/EvaluationStudentSetting/EvaluationStudentList?evaluationStudentSettingID=" + evaluationStudentSettingID),
  151. ID = "dgEvaluationStudentList",
  152. IsPagination = true,
  153. IsShowRowNumbers = true,
  154. IsSingleSelect = false
  155. })
  156. </div>
  157. </div>