<%@ Page Title="发送消息管理页面(站内消息,留言,公告)" Language="C#" MasterPageFile="~/Others/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="SendMessageManage.aspx.cs" Inherits="Web.Admin.Contents.SendMessageManage" %>

<%@ Register Assembly="BX.Common" Namespace="Common" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentCenter" runat="server">
    <form id="form1" runat="server">
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnablePaging="True"
            SelectMethod="SendList" TypeName="Logic.Message" SelectCountMethod="SendCount" DeleteMethod="SendDelete">
            <DeleteParameters>
                <asp:Parameter DbType="Int32" Name="messageId" />
            </DeleteParameters>
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="10" Name="startType"
                    Type="Int32" />
                <asp:QueryStringParameter DefaultValue="20" Name="endType"
                    Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <div class="DivRightCenter">
            <div class="listdiv">
                <div class="grid-title">
                    <div class="grid-title-text">
                        <h4>
                            <span>短消息发件箱</span>
                        </h4>
                    </div>
                </div>
                <div class="grid-list">
                    <cc1:ExtendedGridView ID="ExtendedGridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        CssClass="grid" PageSize="20" DataSourceID="ObjectDataSource1" EnableTheming="False" ItemName="在线留言管理" CheckBox="False" CheckBoxDataIndex="0" DisableShortcuts="False" DataKeyNames="MessageID">
                        <AlternatingRowStyle CssClass="tr2"></AlternatingRowStyle>
                        <Columns>
                            <asp:BoundField DataField="MessageContent" HeaderText="发送内容" />
                            <asp:TemplateField HeaderText="消息类型">
                                <ItemTemplate>
                                    <%# DataBinder.Eval(Container.DataItem, "Type")%>
                                </ItemTemplate>
                                <ItemStyle Width="50px" Wrap="False" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="CreateTime" HeaderText="发送时间">
                                <ItemStyle Width="100px" Wrap="False" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" OnClientClick='javascript:return confirm("确定删除？")' Text="删除" CausesValidation="false"></asp:LinkButton>
                                    &nbsp;<a href='<%#"LeaveMessageEdit.aspx?messageid="+DataBinder.Eval(Container.DataItem,"MessageID") %>'>查看</a>
                                </ItemTemplate>
                                <ItemStyle Width="100px" Wrap="False" />
                            </asp:TemplateField>
                        </Columns>

                        <HeaderStyle HorizontalAlign="Center" Wrap="False" CssClass="gridhead"></HeaderStyle>

                        <RowStyle HorizontalAlign="Center" CssClass="tr1"></RowStyle>
                    </cc1:ExtendedGridView>
                </div>
            </div>
            <br />
            <div class="FormButtonArea">
                <asp:Button ID="Button1" runat="server" UseSubmitBehavior="false" OnClientClick="document.location.href='SendMessageEdit.aspx';return false;"
                    Text="发送消息" />&nbsp;&nbsp;
            </div>
        </div>
        <br />
        <br />
    </form>
</asp:Content>
