Notice.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:10k
源码类别:

.net编程

开发平台:

C#

  1. <%@ page language="C#" autoeventwireup="true" inherits="SysManage_Notice, App_Web_apkz6_0h" theme="Normal" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <link href="style/gridStyle.css" rel="stylesheet" type="text/css" />
  6.     <script src="../js/calendar2.js" type="text/javascript"></script>
  7.         <script type="text/javascript" language="javascript" src="../js/default.js"></script>
  8.     <script type="text/javascript" >  
  9.     function modelesswin(url,mwidth,mheight)
  10.       {      
  11.           window.showModalDialog(url,"","help:0;dialogWidth=" +mwidth +"px;dialogHeight=" +mheight +"px;scroll=no;");
  12.           window.location.replace(window.location.href);   
  13.       } 
  14.     </script> 
  15.     <title>无标题页</title>
  16. </head>
  17. <body>
  18.     <form id="form1" runat="server">
  19.     
  20.      <TABLE width="100%" border="0" cellPadding="0" cellSpacing="0" >
  21.        <tr>
  22.           <td bgColor="#f7f7f7" width="100%" height="25px">
  23.              <strong>&nbsp;&nbsp;&nbsp;公 告 管 理   </strong>
  24.            </td>
  25.        </tr>
  26.        <tr>
  27.          <td background="../Images/toolbarbg.jpg" height="25">
  28.              <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
  29.                  <tr>
  30.                      <td align="left" style="height: 25px">
  31.                      <img src="../Images/add.gif" height="15" align="absmiddle">            
  32.             <a href="javascript: modelesswin('NoticeAdd.aspx',500,300)">新建公告</a>
  33.                      </td>
  34.                      <td align="right" style="height: 25px">
  35.                          时间段批量删除:<asp:TextBox ID="TB_start" runat="server" onfocus="fPopUpCalendarDlg()" ></asp:TextBox>
  36.                          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ValidationGroup="DelButton" ControlToValidate="TB_start" Display="Dynamic"></asp:RequiredFieldValidator>
  37.                          <asp:TextBox ID="TB_end" runat="server" onfocus="fPopUpCalendarDlg()"></asp:TextBox>
  38.                          <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"  ValidationGroup="DelButton" ControlToValidate="TB_end" Display="Dynamic"></asp:RequiredFieldValidator>
  39.                          <asp:ImageButton ID="pSDel" runat="server" ImageUrl="~/Images/s-del.gif" ValidationGroup="DelButton" OnClick="pSDel_Click" />
  40.                          &nbsp;&nbsp;
  41.                      </td>
  42.                  </tr>
  43.              </table>
  44.                        
  45.           </td> 
  46.        </tr>        
  47.        <tr>
  48.         <td width="100%" valign="top">
  49.              <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="NoticeID" BackColor="#CDCDCF" BorderWidth="0px"
  50.              CssClass="Grid"  SelectedRowStyle-CssClass="SelectedRow" HeaderStyle-CssClass="GridHeader" RowStyle-CssClass="HeadingCellText" 
  51.   FooterStyle-CssClass="GridFooter"  ShowFooter="True" CellSpacing="1" CellPadding="0"  Width="100%"      
  52.                         HeaderStyle-ForeColor="black"   HeaderStyle-Font-Size="12px"  HeaderStyle-Font-Underline="false"   AllowPaging="True" AllowSorting="True" OnPageIndexChanging="GridView1_PageIndexChanging" 
  53.                         OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting"  OnRowEditing="GridView1_RowEditing" OnSorting="GridView1_Sorting" >
  54.                            <AlternatingRowStyle BackColor="#F0F0F0" />
  55. <RowStyle BackColor="#F9FAFC" CssClass="HeadingCellText" />
  56.                                <Columns>
  57.                                         <asp:BoundField DataField="NoticeID" HeaderText="公告编号" Visible="False">                                                                                 
  58.                                         </asp:BoundField>                                       
  59.                                         <asp:BoundField DataField="NoticeTitle" HeaderText="公告标题">  
  60.                                         <HeaderStyle Width="15%" />                                            
  61.                                         </asp:BoundField> 
  62.                                         <asp:BoundField DataField="NoticeContent" HeaderText="公告内容">
  63.                                         <HeaderStyle Width="25%" />                                              
  64.                                         </asp:BoundField>
  65.                                         <asp:BoundField DataField="InvaidDate" HeaderText="失效时间" SortExpression="InvaidDate"> 
  66.                                         <HeaderStyle Width="15%" />                                             
  67.                                         </asp:BoundField>                                     
  68.                                    <asp:BoundField DataField="NoticeDate" HeaderText="公告时间" SortExpression="NoticeDate" >
  69.                                     <HeaderStyle Width="15%" />  
  70.                                    </asp:BoundField> 
  71.                                     <asp:BoundField DataField="EmpName" HeaderText="创建者" >                                   
  72.                                     <HeaderStyle Width="15%" /> 
  73.                                    </asp:BoundField>                                  
  74.                                    <asp:BoundField DataField="CreateUserID" HeaderText="创建者ID" Visible="False" >                                   
  75.                                    </asp:BoundField>
  76.                                    <asp:BoundField DataField="AssRoleID" HeaderText="接受角色" Visible="False"> </asp:BoundField> 
  77.                                    <asp:BoundField DataField="AssUserID" HeaderText="接受者" Visible="False"> </asp:BoundField>                               
  78.                                         <asp:TemplateField HeaderText="   操 作">
  79.                                             <ItemTemplate>
  80.                                           &nbsp;&nbsp;<asp:ImageButton ID="IB_Edit" ToolTip="编辑" runat="server" CommandName="edit" ImageUrl="~/Images/s_edit.gif"/> &nbsp; &nbsp;
  81.                                                 <asp:ImageButton ToolTip="删除" ID="IB_Del" runat="server" CommandName="Delete" ImageUrl="~/Images/s-del.gif"
  82.                                                     OnClientClick='<%#"return confirm("确认删除标题为『"+Eval("NoticeTitle")+"』的公告吗?");" %>'/>                                      
  83.                                             </ItemTemplate>
  84.                                             <HeaderStyle Width="12%" HorizontalAlign="center"  BorderWidth="0px"/>
  85.                                             <ItemStyle HorizontalAlign="Left"  BorderWidth="0px"/>
  86.                                         </asp:TemplateField>
  87.                                         </Columns>
  88.                                  <FooterStyle CssClass="GridFooter" />
  89. <PagerStyle CssClass="GridPage" />
  90.             <PagerTemplate>
  91.                 <asp:Label  ID="LabelCurrentPage" runat="server">当前页:<%# ((GridView)Container.NamingContainer).PageIndex + 1 %></asp:Label>&nbsp; &nbsp;
  92.                 <asp:Label ID="LabelPageCount" runat="server" >总页数:<%# ((GridView)Container.NamingContainer).PageCount %></asp:Label>&nbsp; &nbsp;
  93.                 <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">首页</asp:LinkButton>&nbsp; &nbsp;
  94.                 <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">上一页</asp:LinkButton>&nbsp; &nbsp;
  95.                 <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">下一页</asp:LinkButton>&nbsp; &nbsp;
  96.                 <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">尾页</asp:LinkButton>&nbsp; &nbsp;
  97.                 转到第:<asp:TextBox ID="LinkTextBoxNewPage" runat="server" Width="20px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>'></asp:TextBox>页&nbsp; &nbsp;
  98.                 <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="0-99999" ValidationGroup="goto" ControlToValidate="LinkTextBoxNewPage"
  99.                  MaximumValue="99999" MinimumValue="0" Display="Dynamic" ></asp:RangeValidator>
  100.                 <asp:linkbutton id="btnGo" runat="server" causesvalidation="False" commandargument="-1" commandname="Page" text="GO" ValidationGroup="goto" /> 
  101.             </PagerTemplate> 
  102.                                    <EmptyDataTemplate>
  103.                                      <center class="EmpetyData"> 系统提示:没有公告可以显示,可以新增公告。</center>
  104.                                    </EmptyDataTemplate>
  105.                  <HeaderStyle Font-Size="12px" Font-Underline="False" ForeColor="Black" BackColor="#DFDFDF" CssClass="GridHeader" Height="25px" />
  106.                  <SelectedRowStyle CssClass="SelectedRow" />
  107.                  </asp:GridView>
  108.                          </td>
  109.        </tr>
  110.        
  111.     </TABLE>
  112.     
  113.     </form>
  114. </body>
  115. </html>