StudentSelect.cshtml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "TeacherSelect";
  5. }
  6. @section scripts{
  7. <script src="~/Scripts/Business/Common/StudentSelect.js" type="text/javascript"></script>
  8. <script type="text/javascript">
  9. //获取选中的数据
  10. function validChooseTM() {
  11. var d = [];
  12. $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
  13. d.push(this);
  14. });
  15. return d;
  16. }
  17. function Student_Confirm() {
  18. var listData = validChooseTM();
  19. if (listData.length < 1) {
  20. $.messager.alert("系统提示", "请选择要添加的学生。");
  21. return;
  22. }
  23. top.$("#@(Request["WindowID"])").data("resultData", validChoose());
  24. top.$("#@(Request["WindowID"])").dialog("close");
  25. }
  26. </script>
  27. }
  28. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  29. <div class="p_title">
  30. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  31. 学生信息列表
  32. </div>*@
  33. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  34. <div class="current_navbar toolbar">
  35. <div class="func_info">
  36. <a class="easyui-linkbutton" href="javascript:Student_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  37. onfocus="this.blur()">选中</a>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <form id="formQuery" method="post">
  43. @Html.PositionCondition("StudentSelect",null)
  44. </form>
  45. <div class="search_list">
  46. @Html.DataGrid(new DataGridOptions
  47. {
  48. Columns = new List<DataGridColumn>()
  49. {
  50. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID"},
  51. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  52. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.05 },
  53. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, Width=0.03 },
  54. new BoundFieldColumn { FieldName="ClassMajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  55. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 },
  56. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, Width=0.04 }
  57. },
  58. PageSize = 30,
  59. IsCheckOnSelect = true,
  60. DataSourceUrl = Url.Content("~/StudentDistribute/StudentList?studentDistributeID=" + ViewBag.studentDistributeID + "&GrademajorID=" + ViewBag.GrademajorID),
  61. ID = "dgStudentList",
  62. IsPagination = true,
  63. IsShowRowNumbers = true,
  64. IsSingleSelect = false
  65. })
  66. </div>
  67. </div>