StudentList.cshtml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. </style>
  19. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  20. @using (Ajax.BeginForm(new AjaxOptions
  21. {
  22. OnSuccess = "EMISFunction.FormSuccess",
  23. OnBegin = "EMISFunction.FormSubmit",
  24. OnComplete = "EMISFunction.FormComplete"
  25. }))
  26. {
  27. <div class="p_title">
  28. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  29. </div>
  30. </div>
  31. <div class="search_list">
  32. <table cellpadding="0" cellspacing="0" id="FinalExaminationtable">
  33. <tr>
  34. <td>
  35. @Html.DataGrid(new DataGridOptions
  36. {
  37. Columns = new List<DataGridColumn>()
  38. {
  39. new CheckBoxFieldColumn { FieldName="UserID" },
  40. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, CustomFormatFun = "LoginIDColor" ,Width=0.1},
  41. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, CustomFormatFun = "UserNameColor",Width=0.05 },
  42. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, CustomFormatFun = "SexNameColor",Width=0.03 },
  43. new BoundFieldColumn { FieldName="Startterm", HeaderText="开课学期", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialNameColor",Width=0.05 },
  44. new BoundFieldColumn { FieldName="CoursematerialCode", HeaderText="课程代码", Align=AlignStyle.Center, CustomFormatFun = "",Width=0.06 },
  45. new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialNameColor",Width=0.1 },
  46. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, CustomFormatFun = "ClassmajorNameColor",Width=0.15 },
  47. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, CustomFormatFun = "InSchoolStatusNameColor",Width=0.05 },
  48. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, CustomFormatFun = "StudentStatusNameColor",Width=0.05 },
  49. new BoundFieldColumn { FieldName="IsDifferentDynamic", HeaderText="是否异动申请", Align=AlignStyle.Center, IsHidden = true }
  50. },
  51. IsCheckOnSelect = true,
  52. DataSourceUrl = Url.Content("~/ResitExamination/ResitExaminationStudentList?finalExaminationID=" + finalExaminationID),
  53. IsPostBack = true,
  54. ID = "dgStudentList",
  55. IsPagination = false,
  56. IsShowRowNumbers = true,
  57. IsSingleSelect = false,
  58. MaxHeight = 350
  59. })
  60. </td>
  61. </tr>
  62. </table>
  63. </div>
  64. }
  65. </div>
  66. @section scripts{
  67. <script type="text/javascript">
  68. function LoginIDColor(index, row, value) {
  69. if (row.IsDifferentDynamic == true) {
  70. return " <span style=\"color:red;\">" + value + "</span>";
  71. }
  72. else {
  73. return value
  74. }
  75. }
  76. function UserNameColor(index, row, value) {
  77. if (row.IsDifferentDynamic == true) {
  78. return " <span style=\"color:red;\">" + value + "</span>";
  79. }
  80. else {
  81. return value
  82. }
  83. }
  84. function SexNameColor(index, row, value) {
  85. if (row.IsDifferentDynamic == true) {
  86. return " <span style=\"color:red;\">" + value + "</span>";
  87. }
  88. else {
  89. return value
  90. }
  91. }
  92. function StudentStatusNameColor(index, row, value) {
  93. if (row.IsDifferentDynamic == true) {
  94. return " <span style=\"color:red;\">" + value + "</span>";
  95. }
  96. else {
  97. return value
  98. }
  99. }
  100. function InSchoolStatusNameColor(index, row, value) {
  101. if (row.IsDifferentDynamic == true) {
  102. return " <span style=\"color:red;\">" + value + "</span>";
  103. }
  104. else {
  105. return value
  106. }
  107. }
  108. function CoursematerialNameColor(index, row, value) {
  109. if (row.IsDifferentDynamic == true) {
  110. return " <span style=\"color:red;\">" + value + "</span>";
  111. }
  112. else {
  113. return value
  114. }
  115. }
  116. function ClassmajorNameColor(index, row, value) {
  117. if (row.IsDifferentDynamic == true) {
  118. return " <span style=\"color:red;\">" + value + "</span>";
  119. }
  120. else {
  121. return value
  122. }
  123. }
  124. </script>
  125. }