CourseworkAdd.cshtml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @model EMISOnline.ViewModel.Coursework.CourseworkAddView
  2. @using EMISOnline.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "ExamAdd";
  6. }
  7. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  8. @Html.Position()
  9. <div class="p_SearchTitle">
  10. </div>
  11. <div class="p_title">
  12. <div style="float: left; margin-left: 10px; color: #333; line-height: 35px; font-size: 12px;">
  13. 作业信息</div>
  14. <div style="margin-right: 10px; float: right; line-height: 30px; font-size: 12px;">
  15. @Html.Button(new ButtonOptions() { ID = "btnSave", Text = "保 存" })
  16. </div>
  17. </div>
  18. @using (Ajax.BeginForm(new AjaxOptions
  19. {
  20. OnSuccess = "EMISFunction.FormSuccess",
  21. OnBegin = "EMISFunction.FormSubmit",
  22. OnComplete = "EMISFunction.FormComplete",
  23. }))
  24. {
  25. @Html.HiddenFor(x => x.id)
  26. <div class="search_list">
  27. <table cellpadding="0" cellspacing="0" id="Coursematerialtable">
  28. <tr>
  29. <th>@Html.LabelFor(x => x.test_paper_name):
  30. </th>
  31. <td colspan="3">
  32. @Html.Selector(new Bowin.Web.Controls.Mvc.SelectorOptions
  33. {
  34. ID = "test_paper_name",
  35. Name = "test_paper_id",
  36. IsSingleSelect = true,
  37. QueryParams = "id:1",
  38. DataUrl = Url.Content("~/ExamSetting/GetPaperList"),
  39. TextName = "test_paper_name",
  40. Title = "试卷列表",
  41. Colums = "Key:ID,试卷名称:PaperName:200:query,是否动态试卷:is_dynamic:100,试卷总分:paper_score:100,创建时间:created_date:100",
  42. DataValue = "test_paper_id",
  43. DataText = "PaperName",
  44. Width = 500,
  45. Required = true,
  46. Data = Model.PaperData
  47. })
  48. </td>
  49. </tr>
  50. <tr>
  51. <th>@Html.LabelFor(x => x.EducationMissionClassID):
  52. </th>
  53. <td colspan="3">
  54. @Html.Selector(new Bowin.Web.Controls.Mvc.SelectorOptions
  55. {
  56. ID = "EducationMissionClassName",
  57. Name = "EducationMissionClassID",
  58. IsSingleSelect = true,
  59. QueryParams = "EducationMissionClassID:1",
  60. DataUrl = Url.Content("~/Grademajor/GetEducationMissionClassList"),
  61. TextName = "Name",
  62. Title = "教学任务列表",
  63. Colums = "Key:EducationMissionClassID,任务班名:Name:400:query,学年学期:SchoolyearName:100,课程名称:CoursematerialName:200",
  64. DataValue = "EducationMissionClassID",
  65. DataText = "CoursematerialName",
  66. Width = 500,
  67. Required = true,
  68. })
  69. </td>
  70. </tr>
  71. <tr>
  72. <th>@Html.LabelFor(x => x.WorkName):
  73. </th>
  74. <td colspan="3">
  75. @Html.TextBoxFor(x => x.WorkName, new Dictionary<string, object> { { "style", "width:80%" } })
  76. </td>
  77. </tr>
  78. <tr>
  79. <th>@Html.LabelFor(x => x.ModityContent):
  80. </th>
  81. <td colspan="3">
  82. @Html.TextAreaFor(x => x.ModityContent, new Dictionary<string, object>() { { "style", "width:80%" } })
  83. </td>
  84. </tr>
  85. <tr>
  86. <th>@Html.LabelFor(x => x.examtip):
  87. </th>
  88. <td colspan="3">
  89. @Html.TextBoxFor(model => model.test_begin_date, new TextBoxOptions() { TextBoxType = TextBoxType.DateTime })
  90. @Html.TextBoxFor(model => model.test_end_date, new TextBoxOptions() { TextBoxType = TextBoxType.DateTime })
  91. </td>
  92. </tr>
  93. </table>
  94. </div>
  95. }
  96. </div>
  97. @section scripts{
  98. <script src="~/Scripts/Bowin.Control.Core/Controls/Selector.js" type="text/javascript"></script>
  99. <script type="text/jscript">
  100. $(function () {
  101. $('#btnSave').click(function () {
  102. $(document.forms[0]).submit();
  103. })
  104. })
  105. var FormFunction = {
  106. SubmitSuccess: function (data) {
  107. window.location.href = "@Url.Content("~/Coursework/CourseworkList")";
  108. }
  109. }
  110. </script>
  111. }