<%@ page language="C#" autoeventwireup="true" inherits="mail_checkMail, App_Web_xpyiwnev" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>系统短消息查看</title>
     <link href="../CssHtml.css" rel="stylesheet" type="text/css" />
    
</head>
<body>
    <form id="form1" runat="server">
    <div style ="text-align :center ;">
     <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Style="width: 800px; margin-top:20px"
                    AutoGenerateRows="False" DataSourceID="SqlDataSource2" Font-Size="Smaller"  BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="2px" >
                    <Fields>
                        <asp:TemplateField HeaderText="id" InsertVisible="False" SortExpression="id" Visible="False">
                            <EditItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("id") %>'></asp:Label>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("id") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="topic" HeaderText="主题" SortExpression="topic" >
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="发件人"   SortExpression="senderId">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# GetUname(Eval("senderId")) %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="cdate" HeaderText="发送时间" SortExpression="cdate" >
                            <HeaderStyle Width="90px" BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="状态" SortExpression="urgent">
                            <EditItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("urgent") %>' />
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("urgent") %>' />
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Getjj(Eval("urgent")) %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="是否阅读" SortExpression="reads">
                            <EditItemTemplate>
                                <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("reads") %>' />
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("reads") %>' />
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <img id="Image1" src='images/<%# Getimg(Eval("reads")) %>' alt="" />
                            </ItemTemplate>
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="附件">
                            <ItemTemplate>
                           
                                <asp:LinkButton ID="LinkButton2" runat="server" ForeColor ="Blue"  Text='<%# Getattname(Eval("attId")) %>' CommandName='<%# Eval("attId") %>' OnClick="LinkButton2_Click">LinkButton</asp:LinkButton>
                                &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                               <asp:LinkButton ID="LinkButton1" runat="server"  ForeColor ="Blue" Text ='<%# Getattname2(Eval("attId")) %>'  OnClick="LinkButton1_Click"  CommandName='<%# Eval("attId") %>' ></asp:LinkButton>
                             
                            </ItemTemplate>
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="contents" HeaderText="内容" SortExpression="contents">
                            <ItemStyle VerticalAlign="Top" />
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                              <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate  >
                                <asp:Label ID="Label5" runat="server" ForeColor="Red" Text="没有附件！" Visible="False"></asp:Label>
                                <input id="Button1" type="button" value="关闭窗口" onclick =" window.close();" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" BackColor="#CCCCCC" />
                            <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                        </asp:TemplateField>
                    </Fields>
                    <HeaderStyle Font-Size="Smaller" BackColor="InactiveCaption" Font-Bold="True" ForeColor="White" />
                </asp:DetailsView>
                 <asp:SqlDataSource ID="SqlDataSource2" runat="server" >
                   
                </asp:SqlDataSource>
      
    
    </div>
    </form>
</body>
</html>
