Edit.cshtml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. @model EMIS.ViewModel.ScoreManage.LevelSettingView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var url = ViewBag.Url;
  7. ComboGridOptions ExaminationSubject = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "ExaminationSubjectID",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. //new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Width=0.1, Align=AlignStyle.Center },
  16. //new BoundFieldColumn { FieldName="ExaminationTypeName", HeaderText="考试类型", Width=0.1, Align=AlignStyle.Center },
  17. //new BoundFieldColumn { FieldName="ExaminationFormName", HeaderText="考试类别", Width=0.1, Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="Name", HeaderText="科目名称", Width=0.1, Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/ExaminationSubject/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false
  25. }
  26. };
  27. }
  28. @section scripts{
  29. <script type="text/javascript">
  30. function LevelSetting_Save() {
  31. if (Range() != false)
  32. $(document.forms[0]).submit();
  33. }
  34. function Range() {
  35. $("#ScoreRange").val($("#MinScore").val() + " <= 总成绩 <= " + $("#MaxScore").val())
  36. if (parseFloat($("#MinScore").val()) >= parseFloat($("#MaxScore").val())) {
  37. $.messager.alert("系统提示", "起始分必须小于终止分。");
  38. return false;
  39. }
  40. }
  41. function onchangeRange() {
  42. $("#ScoreRange").val($("#MinScore").val() + " <= 总成绩 <= " + $("#MaxScore").val())
  43. }
  44. function reload() {
  45. $("#ExaminationSubjectID").combogridX("reload", eval("({'QueryParamsDatas':'SchoolYearDropdown|*|" + $("#SchoolyearDropdown").combobox("getValue") + "|@@|'})"));
  46. }
  47. </script>
  48. }
  49. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  50. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  51. {
  52. <div class="p_title">
  53. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  54. </div>
  55. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  56. </div>
  57. <div class="search_list">
  58. @Html.HiddenFor(x => x.LevelSettingID)
  59. <table cellpadding="0" cellspacing="0" id="levelSettingTable">
  60. <tr>
  61. @*<td>@Html.LabelFor(x => x.SchoolyearID):
  62. </td>
  63. <td>@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), Name = "SchoolyearDropdown", ID = "SchoolyearDropdown", OnSelect = "reload", SelectedValue = BaseExtensions.GetCurrentSchoolYearID(), OnLoadSuccess = "reload" }, new Dictionary<string, string> { })
  64. </td>*@
  65. <td>@Html.LabelFor(x => x.ExaminationSubjectID):
  66. </td>
  67. <td>
  68. @*@Html.DropdownListFor((x => x.ExaminationSubjectID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/ExaminationSubject/DropdownList") })*@
  69. @Html.ComboGridFor(x => x.ExaminationSubjectID, ExaminationSubject)
  70. </td>
  71. <td></td><td></td>
  72. </tr>
  73. <tr>
  74. <td>@Html.LabelFor(x => x.MinScore):
  75. </td>
  76. <td>@Html.TextBoxFor(x => x.MinScore, new Dictionary<string, object> { { "onPropertyChange", "onchangeRange()" } })
  77. </td>
  78. <td>@Html.LabelFor(x => x.MaxScore):
  79. </td>
  80. <td>@Html.TextBoxFor(x => x.MaxScore, new Dictionary<string, object> { { "onPropertyChange", "onchangeRange()" } })
  81. </td>
  82. </tr>
  83. <tr>
  84. <td>@Html.LabelFor(x => x.LevelName):
  85. </td>
  86. <td>@Html.TextBoxFor(x => x.LevelName, new Dictionary<string, object> { })
  87. </td>
  88. @*<td>@Html.LabelFor(x => x.LevelNo):
  89. </td>
  90. <td>@Html.TextBoxFor(x => x.LevelNo, new Dictionary<string, object> { })
  91. </td>*@
  92. @*</tr>
  93. <tr>*@
  94. <td>@Html.LabelFor(x => x.ScoreRange):
  95. </td>
  96. <td>@Html.TextBoxFor(x => x.ScoreRange, new Dictionary<string, object> { { "disabled", "true" } })
  97. </td>
  98. </tr>
  99. <tr>
  100. <td>@Html.LabelFor(x => x.Remark):
  101. </td>
  102. <td colspan="3">@Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width:460px;" } })
  103. </td>
  104. </tr>
  105. </table>
  106. </div>
  107. }
  108. </div>