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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="mail_list_delete.aspx.cs" Inherits="web_mail_mail_list_delete" %>
  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. </head>
  8. <body>
  9.     <form id="form1" runat="server">
  10.     <div>
  11.     <center>
  12.     <table>
  13.         <tr>
  14.             <td>
  15.             <asp:GridView ID="MailList" runat="server" AllowPaging="True" AllowSorting="True"
  16.                 AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
  17.                 BorderWidth="1px" CellPadding="3" DataKeyNames="id" DataSourceID="SqlDataSource1"
  18.                 ForeColor="Black" OnRowCommand="MailList_RowCommand" OnRowCreated="MailList_RowCreated"
  19.                 OnRowDataBound="MailList_RowDataBound" Style="position: relative" Width="700px">
  20.                 <FooterStyle BackColor="White" ForeColor="#000066" />
  21.                 <RowStyle ForeColor="Black" />
  22.                 <Columns>
  23.                     <asp:TemplateField HeaderText="寄件人">
  24.                         <ItemTemplate>
  25.                             <asp:Label ID="LblSenderNo" runat="server" Style="position: relative" Text='<%# Eval("emp_no") %>'></asp:Label>
  26.                             <asp:Label ID="LblSenderName" runat="server" Style="position: relative" Text='<%# Eval("emp_name") %>'></asp:Label><asp:Label
  27.                                 ID="LblPosition" runat="server" Style="position: relative" Text='<%# Eval("postion") %>'></asp:Label>
  28.                         </ItemTemplate>
  29.                     </asp:TemplateField>
  30.                     <asp:TemplateField HeaderText="主旨">
  31.                         <ItemTemplate>
  32.                             <asp:Label ID="LblSubject" runat="server" Style="position: relative" Text='<%# Eval("title") %>'></asp:Label>
  33.                             <asp:Label ID="LblState" runat="server" Style="position: relative"></asp:Label>
  34.                         </ItemTemplate>
  35.                     </asp:TemplateField>
  36.                     <asp:BoundField DataField="send_date" HeaderText="收到日期" SortExpression="send_date" />
  37.                     <asp:TemplateField>
  38.                         <ItemTemplate>
  39.                             <asp:LinkButton ID="BtnRestore" runat="server" CommandName="Restore" OnClientClick="return confirm('確定要還原嗎?')">還原</asp:LinkButton>
  40.                         </ItemTemplate>
  41.                     </asp:TemplateField>
  42.                 </Columns>
  43.                 <PagerStyle BackColor="White" BorderStyle="None" ForeColor="Black" HorizontalAlign="Left" />
  44.                 <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
  45.                 <HeaderStyle BackColor="ScrollBar" Font-Bold="True" ForeColor="Black" />
  46.             </asp:GridView>
  47.             </td>
  48.             </tr>
  49.             <tr>
  50.             <td><br />
  51.             <asp:Panel ID="PnlMail" runat="server" BorderStyle="Groove" Style="position: relative"
  52.                 Visible="False" Width="680px">
  53.                 <table bgcolor="#dcd5cf" style="width: 678px; position: relative">
  54.                     <tr>
  55.                         <td style="width: 60px" valign="top">
  56.                             寄件人</td>
  57.                         <td align="left" style="width: 444px" valign="top">
  58.                             <asp:Label ID="LblSender" runat="server" Style="position: relative"></asp:Label></td>
  59.                         <td align="left">
  60.                             寄件日期:<asp:Label ID="LblSendDate" runat="server" BorderStyle="None" Style="position: relative"></asp:Label></td>
  61.                     </tr>
  62.                     <tr>
  63.                         <td style="width: 60px" valign="top">
  64.                             收件人</td>
  65.                         <td align="left" colspan="2" valign="top">
  66.                             <asp:Label ID="LblReceivers" runat="server" Style="position: relative"></asp:Label></td>
  67.                     </tr>
  68.                     <tr>
  69.                         <td style="width: 60px" valign="top">
  70.                             主旨</td>
  71.                         <td align="left" colspan="2" valign="top">
  72.                             <asp:Label ID="LblTitle" runat="server" BorderStyle="None" Style="position: relative"></asp:Label></td>
  73.                     </tr>
  74.                     <tr>
  75.                         <td style="width: 60px" valign="top">
  76.                             附件</td>
  77.                         <td align="left" colspan="2" valign="top">
  78.                             <asp:LinkButton ID="BtnAttachment" runat="server" BorderStyle="None" OnClick="BtnAttachment_Click"
  79.                                 Style="left: 0px; position: relative"></asp:LinkButton>
  80.                             <asp:Label ID="LblNoAttachment" runat="server" BorderStyle="None" Style="position: relative"
  81.                                 Text="無" Visible="False"></asp:Label>
  82.                             <asp:HiddenField ID="ContentLength" runat="server" />
  83.                             <asp:HiddenField ID="AttachmentEnName" runat="server" />
  84.                         </td>
  85.                     </tr>
  86.                     <tr>
  87.                         <td colspan="3">
  88.                             <asp:TextBox ID="TxtContent" runat="server" ReadOnly="true" Rows="20" TextMode="MultiLine"
  89.                                 Width="678"></asp:TextBox>
  90.                         </td>
  91.                     </tr>
  92.                 </table>
  93.                 <br />
  94.                 <asp:HiddenField ID="SenderId" runat="server" Value="0" />
  95.                 <asp:HiddenField ID="ReceiverIds" runat="server" Value="0" />
  96.             </asp:Panel>
  97.             </td>
  98.         </tr>
  99.     </table>
  100.     </center>
  101.     </div>
  102.         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  103.             SelectCommand="SELECT r.id, m.title, r.is_read, s.send_date, e.emp_no, e.emp_name, p.name postion FROM dbo.OA_MAIL_RECEIVER AS r INNER JOIN dbo.OA_MAIL_SENDER AS s ON r.mail_id = s.mail_id INNER JOIN dbo.OA_EMPLOYEE AS e ON s.sender = e.id INNER JOIN dbo.OA_MAIL_CONTENT AS m ON r.mail_id = m.id inner join OA_EMPLOYEE_POSITION p on e.position=p.id WHERE (r.is_del = 1) and r.receiver=@receiver order by s.send_date desc">
  104.             <SelectParameters>
  105.                 <asp:SessionParameter DefaultValue="0" Name="receiver" SessionField="user_id" />
  106.             </SelectParameters>
  107.         </asp:SqlDataSource>
  108.     </form>
  109. </body>
  110. </html>