StudentEdit.cshtml 5.9 KB

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