TeacherEdit.cshtml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. @model EMIS.ViewModel.ScoreManage.ExaminationSuspensionView
  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("~/ExaminationSuspension/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. </script>
  61. }
  62. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  63. @using (Ajax.BeginForm(new AjaxOptions
  64. {
  65. OnSuccess = "EMISFunction.FormSuccess",
  66. OnBegin = "EMISFunction.FormSubmit",
  67. OnComplete = "EMISFunction.FormComplete"
  68. }))
  69. {
  70. <div class="p_title">
  71. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  72. 缓考申请</div>
  73. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  74. </div>
  75. <div class="search_list">
  76. @Html.HiddenFor(x => x.ExaminationSuspensionID)
  77. @if(Request["type"]=="edit")
  78. {
  79. @Html.HiddenFor(x=>x.UserID)
  80. @Html.HiddenFor(x=>x.CoursematerialID)
  81. }
  82. <table cellpadding="0" cellspacing="0">
  83. <tr>
  84. <td>@Html.LabelFor(x => x.UserID):
  85. </td>
  86. <td>@Html.ComboGridFor(x => x.UserID, cgop)
  87. </td>
  88. <td>@Html.LabelFor(x => x.CoursematerialID):
  89. </td>
  90. <td>@Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>@Html.LabelFor(x => x.ExamsCategoryID):
  95. </td>
  96. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID,
  97. new DropdownListOptions { IsEnabled = false })
  98. </td>
  99. <td>
  100. </td>
  101. <td>
  102. </td>
  103. </tr>
  104. <tr>
  105. <td>@Html.LabelFor(x => x.Reason):
  106. </td>
  107. <td colspan="3">@Html.TextAreaFor(x => x.Reason, new Dictionary<string, object> { { "style", "width: 98%;" } })
  108. </td>
  109. </tr>
  110. </table>
  111. </div>
  112. }
  113. </div>