RoadFlow2.1 临时演示

List.aspx 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="WebForm.Platform.AppLibrary.List" %>
  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="querybar">
  11. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  12. <tr>
  13. <td>
  14. 应用名称:<input type="text" class="mytext" id="Title1" name="Title1" runat="server" style="width:150px" />
  15. 应用地址:<input type="text" class="mytext" id="Address" name="Address" runat="server" style="width:220px" />
  16. <input type="submit" name="Search" value="&nbsp;&nbsp;查&nbsp;询&nbsp;&nbsp;" class="mybutton" />
  17. <input type="button" onclick="edit(); return false;" value="添加应用" class="mybutton" />
  18. <asp:Button ID="Button1" runat="server" Text="删除所选" OnClientClick="return del();" CssClass="mybutton" />
  19. </td>
  20. </tr>
  21. </table>
  22. </div>
  23. <table class="listtable">
  24. <thead>
  25. <tr>
  26. <th width="3%" sort="0"><input type="checkbox" onclick="checkAll(this.checked);" style="vertical-align:middle;" /></th>
  27. <th width="20%">应用名称</th>
  28. <th width="47%">应用地址</th>
  29. <th width="20%">应用分类</th>
  30. <th width="10%" sort="0">操作</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <%
  35. RoadFlow.Platform.Dictionary bdict = new RoadFlow.Platform.Dictionary();
  36. foreach (var app in AppList)
  37. {
  38. %>
  39. <tr>
  40. <td><input type="checkbox" value="<%=app.ID %>" name="checkbox_app" /></td>
  41. <td><%=app.Title %></td>
  42. <td><%=app.Address %></td>
  43. <td><%=bdict.GetTitle(app.Type) %></td>
  44. <td><a class="editlink" href="javascript:void(0);" onclick="edit('<%=app.ID %>');return false;">编辑</a></td>
  45. </tr>
  46. <%}%>
  47. </tbody>
  48. </table>
  49. <div class="buttondiv"><asp:Literal ID="Pager" runat="server"></asp:Literal></div>
  50. </form>
  51. <script type="text/javascript">
  52. var appid = '<%=Request.QueryString["AppID"]%>';
  53. var iframeid = '<%=Request.QueryString["TabID"]%>';
  54. var typeid = '<%=Request.QueryString["TypeID"]%>';
  55. var dialog = top.mainDialog;
  56. function edit(id)
  57. {
  58. dialog.open({ id: "window_" + appid.replaceAll('-', ''), title: (id ? "编辑" : "添加") + "应用程序", width: 700, height: 380, url: top.rootdir + '/Platform/AppLibrary/Edit.aspx?id=' + (id || "") + '<%=Query1%>', openerid: iframeid });
  59. }
  60. function checkAll(checked)
  61. {
  62. $("input[name='checkbox_app']").prop("checked", checked);
  63. }
  64. function del()
  65. {
  66. if ($(":checked[name='checkbox_app']").size() == 0)
  67. {
  68. alert("您没有选择要删除的项!");
  69. return false;
  70. }
  71. return confirm('您真的要删除所选应用吗?');
  72. }
  73. </script>
  74. </body>
  75. </html>