Edit.cshtml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.ExaminationFormsID):
  51. </td>
  52. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EX_ExaminationForm, x => x.ExaminationFormsID)
  53. </td>
  54. @*@Html.DropdownListFor((x => x.PreposeSubjectID), new DropdownListOptions { ID = "PreposeSubjectDropdown", Name = "PreposeSubjectDropdown", BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/ExaminationSubject/DropDownList?examinationSubjectID=" + @ViewBag.ID),OnLoadSuccess="" })*@
  55. </tr>
  56. </table>
  57. </div>
  58. }
  59. </div>
  60. @section scripts{
  61. <script type="text/javascript">
  62. var nonSelect = "@DropdownList.PLEASE_SELECT";
  63. var ID = "@ViewBag.ID";
  64. function ExaminationSubjects_Save() {
  65. $(document.forms[0]).submit();
  66. }
  67. function reload() {
  68. //$("#PreposeSubjectDropdown").combogridX("clear");
  69. $("#PreposeSubjectID").combogridX("reload", eval("({'QueryParamsDatas':'ExaminationTypeDropdown|*|" + $("#ExaminationTypeDropdown").combobox("getValue") + "|@@|SchoolYearDropdown|*|" + $("#SchoolyearID").combobox("getValue") + "|@@|ExaminationSubjectDropdown|*|" + ID + "|@@|'})"));
  70. // $("#PreposeSubjectDropdown").combobox("clear");
  71. // $("#PreposeSubjectDropdown").combobox("reload", "/ExaminationSubject/DropDownList?examinationTypeID=" + $("#ExaminationTypeDropdown").combobox("getValue")) ;
  72. }
  73. </script>
  74. }