Edit.cshtml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. @model EMIS.ViewModel.SelectCourse.SelectCourseTypeSettingView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. }
  7. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  8. @using (Ajax.BeginForm(new AjaxOptions
  9. {
  10. OnSuccess = "EMISFunction.FormSuccess",
  11. OnBegin = "EMISFunction.FormSubmit",
  12. OnComplete = "EMISFunction.FormComplete"
  13. }))
  14. {
  15. @Html.HiddenFor(x => x.SelectCourseTypeSettingID)
  16. <div class="p_title">
  17. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  18. 类型设定信息</div>*@
  19. @if (Request["isView"] != "1")
  20. {
  21. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  22. }
  23. </div>
  24. <div class="search_list popupWindowContent">
  25. <table cellpadding="0" cellspacing="0">
  26. <tr>
  27. <td width="15%">@Html.LabelFor(x => x.SchoolyearID):
  28. </td>
  29. <td width="35%">@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/DropDownAfterCurrent") })
  30. </td>
  31. <td width="15%">@Html.LabelFor(x => x.SelectCourseTypeID):
  32. </td>
  33. <td width="35%">@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_SelectCourseType, x => x.SelectCourseTypeID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect })
  34. </td>
  35. </tr>
  36. <tr>
  37. <td>@Html.LabelFor(x => x.StartTime):
  38. </td>
  39. <td>@Html.TextBoxFor(x => x.StartTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
  40. </td>
  41. <td>@Html.LabelFor(x => x.EndTime):
  42. </td>
  43. <td>@Html.TextBoxFor(x => x.EndTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
  44. </td>
  45. </tr>
  46. <tr>
  47. <td>@Html.LabelFor(x => x.MinSelectCount):
  48. </td>
  49. <td>@(Html.TextBoxFor(x => x.MinSelectCount, new TextBoxOptions { TextBoxType = TextBoxType.Normal }))门
  50. </td>
  51. <td>@Html.LabelFor(x => x.MaxSelectCount):
  52. </td>
  53. <td>@(Html.TextBoxFor(x => x.MaxSelectCount, new TextBoxOptions { TextBoxType = TextBoxType.Normal }))门
  54. </td>
  55. </tr>
  56. <tr>
  57. <td>@Html.LabelFor(x => x.MinCredit):
  58. </td>
  59. <td>@(Html.TextBoxFor(x => x.MinCredit, new TextBoxOptions { TextBoxType = TextBoxType.Normal }))
  60. </td>
  61. <td>@Html.LabelFor(x => x.MaxCredit):
  62. </td>
  63. <td>@(Html.TextBoxFor(x => x.MaxCredit, new TextBoxOptions { TextBoxType = TextBoxType.Normal }))
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>@Html.LabelFor(x => x.Remark):
  68. </td>
  69. <td colspan="3">@Html.TextAreaFor(x => x.Remark, new Dictionary<string, string> { { "style", "width:500px;" } })
  70. </td>
  71. </tr>
  72. </table>
  73. </div>
  74. }
  75. </div>
  76. @section scripts{
  77. <script type="text/javascript">
  78. function TypeSetting_Save() {
  79. var type = "^\\d+$";
  80. var re = new RegExp(type);
  81. // if ($("#MaxSelectCount").val().match(re) == null || $("#MinSelectCount").val().match(re) == null) {
  82. // $.messager.alert("系统信息", "门数上下限输入不符合规范!");
  83. // return;
  84. // }
  85. if ($("#MinSelectCount").val() > $("#MaxSelectCount").val()) {
  86. $.messager.alert("系统信息", "门数下限不能大于上限!");
  87. return;
  88. }
  89. $(document.forms[0]).submit();
  90. }
  91. </script>
  92. }