TeacherEdit.cshtml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. @model EMIS.ViewModel.ScoreManage.ExaminationExemptionView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. bool isAddNew = true;
  7. if (Request["type"] == "edit")
  8. {
  9. isAddNew = false;
  10. }
  11. ComboGridOptions cgop = new ComboGridOptions
  12. {
  13. TextField = "LoginID",
  14. ValueField = "UserID",
  15. EmptyText = "请选择",
  16. Name = "UserID",
  17. ID = "UserID",
  18. OnSelect = "queryClass",
  19. IsAutoComplete = true,
  20. MinReloadCharactor = EMIS.Utility.Const.LOCAL_SETTING_LoginIDLength,
  21. IsEnabled = isAddNew,
  22. GridOptions = new DataGridOptions
  23. {
  24. Columns = new List<DataGridColumn>()
  25. {
  26. new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.3 },
  27. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 },
  28. },
  29. IsCheckOnSelect = true,
  30. DataSourceUrl = Url.Content("~/Students/List"),
  31. IsPagination = true,
  32. IsShowRowNumbers = true,
  33. IsSingleSelect = false
  34. }
  35. };
  36. ComboGridOptions cgopCourse = new ComboGridOptions
  37. {
  38. TextField = "CourseName",
  39. ValueField = "CoursematerialID",
  40. IsEnabled = isAddNew,
  41. GridOptions = new DataGridOptions
  42. {
  43. Columns = new List<DataGridColumn>()
  44. {
  45. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Width=0.1, Align=AlignStyle.Center },
  46. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.3, Align=AlignStyle.Center }
  47. },
  48. IsCheckOnSelect = true,
  49. DataSourceUrl = Url.Content("~/ExaminationExemption/GetCoursematerialForTeacher"),
  50. IsPagination = true,
  51. IsShowRowNumbers = true,
  52. IsSingleSelect = false
  53. }
  54. };
  55. }
  56. @section scripts{
  57. <script src="~/Scripts/Business/ScoreManage/ExaminationSuspensionEdit.js" type="text/javascript"></script>
  58. <script type="text/javascript">
  59. var nonSelect = "@DropdownList.SELECT_ALL";
  60. function ExaminationExemption_Save() {
  61. $(document.forms[0]).submit();
  62. }
  63. </script>
  64. }
  65. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  66. @using (Ajax.BeginForm(new AjaxOptions
  67. {
  68. OnSuccess = "EMISFunction.FormSuccess",
  69. OnBegin = "EMISFunction.FormSubmit",
  70. OnComplete = "EMISFunction.FormComplete"
  71. }))
  72. {
  73. <div class="p_title">
  74. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  75. 缓考申请</div>
  76. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  77. </div>
  78. <div class="search_list">
  79. @Html.HiddenFor(x => x.ExaminationExemptionID)
  80. @if(Request["type"]=="edit")
  81. {
  82. @Html.HiddenFor(x=>x.UserID)
  83. @Html.HiddenFor(x=>x.CoursematerialID)
  84. }
  85. <table cellpadding="0" cellspacing="0">
  86. <tr>
  87. <td>@Html.LabelFor(x => x.UserID):
  88. </td>
  89. <td>@Html.ComboGridFor(x => x.UserID, cgop)
  90. </td>
  91. <td>@Html.LabelFor(x => x.CoursematerialID):
  92. </td>
  93. <td>@Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>@Html.LabelFor(x => x.ExamsCategoryID):
  98. </td>
  99. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID,
  100. new DropdownListOptions { IsEnabled = false })
  101. </td>
  102. <td>
  103. </td>
  104. <td>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td>@Html.LabelFor(x => x.Reason):
  109. </td>
  110. <td colspan="3">@Html.TextAreaFor(x => x.Reason, new Dictionary<string, object> { { "style", "width: 98%;" } })
  111. </td>
  112. </tr>
  113. </table>
  114. </div>
  115. }
  116. </div>