Edit.cshtml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. @model EMIS.ViewModel.SelectCourse.OptionalCourseSettingView
  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/SelectCourseManage/SelectCourseResult/SelectCourseResult.js"
  9. type="text/javascript"></script>
  10. <script type="text/javascript">
  11. function SelectCourseResult_Save() {
  12. var teacherViewList = $("#dgTeacherList").cmsXDataTable("getRows");
  13. for (var i = 0; i < teacherViewList.length; i++) {
  14. if (teacherViewList[i].TeachingMethod == null || teacherViewList[i].TeachingMethod == -1) {
  15. $.messager.alert('系统信息', "请选择授课老师的任课方式。");
  16. return;
  17. }
  18. }
  19. $(document.forms[0]).submit();
  20. }
  21. </script>
  22. }
  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 style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("TeaConfirm")</div>
  35. </div>
  36. <div class="search_list">
  37. @Html.HiddenFor(x => x.ExecutableOptionalCourseID)
  38. @Html.HiddenFor(x => x.GrademajorID)
  39. <table cellpadding="0" cellspacing="0" id="specialtyCourseable">
  40. <tr>
  41. <td>
  42. <label>
  43. 教师信息:</label>
  44. </td>
  45. <td colspan="3">@Html.ContextMenuBar("Edit-TeacherGrid")
  46. @Html.DataGrid(new DataGridOptions
  47. {
  48. Columns = new List<DataGridColumn>()
  49. {
  50. new CheckBoxFieldColumn { FieldName="UserID", HeaderText="" },
  51. new BoundFieldColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.06 },
  52. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.05 },
  53. new DictionaryDropdownListColumn { FieldName="TeachingMethod", HeaderText="任课方式", Align=AlignStyle.Center, Width=0.06,
  54. DictionaryType = EMIS.ViewModel.DictionaryItem.EM_TeachingMethod, IsRequired=true }
  55. },
  56. PageSize = 3,
  57. IsCheckOnSelect = true,
  58. DataSourceUrl = Url.Content("~/OptionalCourseSetting/TeacherList?executableOptionalCourseID=" + Model.ExecutableOptionalCourseID),
  59. IsPostBack = true,
  60. ID = "dgTeacherList",
  61. IsPagination = true,
  62. IsShowRowNumbers = true,
  63. IsSingleSelect = false,
  64. MaxHeight = 65
  65. })
  66. </td>
  67. </tr>
  68. </table>
  69. </div>
  70. }
  71. </div>