StudentViewSelect.cshtml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "StudentViewSelect";
  5. ComboGridOptions cgop = new ComboGridOptions
  6. {
  7. TextField = "Name",
  8. ValueField = "CollegeID",
  9. Name = "CollegeComboGrid",
  10. ID = "CollegeComboGrid",
  11. SelectedValue = ViewBag.CollegeID,
  12. OnSelect = "SelectCollegeComboGrid",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  18. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 }
  19. },
  20. OnLoadSuccessFun = "queryGrade",
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  23. IsPagination = true,
  24. IsShowRowNumbers = true,
  25. IsSingleSelect = false
  26. }
  27. };
  28. ComboGridOptions cgopGrademajor = new ComboGridOptions
  29. {
  30. TextField = "Name",
  31. ValueField = "GrademajorID",
  32. Name = "GrademajorComboGrid",
  33. ID = "GrademajorComboGrid",
  34. OnSelect = "SelectGrademajorComboGrid",
  35. SelectedValue = ViewBag.GrademajorID,
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.1 },
  41. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.3 }
  42. },
  43. OnLoadSuccessFun = "queryClass",
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Content("~/Grademajor/List"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. ComboGridOptions cgopClassmajor = new ComboGridOptions
  52. {
  53. TextField = "Name",
  54. ValueField = "ClassmajorID",
  55. Name = "ClassmajorComboGrid",
  56. ID = "ClassmajorComboGrid",
  57. OnSelect = "reload",
  58. SelectedValue = ViewBag.ClassmajorID,
  59. GridOptions = new DataGridOptions
  60. {
  61. Columns = new List<DataGridColumn>()
  62. {
  63. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.1 },
  64. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 }
  65. },
  66. OnLoadSuccessFun = "queryStudent",
  67. IsCheckOnSelect = true,
  68. DataSourceUrl = Url.Content("~/Classmajor/List"),
  69. IsPagination = true,
  70. IsShowRowNumbers = true,
  71. IsSingleSelect = false
  72. }
  73. };
  74. var cgopStudent = new ComboGridOptions
  75. {
  76. TextField = "UserName",
  77. ValueField = "UserID",
  78. Name = "StudentComboGrid",
  79. ID = "StudentComboGrid",
  80. OnSelect = "SelectStudentComboGrid",
  81. GridOptions = new DataGridOptions
  82. {
  83. Columns = new List<DataGridColumn>()
  84. {
  85. new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.2 },
  86. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 }
  87. },
  88. IsCheckOnSelect = true,
  89. DataSourceUrl = Url.Content("~/Students/BaseStudentViewList"),
  90. IsPagination = true,
  91. IsShowRowNumbers = true,
  92. IsSingleSelect = false
  93. }
  94. };
  95. }
  96. @section scripts{
  97. <script src="~/Scripts/Business/Common/StudentViewSelect.js" type="text/javascript"></script>
  98. <script type="text/javascript">
  99. var InSchool = null;
  100. $(function () {
  101. InSchool = '@ViewBag.InSchool';
  102. })
  103. var nonSelect = "";
  104. function Student_Confirm() {
  105. var listData = validChoose();
  106. if (listData.length < 1) {
  107. $.messager.alert("系统提示", "请选择要添加的学生。");
  108. return;
  109. }
  110. top.$("#@(Request["WindowID"])").data("resultData", validChoose());
  111. top.$("#@(Request["WindowID"])").dialog("close");
  112. }
  113. </script>
  114. }
  115. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  116. <div class="p_title">
  117. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  118. 学生信息列表
  119. </div>*@
  120. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  121. <div class="current_navbar toolbar">
  122. <div class="func_info">
  123. <a class="easyui-linkbutton" href="javascript:Student_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  124. onfocus="this.blur()">选中</a>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <form id="formQuery" method="post">
  130. <div class="search_keyword">
  131. <div class="search_input">
  132. <ul>
  133. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  134. <li class="sv">
  135. @Html.ComboGrid(cgop, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  136. </li>
  137. <li class="sn" style="padding-left: 5px;">年级专业:</li>
  138. <li class="sv">
  139. @Html.ComboGrid(cgopGrademajor, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  140. </li>
  141. <li class="sn" style="padding-left: 5px;">班级名称:</li>
  142. <li class="sv">
  143. @Html.ComboGrid(cgopClassmajor, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  144. </li>
  145. </ul>
  146. @*<ul>
  147. <li class="sn" style="padding-left: 5px;">姓名:</li>
  148. <li class="sv">
  149. @Html.ComboGrid(cgopStudent, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  150. </li>
  151. </ul>*@
  152. </div>
  153. </div>
  154. @Html.PositionCondition("StudentSelect",null)
  155. </form>
  156. <div class="search_list">
  157. @Html.DataGrid(new DataGridOptions
  158. {
  159. Columns = new List<DataGridColumn>()
  160. {
  161. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID"},
  162. new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  163. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.05 },
  164. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center , Width=0.03},
  165. new BoundFieldColumn { FieldName="Years", HeaderText="年级", Align=AlignStyle.Center, Width=0.3 },
  166. new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  167. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  168. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 },
  169. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, Width=0.04 }
  170. },
  171. IsAutoLoad = false,
  172. IsCheckOnSelect = true,
  173. DataSourceUrl = Url.Content("~/Students/BaseStudentViewList"),
  174. ID = "dgStudentList",
  175. IsPagination = true,
  176. IsShowRowNumbers = true,
  177. IsSingleSelect = false,
  178. IsAutoHeight = false,
  179. })
  180. </div>
  181. </div>