StudentList.cshtml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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", HeaderText="" },
  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. new BoundFieldColumn { FieldName="RecordStatus", HeaderText="是否可用", Align=AlignStyle.Center, IsHidden = true }
  51. },
  52. IsCheckOnSelect = true,
  53. DataSourceUrl = Url.Content("~/FinalExamination/FinalExaminationStudentList?finalExaminationID=" + finalExaminationID),
  54. IsPostBack = true,
  55. ID = "dgStudentList",
  56. IsPagination = false,
  57. IsShowRowNumbers = true,
  58. IsSingleSelect = false,
  59. MaxHeight = 350
  60. })
  61. </td>
  62. </tr>
  63. </table>
  64. </div>
  65. }
  66. </div>
  67. @section scripts{
  68. <script type="text/javascript">
  69. function LoginIDColor(index, row, value) {
  70. if (row.IsDifferentDynamic == true) {
  71. return " <span style=\"color:red;\">" + value + "</span>";
  72. }
  73. else {
  74. return value
  75. }
  76. }
  77. function UserNameColor(index, row, value) {
  78. if (row.IsDifferentDynamic == true) {
  79. return " <span style=\"color:red;\">" + value + "</span>";
  80. }
  81. else {
  82. return value
  83. }
  84. }
  85. function SexNameColor(index, row, value) {
  86. if (row.IsDifferentDynamic == true) {
  87. return " <span style=\"color:red;\">" + value + "</span>";
  88. }
  89. else {
  90. return value
  91. }
  92. }
  93. function StudentStatusNameColor(index, row, value) {
  94. if (row.IsDifferentDynamic == true) {
  95. return " <span style=\"color:red;\">" + value + "</span>";
  96. }
  97. else {
  98. return value
  99. }
  100. }
  101. function InSchoolStatusNameColor(index, row, value) {
  102. if (row.IsDifferentDynamic == true) {
  103. return " <span style=\"color:red;\">" + value + "</span>";
  104. }
  105. else {
  106. return value
  107. }
  108. }
  109. function CoursematerialNameColor(index, row, value) {
  110. if (row.IsDifferentDynamic == true) {
  111. return " <span style=\"color:red;\">" + value + "</span>";
  112. }
  113. else {
  114. return value
  115. }
  116. }
  117. function ClassmajorNameColor(index, row, value) {
  118. if (row.IsDifferentDynamic == true) {
  119. return " <span style=\"color:red;\">" + value + "</span>";
  120. }
  121. else {
  122. return value
  123. }
  124. }
  125. </script>
  126. }