RoadFlow2.1 临时演示

Body.aspx 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Body.aspx.cs" Inherits="WebForm.Platform.UserApp.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" disabled="disabled" class="mytext" value="<%=name %>" 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);" disabled="disabled" style="width:130px;" class="myselect" style="margin-right:5px"><option value=""></option><%=AppTypesOptions %></select>
  19. <select onclick="appidchange(this.value);" class="myselect" disabled="disabled" 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" disabled="disabled" value="<%=params1 %>" 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" disabled="disabled" class="myico" source="/Images/ico" value="<%=ico %>" style="width: 75%"/></td>
  28. </tr>
  29. </table>
  30. <div class="buttondiv">
  31. <input type="button" value="添加子项" class="mybutton" onclick="window.location = 'AddApp.aspx?page=Body.aspx<%=query%>';" />
  32. <input type="submit" value="保存" disabled="disabled" class="mybutton" name="Save" onclick="return new RoadUI.Validate().validateForm(document.forms[0]);" />
  33. <% if (parentID != Guid.Empty){%>
  34. <input type="submit" value="删除" disabled="disabled" class="mybutton" name="Delete" onclick="return confirm('真的要删除该角色应用及其所有下级应用吗?');" />
  35. <input type="button" value="排序" disabled="disabled" 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({
  62. url: "GetApps.aspx", type: "post", data: { "type": value, "value": "<%=AppID%>" }, dataType: "text", async: false, cache: false, success: function (txt)
  63. {
  64. var $appid = $("#AppID");
  65. $("option", $appid).remove();
  66. $appid.append('<option value=""></option>' + txt);
  67. }
  68. });
  69. }
  70. function sort()
  71. {
  72. window.location = "Sort.aspx<%=Request.Url.Query%>";
  73. }
  74. </script>
  75. </body>
  76. </html>