StudentList.cshtml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. @model EMIS.ViewModel.ScoreManage.FinalExaminationView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. Guid? finalExaminationID = ViewBag.FinalExaminationID;
  7. }
  8. <style type="text/css">
  9. #FinalExaminationtable
  10. {
  11. width: 100%;
  12. border: 0px none;
  13. }
  14. #FinalExaminationtable tr
  15. {
  16. min-height: 30px;
  17. }
  18. .backgroundColor
  19. {
  20. background-color: #EEE8AA;
  21. }
  22. </style>
  23. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  24. @using (Ajax.BeginForm(new AjaxOptions
  25. {
  26. OnSuccess = "EMISFunction.FormSuccess",
  27. OnBegin = "EMISFunction.FormSubmit",
  28. OnComplete = "EMISFunction.FormComplete"
  29. }))
  30. {
  31. <div class="p_title">
  32. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  33. 学生名单</div>*@
  34. </div>
  35. <div class="search_list">
  36. <table cellpadding="0" cellspacing="0" id="FinalExaminationtable">
  37. <tr>
  38. <td>
  39. @Html.DataGrid(new DataGridOptions
  40. {
  41. Columns = new List<DataGridColumn>()
  42. {
  43. new CheckBoxFieldColumn { FieldName="UserID", HeaderText="" },
  44. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, CustomFormatFun = "LoginIDColor" ,Width=0.1},
  45. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, CustomFormatFun = "UserNameColor",Width=0.05 },
  46. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, CustomFormatFun = "SexNameColor",Width=0.03 },
  47. new BoundFieldColumn { FieldName="Startterm", HeaderText="开课学期", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialNameColor",Width=0.05 },
  48. new BoundFieldColumn { FieldName="CoursematerialCode", HeaderText="课程代码", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialCodeColor",Width=0.06 },
  49. new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialNameColor",Width=0.1 },
  50. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, CustomFormatFun = "ClassmajorNameColor",Width=0.15 },
  51. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, CustomFormatFun = "InSchoolStatusNameColor",Width=0.05 },
  52. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, CustomFormatFun = "StudentStatusNameColor",Width=0.05 },
  53. new BoundFieldColumn { FieldName="IsDifferentDynamic", HeaderText="是否异动申请", Align=AlignStyle.Center, IsHidden = true },
  54. new BoundFieldColumn { FieldName="RecordStatus", HeaderText="是否可用", Align=AlignStyle.Center, IsHidden = true }
  55. },
  56. IsCheckOnSelect = true,
  57. DataSourceUrl = Url.Content("~/ScoreAudit/FinalExaminationStudentList?finalExaminationID=" + finalExaminationID),
  58. IsPostBack = true,
  59. ID = "dgStudentList",
  60. IsPagination = false,
  61. IsShowRowNumbers = true,
  62. IsSingleSelect = false,
  63. CustomerRowStyleFun = "gridHighlight",
  64. MaxHeight = 350,
  65. })
  66. </td>
  67. </tr>
  68. </table>
  69. </div>
  70. <div style = "color:Red">
  71. *黄色背景标识的为申请重录的学生
  72. </div>
  73. }
  74. </div>
  75. @section scripts{
  76. <script type="text/javascript">
  77. var IsUseable = 0;
  78. function gridHighlight(rowIndex, rowData) {
  79. if (@ViewBag.IsColor == 1) {
  80. if (rowData.RecordStatus == 1) {
  81. return "background-color:#FFFACD;";
  82. } else {
  83. return "";
  84. }
  85. }
  86. }
  87. function LoginIDColor(index, row, value) {
  88. var returnStr = value;
  89. // if (row.RecordStatus == 1) {
  90. // returnStr = " <div class=\"background\" style=\"background-color:red;\">" + value + "</div>";
  91. // }
  92. if (row.IsDifferentDynamic == true) {
  93. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  94. }else{
  95. return returnStr;
  96. }
  97. return returnStr;
  98. }
  99. function UserNameColor(index, row, value) {
  100. var returnStr = value;
  101. if (row.IsDifferentDynamic == true) {
  102. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  103. } else {
  104. return returnStr;
  105. }
  106. return returnStr;
  107. }
  108. function SexNameColor(index, row, value) {
  109. var returnStr = value;
  110. if (row.IsDifferentDynamic == true) {
  111. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  112. }else {
  113. return returnStr;
  114. }
  115. return returnStr;
  116. }
  117. function StudentStatusNameColor(index, row, value) {
  118. var returnStr = value;
  119. if (row.IsDifferentDynamic == true) {
  120. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  121. }else {
  122. return returnStr;
  123. }
  124. return returnStr;
  125. }
  126. function InSchoolStatusNameColor(index, row, value) {
  127. var returnStr = value;
  128. if (row.IsDifferentDynamic == true) {
  129. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  130. }else {
  131. return returnStr;
  132. }
  133. return returnStr;
  134. }
  135. function CoursematerialCodeColor(index, row, value) {
  136. var returnStr = value;
  137. if (row.IsDifferentDynamic == true) {
  138. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  139. } else {
  140. return returnStr;
  141. }
  142. return returnStr;
  143. }
  144. function CoursematerialNameColor(index, row, value) {
  145. var returnStr = value;
  146. if (row.IsDifferentDynamic == true) {
  147. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  148. }else {
  149. return returnStr;
  150. }
  151. return returnStr;
  152. }
  153. function ClassmajorNameColor(index, row, value) {
  154. var returnStr = value;
  155. if (row.IsDifferentDynamic == true) {
  156. returnStr = " <div style=\"color:red;\">" + value + "</div>";
  157. } else {
  158. return returnStr;
  159. }
  160. return returnStr;
  161. }
  162. </script>
  163. }