Edit.cshtml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. @model EMIS.ViewModel.CalendarManage.SchoolYearView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ViewBag.Title = "Edit";
  7. }
  8. <style type="text/css">
  9. </style>
  10. <div class="separatorline">
  11. @using (Ajax.BeginForm(new AjaxOptions
  12. {
  13. OnSuccess = "EMISFunction.FormSuccess",
  14. OnBegin = "EMISFunction.FormSubmit",
  15. OnComplete = "EMISFunction.FormComplete"
  16. }))
  17. {
  18. <div class="p_title">
  19. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  20. 学年学期信息</div>*@
  21. @if (Request["isView"] != "1")
  22. {
  23. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  24. }
  25. </div>
  26. <div class="gobal-from">
  27. @Html.HiddenFor(x => x.SchoolYearID)
  28. <table cellpadding="0" cellspacing="1">
  29. <tr>
  30. <th>@Html.LabelFor(x => x.Code):
  31. </th>
  32. <td>@Html.TextBoxFor(x => x.Code)
  33. </td>
  34. <th>@Html.LabelFor(x => x.Years):
  35. </th>
  36. <td>@Html.TextBoxFor(x => x.Years)
  37. </td>
  38. </tr>
  39. <tr>
  40. <th>@Html.LabelFor(x => x.SchoolcodeID):
  41. </th>
  42. <td>
  43. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Schoolcode, (x => x.SchoolcodeID))
  44. </td>
  45. <th>@Html.LabelFor(x => x.WeeksNum):
  46. </th>
  47. <td>@Html.TextBoxFor(x => x.WeeksNum)
  48. </td>
  49. </tr>
  50. <tr>
  51. <th>@Html.LabelFor(x => x.FirstWeek):
  52. </th>
  53. <td>
  54. @Html.TextBoxFor(p => p.FirstWeek, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  55. </td>
  56. <th>@Html.LabelFor(x => x.WeekDays):
  57. </th>
  58. <td>@Html.TextBoxFor(x => x.WeekDays)
  59. </td>
  60. </tr>
  61. <tr>
  62. <th>@Html.LabelFor(x => x.IsCurrent):
  63. </th>
  64. <td colspan="3">@Html.CheckBoxFor(x => x.IsCurrent)
  65. </td>
  66. </tr>
  67. </table>
  68. </div>
  69. }
  70. </div>
  71. @section scripts{
  72. <script type="text/javascript">
  73. function SchoolYear_Save() {
  74. var date = $("#FirstWeek").val();
  75. //var date = FirstWeek.value;
  76. date=date.replace(/-/g,"/");
  77. var week = new Date(date);
  78. if (week.getDay() != 1) {
  79. $.messager.alert("系统提示", "你选择的日期不是周一!");
  80. }
  81. else {
  82. $(document.forms[0]).submit();
  83. }
  84. }
  85. </script>
  86. }