EditFreeSelection.cshtml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. @model EMIS.ViewModel.SelectCourse.ExecutableFreeSelectionCouseView
  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.ExecutableFreeSelectionCouseID)
  38. <table cellpadding="0" cellspacing="0" id="specialtyCourseable">
  39. <tr>
  40. <td>
  41. <label>
  42. 教师信息:</label>
  43. </td>
  44. <td colspan="3">@Html.ContextMenuBar("Edit-TeacherGrid")
  45. @Html.DataGrid(new DataGridOptions
  46. {
  47. Columns = new List<DataGridColumn>()
  48. {
  49. new CheckBoxFieldColumn { FieldName="UserID", HeaderText="" },
  50. new BoundFieldColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.06 },
  51. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.05 },
  52. new DictionaryDropdownListColumn { FieldName="TeachingMethod", HeaderText="任课方式", Align=AlignStyle.Center, Width=0.06,
  53. DictionaryType = EMIS.ViewModel.DictionaryItem.EM_TeachingMethod, IsRequired=true }
  54. },
  55. PageSize = 3,
  56. IsCheckOnSelect = true,
  57. DataSourceUrl = Url.Content("~/ExecutableFreeSelectionCouse/TeacherList?ExecutableFreeSelectionCouseID=" + Model.ExecutableFreeSelectionCouseID),
  58. IsPostBack = true,
  59. ID = "dgTeacherList",
  60. IsPagination = true,
  61. IsShowRowNumbers = true,
  62. IsSingleSelect = false,
  63. MaxHeight =65
  64. })
  65. </td>
  66. </tr>
  67. </table>
  68. </div>
  69. }
  70. </div>