Edit.cshtml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @model EMIS.ViewModel.StudentManage.OnlineChecking.OpenObjectView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. var isDisable = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true);
  8. }
  9. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  10. @using (Ajax.BeginForm(new AjaxOptions
  11. {
  12. OnSuccess = "EMISFunction.FormSuccess",
  13. OnBegin = "EMISFunction.FormSubmit",
  14. OnComplete = "EMISFunction.FormComplete" }))
  15. {
  16. <div class="p_title">
  17. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  18. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  19. @if (Request["type"] != "detail")
  20. {
  21. @Html.ContextMenuBar("Edit")
  22. }
  23. </div>
  24. </div>
  25. <div class="search_list">
  26. @Html.HiddenFor(x => x.StudentEditObjectsID)
  27. <table cellpadding="0" cellspacing="0" id="collegePrioritytable">
  28. <tr>
  29. <td>
  30. @Html.LabelFor(x => x.EducationID):
  31. </td>
  32. <td>
  33. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isDisable })
  34. </td>
  35. <td>
  36. @Html.LabelFor(x => x.SchoolyearNumID):
  37. </td>
  38. <td>
  39. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, (x => x.SchoolyearNumID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isDisable })
  40. </td>
  41. </tr>
  42. <tr>
  43. <td>
  44. @Html.LabelFor(x => x.Starttime):
  45. </td>
  46. <td>
  47. @Html.TextBoxFor(x => x.Starttime, new TextBoxOptions
  48. {
  49. TextBoxType = TextBoxType.DateTime,
  50. IsEnabled = isEnable
  51. })
  52. </td>
  53. <td>
  54. @Html.LabelFor(x => x.Endtime):
  55. </td>
  56. <td>
  57. @Html.TextBoxFor(x => x.Endtime, new TextBoxOptions
  58. {
  59. TextBoxType = TextBoxType.DateTime,
  60. IsEnabled = isEnable
  61. })
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>
  66. @Html.LabelFor(x => x.Remark):
  67. </td>
  68. <td colspan="3">
  69. @if (!isEnable)
  70. {
  71. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  72. {
  73. { "style", "width: 90%;min-height: 20px" },
  74. { "disabled", "true" }
  75. })
  76. }
  77. else
  78. {
  79. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  80. }
  81. </td>
  82. </tr>
  83. </table>
  84. </div>
  85. }
  86. </div>
  87. @section scripts{
  88. <script type="text/javascript">
  89. //保存
  90. function StudentEditObject_Save() {
  91. var startDate = $("#Starttime").val();
  92. var endDate = $("#Endtime").val();
  93. var sd = new Date(startDate.replace(/\-/g, "\/"));
  94. var ed = new Date(endDate.replace(/\-/g, "\/"));
  95. if (startDate != "" && endDate != "" && sd >= ed) {
  96. $.messager.alert("系统提示", "结束时间不能小于开始时间。");
  97. return;
  98. }
  99. $(document.forms[0]).submit();
  100. }
  101. </script>
  102. }