<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ly.aspx.cs" ValidateRequest="false" Inherits="Oykx.ly" %>


<!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>给我留言 -
        <%=Resources.zhouxiang.index %></title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
</head>
<body >
    <form id="form1" runat="server">
    <input type="hidden" id="IP"  runat="server" />
    <div id="HD" runat="server"></div>
    <script>
        function IP() {
            document.getElementById("IP").value = returnCitySN["cname"];
            IPPD();
        }
        IP();
        
    </script>
    <div id="content" style=" height:auto">
        <div style="margin: 2px;
            width: 99%;" class="bian">
            <div class="titleBT">
                <table cellpadding="0" cellspacing="0" align="left" style="margin-top: 6px;">
                    <tr>
                        <td>
                            &nbsp;<img alt="" src="image/ly.PNG" width="16px" height="16px" />
                        </td>
                        <td>
                            &nbsp;<b>给我留言</b>
                        </td>
                    </tr>
                </table>
            </div>
            <div>
                <br />
                <asp:TextBox ID="txtcontent"  onclick="JavaScript:this.value=''" runat="server" BorderColor="#333333"
                    BorderStyle="Solid" BorderWidth="1px" Height="100px" TextMode="MultiLine" Width="250px"></asp:TextBox>
                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtcontent" ErrorMessage="*"></asp:RequiredFieldValidator>
                <br />
                <br />
                <asp:Button ID="btntijiao" runat="server" BorderColor="#333333" BorderStyle="Solid"
                    BorderWidth="1px" Text="提交" Width="100px" onclick="btntijiao_Click" />
                <br />
                <br />
            </div>
        </div>
        <div style="margin: 2px;
            width: 99%;" class="bian">
            <div class="titleBT">
                <table cellpadding="0" cellspacing="0" align="left" style="margin-top: 6px;">
                    <tr>
                        <td>
                            &nbsp;<img alt=""   src="image/rizi.PNG" width="16px" height="16px" />
                        </td>
                        <td>
                            &nbsp;<b>查看留言</b>
                        </td>
                    </tr>
                </table>
            </div>
            <div >
                <asp:GridView ID="Grid_ly" runat="server" 
                    AutoGenerateColumns="False" DataSourceID="Object_ly" Width="100%" EnableTheming="True" 
                    GridLines="None">
                    <Columns>
                        <asp:TemplateField HeaderText="留言地址" SortExpression="IP">
                            <ItemTemplate>
                                <asp:Label ID="lblip" runat="server" Text='<%# Bind("IP") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="留言内容" SortExpression="MContent">
                            <ItemTemplate>
                                <asp:Label ID="lblMContent" runat="server" Text='<%# str(Eval("MContent").ToString(),20) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="留言时间" SortExpression="MTime">
                            <ItemTemplate>
                                <asp:Label ID="lblMTime" runat="server" Text='<%# Bind("MTime") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="是否回复" SortExpression="RVisble">
                            <ItemTemplate>
                                <asp:Label ID="lblRVisble" runat="server" Text='<%# visble(Eval("RVisble").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="回复内容" SortExpression="RContent">
                            <ItemTemplate>
                                <asp:Label ID="lblRContent" runat="server" Text='<%# Bind("RContent") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </div>
    </div>
     <div id="DB" runat="server"></div>
    <asp:ObjectDataSource ID="Object_ly" runat="server" SelectMethod="select" 
        TypeName="OykxBLL.MessageManager">
    </asp:ObjectDataSource>
    </form>
</body>
</html>
