Edit.cshtml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. @model EMIS.ViewModel.CalendarManage.CoursesTimeView
  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.CoursesTimeID)
  28. <table cellpadding="0" cellspacing="1" style="table-layout:fixed;">
  29. <tr>
  30. <th width="15%">@Html.LabelFor(x => x.StartTimes):
  31. </th>
  32. <td width="35%">@Html.TextBoxFor(x => x.StartTimes, new { style = "width:66px;" })-@Html.TextBoxFor(x => x.EndTimes, new { style = "width:66px;" })
  33. </td>
  34. <th width="15%">@Html.LabelFor(x => x.TimesSegment):
  35. </th>
  36. <td width="35%">@Html.DropdownListFor(x => x.TimesSegment, new DropdownListOptions { ItemSourceUrl = Url.Content("~/Activitie/TimesSegmentDropdownListBanid"), TextField = "Text", ValueField = "Value" })
  37. </td>
  38. </tr>
  39. <tr>
  40. <th>@Html.LabelFor(x => x.StartDate):
  41. </th>
  42. <td>@Html.TextBoxFor(x => x.StartHour, new { style = "width:66px;" }):@Html.TextBoxFor(x => x.StartMinutes, new { style = "width:66px;" })
  43. </td>
  44. <th>@Html.LabelFor(x => x.EndDate):
  45. </th>
  46. <td>@Html.TextBoxFor(x => x.EndHour, new { style = "width:66px;" }):@Html.TextBoxFor(x => x.EndMinutes, new { style = "width:66px;" })
  47. </td>
  48. </tr>
  49. </table>
  50. </div>
  51. <div style="color: Red; text-align: center;">
  52. 时间以24小时制(例如:下午2点应表示为14:00)</div>
  53. }
  54. </div>
  55. @section scripts{
  56. <script type="text/javascript">
  57. function CoursesTime_Save() {
  58. var s = parseInt($("#StartHour").val());
  59. var e = parseInt($("#EndHour").val());
  60. var sm = parseInt($("#StartMinutes").val());
  61. var em = parseInt($("#EndMinutes").val());
  62. if (s > e) {
  63. if(sm>em){
  64. $.messager.alert("系统提示", "开始时间不能大于结束时间!");
  65. }
  66. }
  67. else {
  68. $(document.forms[0]).submit();
  69. }
  70. }
  71. </script>
  72. }