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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="mail_list_receive.aspx.cs" Inherits="web_mail_mail_list_receive" %>
  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 type="text/javascript" language="javascript">
  8.         function selectEmployee()
  9.         {
  10.             var url = "../personnel/curricula_vitae/employee_select_index.aspx";
  11.             var features = "width=1010,height=710,top=0,left=0,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
  12.             var employee = open(url, 'selectDepartment', features);
  13.             employee.focus();
  14.         }
  15.     </script>
  16. </head>
  17. <body>
  18.     <form id="form1" runat="server">
  19.     <center>
  20.                 <br />
  21.         <asp:Label ID="Label6" runat="server" Text="內部電子郵件收件列表" Font-Bold="True" Font-Size="Medium"></asp:Label></center>
  22.     <div>
  23.     <center>
  24.     <table width="700">
  25.         <tr valign="top">
  26.             <td align="center">
  27.                 <br />
  28.                 <asp:GridView ID="MailList" runat="server" AutoGenerateColumns="False" BackColor="White"
  29.                     BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
  30.                     DataSourceID="SqlDataSource1" ForeColor="Black" Style="position: relative" AllowPaging="True" AllowSorting="True" Width="700px" OnRowCreated="MailList_RowCreated" OnRowDataBound="MailList_RowDataBound" OnRowCommand="MailList_RowCommand">
  31.                     <FooterStyle BackColor="White" ForeColor="#000066" />
  32.                     <RowStyle ForeColor="Black" />
  33.                     <Columns>
  34.                         <asp:TemplateField HeaderText="寄件人">
  35.                             <ItemTemplate>
  36.                                 <asp:Label ID="LblSenderNo" runat="server" Style="position: relative" Text='<%# Eval("emp_no") %>'></asp:Label>
  37.                                 <asp:Label ID="LblSenderName" runat="server" Style="position: relative" Text='<%# Eval("emp_name") %>'></asp:Label><asp:Label
  38.                                     ID="LblPosition" runat="server" Style="position: relative" Text='<%# Eval("postion") %>'></asp:Label>
  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>
  49.                             <ItemTemplate>
  50.                                 <asp:LinkButton ID="BtnDelete" CommandName="DeleteData" runat="server" OnClientClick="return confirm('確定要刪除嗎?')">刪除</asp:LinkButton>
  51.                             </ItemTemplate>
  52.                         </asp:TemplateField>
  53.                     </Columns>
  54.                     <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Left" BorderStyle="None" />
  55.                     <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
  56.                     <HeaderStyle BackColor="ScrollBar" Font-Bold="True" ForeColor="Black" />
  57.                 </asp:GridView><br />
  58.             </td>
  59.         </tr>
  60.         <tr>
  61.             <td align="center">
  62.                 <asp:Panel ID="PnlMail" runat="server" Style="position: relative" BorderStyle="Groove" Width="680px" Visible="False">
  63.                 <table style="width:678px; position: relative" bgcolor="#dcd5cf">
  64.                     <tr>
  65.                         <td align="left" colspan="3">
  66.                             <asp:Button ID="BtnReply" runat="server" Text="回覆" OnClick="BtnReply_Click" />
  67.                             <asp:Button ID="BtnReplyAll" runat="server" Text="全部回覆" OnClick="BtnReplyAll_Click" />
  68.                             <asp:Button ID="BtnFw" runat="server" Text="轉寄" OnClick="BtnFw_Click" />
  69.                             <asp:ImageButton ID="ImageButton1" runat="server" Height="18px" ImageUrl="~/images/delete.gif"
  70.                                 Style="position: relative" Width="17px" OnClick="ImageButton1_Click" OnClientClick='return confirm("確定要刪除嗎?")' /></td>
  71.                     </tr>
  72.                     <tr>
  73.                         <td style="width: 60px" valign="top">
  74.                             寄件人</td>
  75.                         <td style="width: 444px" align="left" valign="top">
  76.                             <asp:Label ID="LblSender" runat="server" Style="position: relative"></asp:Label></td>
  77.                         <td align="left">
  78.                             寄件日期:<asp:Label ID="LblSendDate" runat="server" BorderStyle="None" style="position: relative"></asp:Label></td>
  79.                     </tr>
  80.                     <tr>
  81.                         <td style="width: 60px" valign="top">
  82.                             收件人</td>
  83.                         <td colspan="2" align="left" valign="top">
  84.                             <asp:Label ID="LblReceivers" runat="server" Style="position: relative"></asp:Label></td>
  85.                     </tr>
  86.                     <tr>
  87.                         <td style="width: 60px" valign="top">
  88.                             主旨</td>
  89.                         <td colspan="2" align="left" valign="top">
  90.                                 <asp:Label ID="LblTitle" runat="server" BorderStyle="None" style="position: relative"></asp:Label></td>
  91.                     </tr>
  92.                     <tr>
  93.                         <td style="width: 60px" valign="top">
  94.                             附件</td>
  95.                         <td colspan="2" align="left" valign="top">
  96.                             <asp:LinkButton ID="BtnAttachment" runat="server" Style="left: 0px;
  97.                                 position: relative" OnClick="BtnAttachment_Click" BorderStyle="None"></asp:LinkButton>
  98.                             <asp:Label ID="LblNoAttachment" runat="server" Style="position: relative" Text="無"
  99.                                 Visible="False" BorderStyle="None"></asp:Label>
  100.                             <asp:HiddenField ID="ContentLength" runat="server" />
  101.                             <asp:HiddenField ID="AttachmentEnName" runat="server" />
  102.                         </td>
  103.                     </tr>
  104.                     <tr>
  105.                         <td colspan="3">
  106.                             <asp:TextBox ID="TxtContent" TextMode="MultiLine" Rows="20" Width="678" ReadOnly="true" runat="server"></asp:TextBox>
  107.                         </td>
  108.                     </tr>
  109.                 </table><br />
  110.                     <asp:HiddenField ID="SenderId" runat="server" Value="0" />
  111.                     <asp:HiddenField ID="ReceiverIds" runat="server" Value="0" />
  112.                 </asp:Panel>
  113.                 <asp:Panel ID="PnlReply" runat="server" Style="position: relative" BorderStyle="Groove" Visible="false" Width="680px">
  114.                 <table style="width:678px; position: relative" bgcolor="#dcd5cf">
  115.                     <tr>
  116.                         <td align="left" colspan="2">
  117.                             <asp:Button ID="BtnReplyOk" runat="server" Text="傳送" OnClick="BtnReplyOk_Click" />
  118.                             <input type="button" value="取消" onclick="history.go(-1)" />
  119.                             <hr />
  120.                         </td>
  121.                     </tr>
  122.                     <tr>
  123.                         <td valign="middle" style="width: 122px">
  124.                             收件人</td>
  125.                         <td align="left" valign="top">
  126.                             <asp:TextBox ID="TxtReplyReceiver" runat="server" ReadOnly="True" Style="position: relative"
  127.                                 Width="600px"></asp:TextBox></td>
  128.                     </tr>
  129.                     <tr>
  130.                         <td valign="middle" style="width: 122px">
  131.                             主旨</td>
  132.                         <td align="left" valign="top">
  133.                             <asp:TextBox ID="TxtReplyTitle" runat="server" Style="position: relative" Width="600px"></asp:TextBox></td>
  134.                     </tr>
  135.                     <tr>
  136.                         <td valign="middle" style="width: 122px">
  137.                             附件</td>
  138.                         <td align="left" valign="top">
  139.                             <asp:FileUpload ID="FileUpload1" runat="server" Style="position: relative" Width="600px" />
  140.                             <asp:HiddenField ID="ContentLength1" runat="server" />
  141.                         </td>
  142.                     </tr>
  143.                     <tr>
  144.                         <td colspan="2" valign="middle">
  145.                             <asp:TextBox ID="TxtReplyContent" runat="server" Rows="20" TextMode="MultiLine" Width="678"></asp:TextBox>
  146.                         </td>
  147.                     </tr>
  148.                 </table><br />
  149.                 </asp:Panel>
  150.                 <asp:Panel ID="PnlReplyAll" runat="server" Style="position: relative" BorderStyle="Groove" Visible="false" Width="680px"><table style="width:678px; position: relative" bgcolor="#dcd5cf">
  151.                     <tr>
  152.                         <td align="left" colspan="2">
  153.                             <asp:Button ID="BtnReplyAllOk" runat="server" Text="傳送" OnClick="BtnReplyAllOk_Click" />
  154.                             <input type="button" value="取消" onclick="history.go(-1)" />
  155.                             <hr />
  156.                         </td>
  157.                     </tr>
  158.                     <tr>
  159.                         <td valign="middle" style="width: 122px">
  160.                             收件人</td>
  161.                         <td align="left" valign="top">
  162.                             <asp:TextBox ID="TxtReplyAllReceiver" TextMode="MultiLine" runat="server" ReadOnly="True" Style="position: relative"
  163.                                 Width="600px"></asp:TextBox></td>
  164.                     </tr>
  165.                     <tr>
  166.                         <td valign="middle" style="width: 122px">
  167.                             主旨</td>
  168.                         <td align="left" valign="top">
  169.                             <asp:TextBox ID="TxtReplyAllTitle" runat="server" Style="position: relative" Width="600px"></asp:TextBox></td>
  170.                     </tr>
  171.                     <tr>
  172.                         <td valign="middle" style="width: 122px">
  173.                             附件</td>
  174.                         <td align="left" valign="top">
  175.                             <asp:FileUpload ID="FileUpload2" runat="server" Style="position: relative" Width="600px" />
  176.                             <asp:HiddenField ID="ContentLength2" runat="server" />
  177.                         </td>
  178.                     </tr>
  179.                     <tr>
  180.                         <td colspan="2" valign="middle">
  181.                             <asp:TextBox ID="TxtReplyAllContent" runat="server" Rows="20" TextMode="MultiLine" Width="678"></asp:TextBox>
  182.                         </td>
  183.                     </tr>
  184.                 </table>
  185.                 <br />
  186.                 </asp:Panel>
  187.                 <asp:Panel ID="PnlFw" runat="server" Style="position: relative" BorderStyle="Groove" Width="680px" Visible="false"><table style="width:678px; position: relative" bgcolor="#dcd5cf">
  188.                     <tr>
  189.                         <td align="left" colspan="2">
  190.                             <asp:Button ID="BtnFwOk" runat="server" Text="傳送" OnClick="BtnFwOk_Click" />
  191.                             <asp:Button ID="BtnReceiver2" runat="server" Text="收件人" OnClientClick="selectEmployee()" />
  192.                             <input type="button" value="取消" onclick="history.go(-1)" />
  193.                             <hr />
  194.                         </td>
  195.                     </tr>
  196.                     <tr>
  197.                         <td valign="middle" style="width: 122px">
  198.                             <asp:LinkButton ID="BtnReceiver" runat="server" OnClientClick="selectEmployee()">收件人</asp:LinkButton>
  199.                             </td>
  200.                         <td align="left" valign="top">
  201.                             <asp:TextBox ID="TxtEmployees" runat="server" ReadOnly="True" Style="position: relative"
  202.                                 TextMode="MultiLine" Width="600px"></asp:TextBox></td>
  203.                     </tr>
  204.                     <tr>
  205.                         <td valign="middle" style="width: 122px">
  206.                             主旨</td>
  207.                         <td align="left" valign="top">
  208.                             <asp:TextBox ID="TxtFwTitle" runat="server" Style="position: relative" Width="600px"></asp:TextBox></td>
  209.                     </tr>
  210.                     <tr>
  211.                         <td valign="middle" style="width: 122px">
  212.                             附件</td>
  213.                         <td align="left" valign="top">
  214.                             <asp:TextBox ID="TxtFile" runat="server" ReadOnly="True" Style="position: relative"
  215.                                 Width="600px"></asp:TextBox></td>
  216.                     </tr>
  217.                     <tr>
  218.                         <td colspan="2" valign="middle">
  219.                             <asp:TextBox ID="TxtFwContent" runat="server" Rows="20" TextMode="MultiLine" Width="678"></asp:TextBox>
  220.                         </td>
  221.                     </tr>
  222.                 </table>
  223.                     <asp:HiddenField ID="Employee_ids" runat="server" />
  224.                 <br />
  225.                 </asp:Panel>
  226.             </td>
  227.         </tr>
  228.     </table></center>
  229.     </div>
  230.     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  231.         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 = 0) and r.receiver=@receiver order by s.send_date desc">
  232.         <SelectParameters>
  233.             <asp:SessionParameter DefaultValue="0" Name="receiver" SessionField="user_id" />
  234.         </SelectParameters>
  235.     </asp:SqlDataSource>
  236.     </form>
  237. </body>
  238. </html>