<%@ Page Language="C#"   MasterPageFile="~/webUser/MasterPage.master" AutoEventWireup="true" Inherits="webUser_listInMsg" Title="Untitled Page" EnableViewState="true" Codebehind="listInMsg.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content1" Runat="Server">

 <div class="maxTitle">
               我的收件箱
 </div>
<form id="form1" name="form1" runat="server">
    <asp:SqlDataSource ID="Sqlconn1" runat="server"
        SelectCommand="select title,savedate,toUser,isShow from zydn_msg order by id desc">
    </asp:SqlDataSource>
  
    <asp:GridView ID="fromMsgGrid" runat="server" AutoGenerateColumns="False"
        DataSourceID="Sqlconn1" Width="100%" AllowPaging="True" AllowSorting="True" DataKeyNames="id" PageSize="20" OnPreRender="fromMsgGrid_Load" CellPadding="4" ForeColor="#333333" GridLines="None" >
        <Columns>
            <asp:HyperLinkField DataTextField="title" HeaderText="标题" DataNavigateUrlFields="id" DataNavigateUrlFormatString="showMsg.aspx?menuindex=1&amp;id={0}">
                <HeaderStyle CssClass="titleLeft" />
                <ItemStyle CssClass="bodyDiv" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataTextField="fromUser" HeaderText="发信人" DataNavigateUrlFields="fromUser" DataNavigateUrlFormatString="userInfo.aspx?menuindex=0&amp;userName={0}">
                <HeaderStyle CssClass="titleLeft" Width="80px" />
                <ItemStyle CssClass="bodyDiv" />
            </asp:HyperLinkField>
            <asp:BoundField DataField="savedate" HeaderText="发信时间" SortExpression="savedate" DataFormatString="{0:D}" HtmlEncode="False">
                <HeaderStyle CssClass="titleLeft" Width="120px" />
                <ItemStyle CssClass="bodyDiv" />
            </asp:BoundField>
            <asp:BoundField DataField="isShow" HeaderText="是否阅读" SortExpression="isShow">
                <HeaderStyle CssClass="titleLeft" Width="50px" />
                <ItemStyle CssClass="bodyDiv" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="选择">
                <ItemStyle CssClass="bodyDiv" />
                <HeaderStyle CssClass="titleRight" Width="50px" />
                <ItemTemplate>
                    <asp:CheckBox ID="c1" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerSettings FirstPageText="第一页" LastPageText="最后页" NextPageText="下一页"
            PreviousPageText="上一页" />
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F4F9FD" />
        <EditRowStyle BackColor="#7C6F57" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="WhiteSmoke" ForeColor="DarkBlue" HorizontalAlign="Center" Font-Bold="True" Font-Size="14px" Font-Strikeout="True" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
        <div class="msgBottom" style="text-align:center;">
       
        主题
        <asp:TextBox ID="findTitle" runat="server" Width="102px"></asp:TextBox>
            发信人
        <asp:TextBox ID="findFromUser" runat="server" Width="95px"></asp:TextBox>
        内容<asp:TextBox ID="findBody" runat="server"></asp:TextBox>
        <asp:Button ID="bFind" runat="server" OnClick="bFind_Click" Text="搜索" />
        
         &nbsp; &nbsp; &nbsp;  <input id="Button1" type="button" value="全选" onclick="selectAll()" />
    <input id="Button2" type="button" value="反选" onclick="selectReverse()" /> 
    <asp:Button ID="bDel" runat="server" Text="删除" OnClick="bDel_Click" UseSubmitBehavior="False" />
      
        </div>
    
    
</form>
</asp:Content>

