<%@ Page Language="C#" MasterPageFile="~/webUser/MasterPage.master" AutoEventWireup="true" Inherits="webUser_listMsg" Title="Untitled Page"  EnableViewState="true" Codebehind="listFromMsg.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" ConnectionString="<%$ ConnectionStrings:connZydn %>"
        SelectCommand="">
    </asp:SqlDataSource>
    <asp:GridView ID="fromMsgGrid" runat="server" AutoGenerateColumns="False" BorderWidth="0px"
        DataSourceID="Sqlconn1" Width="100%" AllowPaging="True" AllowSorting="True" PageSize="20" DataKeyNames="id"  OnPreRender="fromMsgGrid_Load" >
        <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="toUser" HeaderText="收信人">
                <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="最后页" Mode="NumericFirstLast" NextPageText="下一页"
            PageButtonCount="5" PreviousPageText="上一页" />
        <RowStyle BackColor="#F4F9FD" />
        <PagerStyle BackColor="WhiteSmoke" />
        <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>

