<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="MTCUN.OA.Show" %>

<%@ Import Namespace="MTCUN" %>
<!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></title>

    <link id="linkStyle" runat="server" href="../themes/Blue/css.css" rel="stylesheet"
        type="text/css" />

    <style type="text/css">
        html, body, form {
            margin: 0px;
            padding: 0px;
            height: 100%;
        }
    </style>

    <script type="text/javascript">
        function ScrollBottom() {
            var height = document.body.scrollHeight;
            window.scrollBy(0, height);

        }

    </script>
</head>
<body runat="server" id="body" style="width: 100%">
    <form id="form1" runat="server" style="width: 100%">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="top_nav" style="height: 42px; width: 100%;">
            <table class="table_simple_kuan" cellpadding="0" cellspacing="0" style="margin: 4px">
                <tr>
                    <td style="width: 100px; text-align: center;">
                        <input class="app_button" style="height: 30px; width: 80px" onclick="back(this)" type="button" value="返回" /></td>
                    <td align="center" style="font-weight: bold; color: white"><span title='<%=ViewState["FriendName"] + ((int)ViewState["FriendID"] ==0 ? "" : " ID号："+ViewState["FriendID"])%>'><%=ViewState["FriendName"]%></span></td>
                    <td style="width: 100px; text-align: center;"></td>
                </tr>
            </table>
        </div>
        <div id="web_page_contents" style="width: 100%">
            <div class="biao_zhun_suo_jin">
                <div style="margin-top: 50px; margin-bottom: 120px">
                    <asp:UpdatePanel ID="upMsgs" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="AppMsgID"
                                ShowHeader="False" Width="100%">
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <div class='<%#(int)Eval("Reply") == 1 ? "rechat" :"chat" %>'>
                                                <div class="logo" style='<%# string.Format("background-image:url(\"{0}\")",(int)Eval("Reply") == 1 ? ShowUserFace(ViewState["MyFace"].ToString()): ShowUserFace(ViewState["FriendFace"].ToString())) %>'>
                                                </div>
                                                <div class="content wrap">
                                                    <%#swq.Tools.UBBEncode(Eval("PostContent").ToString()) %>
                                                    <div class="time">
                                                        <%#Eval("PostTime","{0:M-d HH:mm}") %>
                                                    </div>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                            <span style="display: none; visibility: hidden">
                                <asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" /></span>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>

            </div>
            <br />
            <br />
            <br />
            <br />
            <asp:UpdatePanel ID="upSend" runat="server">
                <ContentTemplate>
                    <div class="bottom_nav" style="height: 45px; width: 100%;" id="divSend" runat="server">
                        <table class="table_simple_kuan" cellpadding="0" cellspacing="0" style="margin: 4px;">
                            <tr>
                                <td>
                                    <asp:TextBox ID="tbxContent" runat="server" Height="30px" Width="100%" Font-Size="14px"></asp:TextBox></td>
                                <td style="width: 140px; text-align: center;">
                                    <asp:Button ID="btnPost" CssClass="app_button" runat="server" Text="发送" Height="30px" Width="100px"
                                        OnClick="btnPost_Click" /></td>
                            </tr>
                        </table>

                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>
