Edit.cshtml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. @model EMIS.ViewModel.ExaminationApply.ExaminationSubjectView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. ComboGridOptions ExaminationSubject = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "ExaminationSubjectID",
  10. GridOptions = new DataGridOptions
  11. {
  12. Columns = new List<DataGridColumn>()
  13. {
  14. new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Width=0.1, Align=AlignStyle.Center },
  15. new BoundFieldColumn { FieldName="ExaminationTypeName", HeaderText="考试类型", Width=0.1, Align=AlignStyle.Center },
  16. new BoundFieldColumn { FieldName="ExaminationFormName", HeaderText="考试类别", Width=0.1, Align=AlignStyle.Center },
  17. new BoundFieldColumn { FieldName="Name", HeaderText="科目名称", Width=0.1, Align=AlignStyle.Center }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/ExaminationSubject/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false
  24. }
  25. };
  26. }
  27. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  28. @using (Ajax.BeginForm(new AjaxOptions
  29. {
  30. OnSuccess = "EMISFunction.FormSuccess",
  31. OnBegin = "EMISFunction.FormSubmit",
  32. OnComplete = "EMISFunction.FormComplete"
  33. }))
  34. {
  35. <div class="p_title">
  36. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  37. 考试科目信息</div>
  38. @if (Request["isView"] != "1")
  39. {
  40. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  41. }
  42. </div>
  43. <div class="search_list popupWindowContent">
  44. <table cellpadding="0" cellspacing="0" id="departmenttable">
  45. <tr>
  46. <td>@Html.LabelFor(x => x.Name):
  47. </td>
  48. <td>@Html.TextBoxFor(x => x.Name)
  49. </td>
  50. <td>@Html.LabelFor(x => x.ExaminationTypeID):
  51. </td>
  52. <td>@Html.DropdownListFor((x => x.ExaminationTypeID), new DropdownListOptions { ID = "ExaminationTypeDropdown", Name = "ExaminationTypeDropdown", BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/ExaminationType/DropdownList"), OnSelect = "reload()", OnLoadSuccess="" })
  53. </td>
  54. </tr>
  55. <tr>
  56. <td>@Html.LabelFor(x => x.ExaminationFormID):
  57. </td>
  58. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EX_ExaminationForm, x => x.ExaminationFormID)
  59. </td>
  60. <td>@Html.LabelFor(x => x.PreposeSubjectID):
  61. </td>
  62. <td>@Html.ComboGridFor(x => x.PreposeSubjectID, ExaminationSubject)
  63. @*@Html.DropdownListFor((x => x.PreposeSubjectID), new DropdownListOptions { ID = "PreposeSubjectDropdown", Name = "PreposeSubjectDropdown", BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/ExaminationSubject/DropDownList?examinationSubjectID=" + @ViewBag.ID),OnLoadSuccess="" })*@
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>@Html.LabelFor(x => x.PreposeScoreLimit):
  68. </td>
  69. <td>@Html.TextBoxFor(x => x.PreposeScoreLimit, new TextBoxOptions() { })
  70. </td>
  71. <td>@Html.LabelFor(x => x.Cost):
  72. </td>
  73. <td>@Html.TextBoxFor(x => x.Cost, new TextBoxOptions() { })
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>@Html.LabelFor(x => x.Remark):
  78. </td>
  79. <td colspan="3">@Html.TextAreaFor(x => x.Remark, new { style = "width: 90%;" })
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>@Html.LabelFor(x => x.ExaminationDate):
  84. </td>
  85. <td>@Html.TextBoxFor(x => x.ExaminationDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  86. </td>
  87. <td>@Html.LabelFor(x => x.SchoolyearID):
  88. </td>
  89. <td>@Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, OnSelect="reload()", ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") })
  90. </td>
  91. </tr>
  92. </table>
  93. </div>
  94. }
  95. </div>
  96. @section scripts{
  97. <script type="text/javascript">
  98. var nonSelect = "@DropdownList.PLEASE_SELECT";
  99. var ID="@ViewBag.ID";
  100. function ExaminationSubject_Save() {
  101. $(document.forms[0]).submit();
  102. }
  103. function reload() {
  104. //$("#PreposeSubjectDropdown").combogridX("clear");
  105. $("#PreposeSubjectID").combogridX("reload", eval("({'QueryParamsDatas':'ExaminationTypeDropdown|*|" + $("#ExaminationTypeDropdown").combobox("getValue") + "|@@|SchoolYearDropdown|*|" + $("#SchoolyearID").combobox("getValue") + "|@@|ExaminationSubjectDropdown|*|" + ID + "|@@|'})"));
  106. // $("#PreposeSubjectDropdown").combobox("clear");
  107. // $("#PreposeSubjectDropdown").combobox("reload", "/ExaminationSubject/DropDownList?examinationTypeID=" + $("#ExaminationTypeDropdown").combobox("getValue")) ;
  108. }
  109. </script>
  110. }