mail_list_send.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:7k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="mail_list_send.aspx.cs" Inherits="web_mail_mail_list_send" %>
  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.     <title>无标题页</title>
  6.     <link href="../../css/style.css" rel="stylesheet" type="text/css" />
  7.     <script language="javascript" type="text/javascript">
  8.         function openStatistics(id)
  9.         {        
  10.             var url = "mail_statistic.aspx?mail_id="+id;
  11.             var features = "width=500,height=400,top=200,left=250,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
  12.             var showStatistic = open(url, 'showStatistic', features);
  13.             showStatistic.focus();
  14.             return false;
  15.         }
  16.     </script>
  17. </head>
  18. <body>
  19.     <form id="form1" runat="server">
  20.     <center>
  21.         <br />
  22.         <asp:Label ID="Label6" runat="server" Text="內部電子郵件寄件備份列表" Font-Bold="True" Font-Size="Medium"></asp:Label></center><br />
  23.     <div>
  24.     <center>
  25.     <table width="95%">
  26.         <tr valign="top">
  27.             <td align="center">
  28.                 <asp:GridView ID="MailList" runat="server" AllowPaging="True" AllowSorting="True"
  29.                     AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
  30.                     BorderWidth="1px" CellPadding="3" DataKeyNames="id" DataSourceID="SqlDataSource1"
  31.                     ForeColor="Black" OnRowCommand="MailList_RowCommand" OnRowCreated="MailList_RowCreated"
  32.                     OnRowDataBound="MailList_RowDataBound" Style="position: relative" Width="700px">
  33.                     <FooterStyle BackColor="White" ForeColor="#000066" />
  34.                     <RowStyle ForeColor="Black" />
  35.                     <Columns>
  36.                         <asp:TemplateField HeaderText="收件人">
  37.                             <ItemTemplate>
  38.                                 <asp:Label ID="LblReceivers" runat="server" Style="position: relative"></asp:Label>&nbsp;
  39.                             </ItemTemplate>
  40.                         </asp:TemplateField>
  41.                         <asp:TemplateField HeaderText="主旨">
  42.                             <ItemTemplate>
  43.                                 <asp:Label ID="LblSubject" runat="server" Style="position: relative" Text='<%# Eval("title") %>'></asp:Label>
  44.                                 <asp:Label ID="LblState" runat="server" Style="position: relative"></asp:Label>
  45.                             </ItemTemplate>
  46.                         </asp:TemplateField>
  47.                         <asp:BoundField DataField="send_date" HeaderText="收到日期" SortExpression="send_date" />
  48.                         <asp:TemplateField HeaderText="閱讀統計">
  49.                             <ItemTemplate>
  50.                                 <asp:Label ID="LblStatistics" runat="server" Style="position: relative"></asp:Label>
  51.                             </ItemTemplate>
  52.                         </asp:TemplateField>
  53.                         <asp:TemplateField>
  54.                             <ItemTemplate>
  55.                                 <asp:LinkButton ID="BtnDelete" runat="server" CommandName="DeleteData" OnClientClick="return confirm('確定要刪除嗎?')">刪除</asp:LinkButton>
  56.                             </ItemTemplate>
  57.                         </asp:TemplateField>
  58.                     </Columns>
  59.                     <PagerStyle BackColor="White" BorderStyle="None" ForeColor="Black" HorizontalAlign="Left" />
  60.                     <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
  61.                     <HeaderStyle BackColor="ScrollBar" Font-Bold="True" ForeColor="Black" />
  62.                 </asp:GridView>
  63.             </td>
  64.         </tr>
  65.         <tr>
  66.             <td><br />
  67.                 <asp:Panel ID="PnlMail" runat="server" Style="position: relative" BorderStyle="Groove" Width="680px" Visible="False">
  68.                 <table style="width:678px; position: relative" bgcolor="#dcd5cf">
  69.                     <tr>
  70.                         <td style="width: 68px" valign="top">
  71.                             寄件人</td>
  72.                         <td style="width: 400px" align="left" valign="top">
  73.                             <asp:Label ID="LblSender" runat="server" Style="position: relative"></asp:Label></td>
  74.                         <td align="left">
  75.                             寄件日期:<asp:Label ID="LblSendDate" runat="server" BorderStyle="None" style="position: relative"></asp:Label></td>
  76.                     </tr>
  77.                     <tr>
  78.                         <td style="width: 68px" valign="top">
  79.                             收件人</td>
  80.                         <td colspan="2" align="left" valign="top">
  81.                             <asp:Label ID="LblReceivers" runat="server" Style="position: relative"></asp:Label></td>
  82.                     </tr>
  83.                     <tr>
  84.                         <td style="width: 68px" valign="top">
  85.                             主旨</td>
  86.                         <td colspan="2" align="left" valign="top">
  87.                                 <asp:Label ID="LblTitle" runat="server" BorderStyle="None" style="position: relative"></asp:Label></td>
  88.                     </tr>
  89.                     <tr>
  90.                         <td style="width: 68px" valign="top">
  91.                             附件</td>
  92.                         <td colspan="2" align="left" valign="top">
  93.                             <asp:LinkButton ID="BtnAttachment" runat="server" Style="left: 0px;
  94.                                 position: relative" OnClick="BtnAttachment_Click" BorderStyle="None"></asp:LinkButton>
  95.                             <asp:Label ID="LblNoAttachment" runat="server" Style="position: relative" Text="無"
  96.                                 Visible="False" BorderStyle="None"></asp:Label>
  97.                             <asp:HiddenField ID="ContentLength" runat="server" />
  98.                             <asp:HiddenField ID="AttachmentEnName" runat="server" />
  99.                         </td>
  100.                     </tr>
  101.                     <tr>
  102.                         <td style="width: 68px" valign="top">
  103.                             閱讀統計</td>
  104.                         <td colspan="2" align="left" valign="top">
  105.                             <asp:LinkButton ID="BtnStatistics" runat="server" Style="left: 0px; position: relative"></asp:LinkButton></td>
  106.                     </tr>
  107.                     <tr>
  108.                         <td colspan="3">
  109.                             <asp:TextBox ID="TxtContent" TextMode="MultiLine" Rows="20" Width="678" ReadOnly="True" runat="server"></asp:TextBox>
  110.                         </td>
  111.                     </tr>
  112.                 </table><br />
  113.                 </asp:Panel>
  114.             </td>
  115.         </tr>
  116.     </table></center>
  117.     </div>
  118.     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  119.         SelectCommand="SELECT s.id, m.title, s.send_date FROM dbo.OA_MAIL_SENDER AS s INNER JOIN dbo.OA_MAIL_CONTENT AS m ON s.mail_id = m.id WHERE (s.state = 1) AND (s.is_del = 0) AND (s.sender = @sender) order by s.send_date desc">
  120.         <SelectParameters>
  121.             <asp:SessionParameter DefaultValue="0" Name="sender" SessionField="user_id" />
  122.         </SelectParameters>
  123.     </asp:SqlDataSource>
  124.     </form>
  125. </body>
  126. </html>