RoadFlow2.1 临时演示

Body.aspx 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Body.aspx.cs" Inherits="WebForm.Platform.RoleApp.Body" %>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title></title>
  7. </head>
  8. <body>
  9. <form id="form1" runat="server">
  10. <br />
  11. <table cellpadding="0" cellspacing="1" border="0" width="99%" class="formtable">
  12. <tr>
  13. <th style="width:80px;">应用名称:</th>
  14. <td><input type="text" id="Name" name="Name" class="mytext" runat="server" validate="empty" style="width:75%" /></td>
  15. </tr>
  16. <tr>
  17. <th style="width:80px;">关联程序:</th>
  18. <td><select id="Type" name="Type" onchange="loadApp(this.value);" style="width:130px;" class="myselect" style="margin-right:5px"><option value=""></option><asp:Literal ID="AppTypesOptions" runat="server"></asp:Literal></select>
  19. <select onclick="appidchange(this.value);" class="myselect" style="width:188px;" id="AppID" name="AppID"></select></td>
  20. </tr>
  21. <tr>
  22. <th style="width:80px;">相关参数:</th>
  23. <td><input type="text" id="Params" name="Params" runat="server" class="mytext" style="width:75%"/></td>
  24. </tr>
  25. <tr>
  26. <th style="width:80px;">图标:</th>
  27. <td><input type="text" name="Ico" id="Ico" class="myico" source="/Images/ico" runat="server" style="width: 75%"/></td>
  28. </tr>
  29. </table>
  30. <div class="buttondiv">
  31. <input type="button" value="添加子项" class="mybutton" onclick="window.location='AddApp.aspx'+'<%=Request.Url.Query%>';" />
  32. <input type="submit" value="保存" class="mybutton" name="Save" onclick="return new RoadUI.Validate().validateForm(document.forms[0]);" />
  33. <%if (roleApp != null && roleApp.ParentID != Guid.Empty){%>
  34. <input type="submit" value="删除" class="mybutton" name="Delete" onclick="return confirm('真的要删除该角色应用及其所有下级应用吗?');" />
  35. <input type="button" value="排序" class="mybutton" onclick="sort();" />
  36. <%}%>
  37. </div>
  38. </form>
  39. <script type="text/javascript">
  40. $(function ()
  41. {
  42. loadApp($("#Type").val());
  43. });
  44. function appidchange(value)
  45. {
  46. var options = $("#AppID option");
  47. for (var i = 0; i < options.length; i++)
  48. {
  49. if (value && options.eq(i).val() == value)
  50. {
  51. $("#Name").val(options.eq(i).text());
  52. }
  53. }
  54. }
  55. function loadApp(value)
  56. {
  57. if (!value)
  58. {
  59. return false;
  60. }
  61. $.ajax({ url: "GetApps.ashx", type: "post", data: { "type": value, "value":"<%=AppID%>" }, dataType: "text", async: false, cache: false, success: function (txt)
  62. {
  63. var $appid = $("#AppID");
  64. $("option", $appid).remove();
  65. $appid.append('<option value=""></option>'+txt);
  66. }
  67. });
  68. }
  69. function sort()
  70. {
  71. window.location = "Sort.aspx" + "<%=Request.Url.Query%>";
  72. }
  73. </script>
  74. </body>
  75. </html>