Edit.cshtml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. @model EMIS.ViewModel.EvaluationManage.TeacherEvaluationView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ViewBag.Title = "教师评价编辑";
  7. var cgopEducationMissionClassID = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "EducationMissionClassID",
  11. //OnSelect = "SelectCallback",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center },
  17. new BoundFieldColumn { FieldName="Name", HeaderText="任务班名称", Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  19. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center },
  20. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  21. new BoundFieldColumn { FieldName="StartWeeklyNum", HeaderText="开始周次", Align=AlignStyle.Center },
  22. new BoundFieldColumn { FieldName="EndWeeklyNum", HeaderText="结束周次", Align=AlignStyle.Center },
  23. },
  24. IsCheckOnSelect = true,
  25. DataSourceUrl = Url.Action("List", "EducationMission"),
  26. IsPagination = true,
  27. IsShowRowNumbers = true,
  28. IsSingleSelect = false
  29. }
  30. };
  31. var cgopEducationTableID = new ComboGridOptions
  32. {
  33. TextField = "Name",
  34. ValueField = "TableID",
  35. //OnSelect = "SelectCallback",
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new LinkButtonColumn { FieldName="Code", HeaderText="评价编号", Align=AlignStyle.Center ,},
  41. new BoundFieldColumn { FieldName="Name", HeaderText="评价表名", Align=AlignStyle.Center ,},
  42. new BoundFieldColumn { FieldName="Type", HeaderText="评价类型", Align=AlignStyle.Center ,},
  43. },
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Action("List", "EvaluationTable") + "?evaluationType=" + ViewBag.EvaluationTypeId,
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. }
  52. <style type="text/css">
  53. </style>
  54. <div class="separatorline">
  55. @using (Html.BeginForm())
  56. {
  57. <div class="p_title">
  58. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  59. 教师评价信息</div>
  60. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  61. </div>
  62. <div class="search_list">
  63. @Html.HiddenFor(x => x.EntityID)
  64. <table cellpadding="0" cellspacing="1">
  65. <tr>
  66. <th>@Html.LabelFor(m => m.EducationMissionClassID):
  67. </th>
  68. <td>
  69. @Html.ComboGridFor(m => m.EducationMissionClassID, cgopEducationMissionClassID)
  70. </td>
  71. <th>@Html.LabelFor(m => m.TableID):
  72. </th>
  73. <td>
  74. @Html.ComboGridFor(m => m.TableID, cgopEducationTableID)
  75. </td>
  76. </tr>
  77. <tr>
  78. <th>@Html.LabelFor(m => m.Participators):
  79. </th>
  80. <td>
  81. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_YesOrNoStatus, m => m.OpenStatus)
  82. </td>
  83. <th>@Html.LabelFor(m => m.OpenStatus):
  84. </th>
  85. <td>
  86. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_YesOrNoStatus, m => m.OpenStatus)
  87. </td>
  88. </tr>
  89. </table>
  90. </div>
  91. }
  92. </div>
  93. @section scripts{
  94. <script type="text/javascript">
  95. function EvaluationStudent_Save() {
  96. var id = $('#EntityID').val();
  97. var educationMissionClassID = $("#EducationMissionClassID").combogridX('getValue');
  98. var tableID = $("#TableID").combogridX('getValue');
  99. $.post('/TeacherEvaluation/Verification', { Id: id, EducationMissionClassID: educationMissionClassID, TableID: tableID }, function (data) {
  100. if (data == "成功") {
  101. $(document.forms[0]).submit();
  102. } else {
  103. $.messager.alert("系统提示", data);
  104. }
  105. });
  106. }
  107. </script>
  108. }