<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_Buyer_Message, WebApp_deploy" title="买家留言" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function encode(textname)
{
   var temp = encodeURL(textname);
   document.write(temp);
	
}

</script>
<div class="pageTitle">查看买家留言</div>

<div style="text-align:center; clear:both;">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="tableHead" AllowPaging="True" DataSourceID="ObjectDataSource1" OnRowDataBound="GridView1_RowDataBound" >
        <Columns>
             <asp:TemplateField HeaderText="商品名称">
               <ItemTemplate>
                   <asp:HyperLink Target="_blank"  ID="ProductName" runat="server" Text='<%# Eval("ProductName") %>' NavigateUrl='<%# "../ShowProduct.aspx?ProductID="+Eval("M_ProductID") %>' />
               </ItemTemplate>
             </asp:TemplateField>           
             <asp:TemplateField HeaderText="买家名称">                
                <ItemTemplate>
                    <asp:HyperLink ID="SalerName" runat="server" Text='<%# Eval("M_SenderName") %>' NavigateUrl='<%#"../Shop1/Shop_ShopIntro.aspx?UserID="+Eval("M_UserID") %>'  Target="_blank"/><br />
                    <asp:HyperLink ID="QQLink" runat="server" NavigateUrl='<%# "http://wpa.qq.com/msgrd?V=1&Uin="+Eval("OICQ")+"&amp;Site="+Eval("M_SenderName")+"&amp;Menu=yes" %>' Target="_blank">
                       <asp:Image  ID="QQImage" ImageUrl='<%# Eval("OICQ")%>' runat="server" />
                    </asp:HyperLink>
                     <asp:HyperLink ID="TaobaoLink" runat="server" NavigateUrl='<%# Eval("Taobaowangwang") %>' Target="_blank">
                       <asp:Image ID="TaobaoImage" ImageUrl='<%# Eval("Taobaowangwang") %>' runat="server"  AlternateText="点击此可以直接和对方交流"/>
                    </asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="M_DateTime" HeaderText="留言日期" />
            <asp:TemplateField HeaderText="留言状态">               
                <ItemTemplate>
                    <asp:HyperLink ID="Status" runat="server" Text='<%#  Eval("M_Status") %>'/>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="选择">                
                <ItemTemplate>
                    <asp:CheckBox ID="MessageSelect" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>        
        <EmptyDataTemplate>
        <table  style="width:98%">
        <tr>
        <th>商品名称</th>
        <th>买家名称</th>
        <th>留言日期</th>
        <th>留言状态</th>
        <th>选择</th>
        </tr>
        <tr><td colspan="5">暂无任何留言</td></tr>
        </table>
        
        </EmptyDataTemplate>
    </asp:GridView>
</div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetMessageByTypeUserIDSalerID" TypeName="HoWave.Web.Shop_Message" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:Parameter  DefaultValue="0" Name="mType"  Type="Int32" />
            <asp:Parameter  
              DefaultValue="" Name="UserID"   Type="Int32" />
            <asp:Parameter DefaultValue="buyer" Name="UserType" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

