Edit.cshtml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @model EMIS.ViewModel.SystemView.AnnouncementView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. }
  7. @section scripts{
  8. <script src="~/Scripts/Business/System/AnnouncementEdit.js" type="text/javascript"></script>
  9. <script type="text/javascript">
  10. function Announcement_Save() {
  11. var stime = $("#StartTime").val();
  12. var etime = $("#EndTime").val();
  13. stime = new Date(stime);
  14. etime = new Date(etime);
  15. if (stime > etime) {
  16. $.messager.alert("系统提示", "发布时间不能小于截止时间");
  17. return;
  18. }
  19. $(document.forms[0]).submit();
  20. }
  21. </script>
  22. }
  23. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  24. @using (Ajax.BeginForm(new AjaxOptions
  25. {
  26. OnSuccess = "EMISFunction.FormSuccess",
  27. OnBegin = "EMISFunction.FormSubmit",
  28. OnComplete = "EMISFunction.FormComplete"
  29. }))
  30. {
  31. <div class="p_title">
  32. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  33. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  34. </div>
  35. <div class="search_list popupWindowContent">
  36. <table cellpadding="0" cellspacing="0" id="departmenttable" width="100%">
  37. <tr>
  38. <td>@Html.LabelFor(x => x.Title):
  39. </td>
  40. <td>@Html.TextBoxFor(x => x.Title)
  41. </td>
  42. <td>@Html.LabelFor(x => x.AnnouncementTypeID):
  43. </td>
  44. <td>@Html.DropdownListFor(x => x.AnnouncementTypeID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/Announcement/TypeDropdownList"), TextField = "Text", ValueField = "Value" })
  45. </td>
  46. </tr>
  47. <tr>
  48. <td>@Html.LabelFor(x => x.StartTime):
  49. </td>
  50. <td>@Html.TextBoxFor(x => x.StartTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
  51. </td>
  52. <td>@Html.LabelFor(x => x.EndTime):
  53. </td>
  54. <td>@Html.TextBoxFor(x => x.EndTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
  55. </td>
  56. </tr>
  57. <tr>
  58. <td>@Html.LabelFor(x => x.Content):
  59. </td>
  60. <td colspan="3">@Html.RichTextFor(x => x.Content, new RichTextOptions { Width = 700, Height = 520 })
  61. </td>
  62. </tr>
  63. <tr>
  64. <td style="text-align:right">
  65. 发布角色:
  66. </td>
  67. <td colspan="3">
  68. @Html.ContextMenuBar("Edit-RoleViewGrid")
  69. @Html.DataGrid(new DataGridOptions
  70. {
  71. Columns = new List<DataGridColumn>()
  72. {
  73. new CheckBoxFieldColumn{ HeaderText="", FieldName="RoleID"},
  74. new BoundFieldColumn { FieldName="OrderNo", HeaderText="序号", Align=AlignStyle.Center },
  75. new LinkButtonColumn { FieldName="RoleName", HeaderText="角色名称", Align=AlignStyle.Center , Handle="edit" },
  76. new BoundFieldColumn { FieldName="DefaultDataRangeDesc", HeaderText="数据范围", Align=AlignStyle.Center },
  77. new BoundFieldColumn { FieldName="RecordStatusDesc", HeaderText="是否可用", Align=AlignStyle.Center },
  78. new BoundFieldColumn { FieldName="Description", HeaderText="备注", Align=AlignStyle.Center }
  79. },
  80. IsCheckOnSelect = true,
  81. DataSourceUrl = Url.Content("~/Announcement/GetRoleViewList?announcementID=" + Request["AnnouncementID"]),
  82. IsPostBack = true,
  83. ID = "dgRoleList",
  84. IsPagination = false,
  85. MaxHeight = 200,
  86. IsShowRowNumbers = true,
  87. IsSingleSelect = false
  88. })
  89. </td>
  90. </tr>
  91. </table>
  92. </div>
  93. }
  94. </div>