RoadFlow2.1 临时演示

Default.aspx 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebForm.Platform.DBConnection.Default" %>
  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. <div class="toolbar" style="margin-top:0; border-top:0;">
  11. <a href="javascript:void(0);" onclick="add();return false;"><span style="background-image:url(<%=WebForm.Common.Tools.BaseUrl%>/Images/ico/folder_classic_stuffed_add.png);">添加连接</span></a>
  12. <span class="toolbarsplit">&nbsp;</span>
  13. <input type="submit" style="display:none;" value="d" id="DeleteBut" name="DeleteBut" />
  14. <a href="javascript:void(0);" onclick="del();return false;"><span style="background-image:url(<%=WebForm.Common.Tools.BaseUrl%>/Images/ico/folder_classic_stuffed_remove.png);">删除所选</span></a>
  15. </div>
  16. <table class="listtable">
  17. <thead>
  18. <tr>
  19. <th width="3%" sort="0"><input type="checkbox" onclick="checkAll(this.checked);" style="vertical-align:middle;" /></th>
  20. <th width="15%">连接名称</th>
  21. <th width="10%">连接类型</th>
  22. <th width="42%">连接字符串</th>
  23. <th width="15%">备注</th>
  24. <th width="15%" sort="0">操作</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <%
  29. foreach (var conn in ConnList)
  30. {%>
  31. <tr>
  32. <td><input type="checkbox" value="<%=conn.ID %>" name="checkbox_app" /></td>
  33. <td><%=conn.Name %></td>
  34. <td><%=conn.Type %></td>
  35. <td style="word-break:break-all;word-wrap:break-word;"><%=conn.ConnectionString %></td>
  36. <td><%=conn.Note %></td>
  37. <td>
  38. <a class="editlink" href="javascript:edit('<%=conn.ID %>');">编辑</a>
  39. <a onclick="test('<%=conn.ID %>');" style="background:url(<%=WebForm.Common.Tools.BaseUrl%>/Images/ico/hammer_screwdriver.png) no-repeat left center; padding-left:18px; margin-left:5px;" href="javascript:void(0);">测试</a>
  40. </td>
  41. </tr>
  42. <% }%>
  43. </tbody>
  44. </table>
  45. <script type="text/javascript">
  46. var appid = '<%=Request.QueryString["appid"]%>';
  47. var iframeid = '<%=Request.QueryString["tabid"]%>';
  48. var dialog = top.mainDialog;
  49. function add()
  50. {
  51. dialog.open({ id: "window_" + appid.replaceAll('-', ''), title: "添加连接", width: 700, height: 320, url: top.rootdir + '/Platform/DBConnection/Edit.aspx?1=1' + '<%=Query1%>', openerid: iframeid });
  52. }
  53. function edit(id)
  54. {
  55. dialog.open({ id: "window_" + appid.replaceAll('-', ''), title: "编辑连接", width: 700, height: 320, url: top.rootdir + '/Platform/DBConnection/Edit.aspx?id=' + id + '<%=Query1%>', openerid: iframeid });
  56. }
  57. function test(id)
  58. {
  59. $.ajax({
  60. url: "Test.ashx?id=" + id + "&appid=" + appid, cache: false, async: false, success: function (txt)
  61. {
  62. alert(txt);
  63. }
  64. });
  65. }
  66. function checkAll(checked)
  67. {
  68. $("input[name='checkbox_app']").prop("checked", checked);
  69. }
  70. function del()
  71. {
  72. if ($(":checked[name='checkbox_app']").size() == 0)
  73. {
  74. alert("您没有选择要删除的项!");
  75. return false;
  76. }
  77. if (!confirm('您真的要删除所选连接吗?'))
  78. {
  79. return false;
  80. }
  81. $("#DeleteBut").click();
  82. return true;
  83. }
  84. </script>
  85. </form>
  86. </body>
  87. </html>