Update.aspx 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Update.aspx.cs" Inherits="Com.Jpsoft.Hospital.Web.Module.Sys.Menu.Update" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <title>菜单信息更新界面</title>
  6. <link rel="Stylesheet" type="text/css" href="<%=ResolveClientUrl("~/") %>Css/main.css" />
  7. <script type="text/javascript" language="javascript" src="<%=ResolveClientUrl("~/") %>Js/jquery.js"></script>
  8. <script language="javascript" type="text/javascript">
  9. $(function() {
  10. $("#btnOK").click(function() {
  11. if ($("#menu_name").val() == "") {
  12. alert("请输入菜单名称!");
  13. return false;
  14. }
  15. if ($("#menu_upid").val() != 0 && $("#url").val()=="#") {
  16. alert("子菜单路径不能为#");
  17. return false;
  18. }
  19. if ($("#menu_upid").val() == 0 &&$("#url").val()!="#") {
  20. alert("上级菜单路径必须为#");
  21. return false;
  22. }
  23. });
  24. });
  25. $(function() {
  26. if ($("#order").val() == "")
  27. { return true; }
  28. else {
  29. var s = $("#order").val();
  30. var patrn = /^[0-9]{1,20}$/;
  31. if (!patrn.exec(s)) {
  32. alert("菜单序号必须由数字组成!");
  33. return false;
  34. }
  35. }
  36. });
  37. </script>
  38. </head>
  39. <body>
  40. <form id="form1" runat="server">
  41. <div id="main">
  42. <div class="main_title">
  43. <div class="mainborder1">
  44. </div>
  45. <div class="mainborder3">
  46. </div>
  47. <div class="mainborder2">
  48. <div class="pagetitle">
  49. 菜单管理>>更新界面</div>
  50. </div>
  51. </div>
  52. <div class="main_body">
  53. <table cellpadding="0" cellspacing="1">
  54. <tr>
  55. <th>
  56. 上级菜单
  57. </th>
  58. <td>
  59. <asp:DropDownList ID="menu_upid" runat="server">
  60. </asp:DropDownList>
  61. <a style="font-size: 12px; color: Red;">如果是上级菜单,此处请不要选择</b></a>
  62. </td>
  63. <th>
  64. 菜单名称
  65. </th>
  66. <td>
  67. <asp:TextBox ID="menu_name" runat="server"></asp:TextBox><%--<asp:CheckBox
  68. ID="isparent" runat="server" Text="该菜单为父菜单" />--%>
  69. </td>
  70. </tr>
  71. <tr>
  72. <th>
  73. 菜单路径
  74. </th>
  75. <td>
  76. <asp:TextBox ID="url" runat="server" /><a style="font-size: 12px; color: Red;">如果是上级菜单,请填写<b>“#”</b></a>
  77. </td>
  78. <th>
  79. 菜单序号
  80. </th>
  81. <td>
  82. <asp:TextBox ID="order" runat="server" />
  83. </td>
  84. </tr>
  85. <%--<tr><th>菜单序号:</th><td><asp:TextBox ID="TextBox1" runat="server"/></td></tr>--%>
  86. <tr>
  87. <th>
  88. 菜单描述
  89. </th>
  90. <td>
  91. <asp:TextBox ID="desc" runat="server" TextMode="MultiLine" Width="300px" Height="50px"></asp:TextBox><asp:Label
  92. ID="id" runat="server" Text="" Visible="false"></asp:Label>
  93. </td>
  94. <th colspan="2"><asp:CheckBox ID="cbox" runat="server" Text="是否显示在主界面上" /></th>
  95. </tr>
  96. <%-- <tr>
  97. <td colspan="4">
  98. 添加功能
  99. </td>
  100. </tr>
  101. <tr>
  102. <td colspan="4">
  103. <asp:CheckBoxList ID="cblist" runat="server" RepeatDirection="Horizontal" Width="300px">
  104. <asp:ListItem Value="1" Text="列表"></asp:ListItem>
  105. <asp:ListItem Value="2" Text="添加"></asp:ListItem>
  106. <asp:ListItem Value="3" Text="修改"></asp:ListItem>
  107. <asp:ListItem Value="7" Text="详情"></asp:ListItem>
  108. <asp:ListItem Value="8" Text="删除"></asp:ListItem>
  109. </asp:CheckBoxList>
  110. </td>
  111. </tr>--%>
  112. <tr>
  113. <th colspan="4">
  114. <asp:Button ID="btnOK" runat="server" Text="*更新*" CssClass="BtnNormal" OnClick="btnOK_Click" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button
  115. ID="btnCancel" runat="server" Text="*返回*" CssClass="BtnNormal" OnClick="btnCancel_Click" />
  116. </th>
  117. </tr>
  118. </table>
  119. </div>
  120. <div class="main_footer">
  121. <div class="mainborder4">
  122. </div>
  123. <div class="mainborder6">
  124. </div>
  125. <div class="mainborder5">
  126. </div>
  127. </div>
  128. </div>
  129. </form>
  130. </body>
  131. </html>