global_medalgrid.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:3k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="c#" Inherits="Discuz.Web.Admin.medalgrid" Codebehind="global_medalgrid.aspx.cs" %>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Register Src="../UserControls/PageInfo.ascx" TagName="PageInfo" TagPrefix="uc1" %>
  4. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  5. <html>
  6. <head>
  7. <title>勋章列表管理</title>
  8. <link href="../styles/datagrid.css" type="text/css" rel="stylesheet" />
  9. <script type="text/javascript" src="../js/common.js"></script>
  10. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
  11. <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />
  12. <script type="text/javascript" src="../js/modalpopup.js"></script>
  13. <script type="text/javascript">
  14. function Check(form)
  15. {
  16. CheckAll(form);
  17. checkedEnabledButton(form,'medalid','Available','UnAvailable')
  18. }
  19. </script>
  20. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  21. </head>
  22. <body>
  23. <form id="Form1" method="post" runat="server">
  24. <uc1:PageInfo ID="info1" runat="server" Icon="information" Text="请将您的勋章图片文件上传到 &quot;论坛/images/medals&quot; 目录下, 并对相应的勋章进行编辑即可" />
  25. <cc1:DataGrid ID="DataGrid1" runat="server" IsFixConlumnControls="true" OnPageIndexChanged="DataGrid_PageIndexChanged" OnSortCommand="Sort_Grid">
  26. <Columns>
  27. <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form)' type='checkbox' name='chkall' id='chkall' />">
  28. <HeaderStyle Width="20px" />
  29. <ItemTemplate>
  30. <input id="medalid" onclick="checkedEnabledButton(this.form,'medalid','Available','UnAvailable')" type="checkbox" 
  31. value="<%# DataBinder.Eval(Container, "DataItem.medalid").ToString() %>" name="medalid" />
  32. <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.medalid").ToString())%>
  33. </ItemTemplate>
  34. </asp:TemplateColumn>
  35. <asp:BoundColumn DataField="medalid" SortExpression="medalid" HeaderText="勋章ID" Visible="false" />
  36. <asp:BoundColumn DataField="name" SortExpression="name" HeaderText="名称" />
  37. <asp:BoundColumn DataField="image" SortExpression="image" HeaderText="文件名" />
  38. <asp:TemplateColumn HeaderText="是否有效" SortExpression="available">
  39. <ItemTemplate>
  40.    <%# DataBinder.Eval(Container, "DataItem.available").ToString()=="1"?"<img src=../images/ok.gif>" : "<img src=../images/cancel.gif>" %>
  41. </ItemTemplate>
  42. </asp:TemplateColumn>
  43. <asp:TemplateColumn HeaderText="图片">
  44. <ItemTemplate>
  45.    <%# PicStr(DataBinder.Eval(Container, "DataItem.image").ToString())%>
  46. </ItemTemplate>
  47. </asp:TemplateColumn>
  48. </Columns>
  49. </cc1:DataGrid>
  50. <p style="text-align:right;">
  51. <cc1:Button ID="SaveMedal" runat="server" Text="保存勋章修改"></cc1:Button>&nbsp;
  52. <cc1:Button ID="Available" runat="server" Text="置为有效" Enabled="false"></cc1:Button>&nbsp;&nbsp;
  53. <cc1:Button ID="UnAvailable" runat="server" Text="置为无效" ButtonImgUrl="../images/invalidation.gif" Enabled="false"></cc1:Button>&nbsp;&nbsp;
  54. <cc1:Button ID="ImportMedal" runat="server" Text="导入已上传的勋章" ButtonImgUrl="../images/add.gif" />
  55. </p>
  56. </form>
  57. <%=footer%>
  58. </body>
  59. </html>