<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ExhibitorMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script src="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Scripts/DynaForm.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            selectMenu("新品意向观众");
        });

        var dynaform;
        function MoreLink(PsjName, PsnID, PdtID) {
            //alert(getScrollTop());
            var vheight = 0;
            vheight = getScrollTop() - 200;
            if (vheight < 0)
                vheight = 50;
            dynaform = new DynaForm({
                id: "dynaform",
                title: "新品详细联络信息---" + PsjName,
                src: "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/LinkPdtListIndex?PsnID=" + PsnID + "&PdtID=" + PdtID,
                width: "400px",
                height: "450px",
                top: vheight
            });
            dynaform.showModalDialog();
        }

        function getScrollTop() {
            var scrollTop = 0;
            if (parent.document.documentElement && parent.document.documentElement.scrollTop) {
                scrollTop = parent.document.documentElement.scrollTop;
            }
            else if (parent.document.body) {
                scrollTop = parent.document.body.scrollTop;
            }
            return scrollTop;
        }
    </script>
    <style type="text/css">
    .link1
    {
    	color:White;
	    text-decoration: none;
    }
    .link1 a
    {
        color:White;
	    text-decoration: none;
    }    
    .link1 a:link 
    {
        color:White;
	    text-decoration: none;
    }
    .link1 a:hover 
    {
        color:White;
	    text-decoration: none;
    }
    .link1 a:visited
    {
        color:White;
	    text-decoration: none;
    }
    
    </style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div>
    <form id="f1" action="" method="post">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td align="left" style="padding-bottom:5px">
                已有&nbsp;<font color="red"><%=ViewData["TotalNum"] %></font>&nbsp;位观众对您的新品表示感兴趣
            </td>
        </tr>
        <tr>
            <td align="left">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <% 
                    System.Data.DataTable dt = ViewData["Data"] as System.Data.DataTable;
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        foreach (System.Data.DataRow dr in dt.Rows)
                        {
                            string PsjComName = Server.HtmlEncode(dr["PsjComName"].ToString());
                            string PsjName = Server.HtmlEncode(dr["PsjName"].ToString());
                            string MsgContent = Server.HtmlEncode(dr["MsgContent"].ToString());
                            string MsgCreateTime = Server.HtmlEncode(dr["MsgCreateTime"].ToString());
                            string MsgSource = Server.HtmlEncode(dr["MsgSource"].ToString());
                            string MsgLook = Server.HtmlEncode(dr["MsgLook"].ToString());
                            string MsgRID = Server.HtmlEncode(dr["MsgRID"].ToString());
                            string PdtID = Server.HtmlEncode(dr["MsgObjSourceID"].ToString());
                %>
                    <tr>
                        <td style="padding-top:5px">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border: solid thin #F7A841">
                                <tr>
                        <td style="background-color:#F7A841;padding:5px">
                            <%=PsjComName%> 的 <%=PsjName %> 对你的新品感兴趣。
                        </td>
                        <td align="right" style="background-color:#F7A841;padding-right:5px">
                        <span class="link1"><a href="javascript:MoreLink('<%=PsjName%>','<%=MsgRID%>','<%=PdtID%>');">查看更多消息</a></span>
                        </td>
                    </tr>
                    <%
                        if (MsgSource == "Actor")
                        {
                            
                             %>
                    <tr>
                        <td style="padding:5px" colspan="2">
                            <font color="green">您回复观众：<%=MsgContent%></font>
                        </td>
                    </tr>
                    <%
                        }
                        else
                        {
                            if (MsgLook == "False")
                            { 
                                 %>
                    <tr>
                        <td style="padding:5px" colspan="2">
                            回复内容：<%=MsgContent%>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">New</font>
                        </td>
                    </tr>
                    <%
                        }
                            else
                            {
                                 %>
                                 <tr>
                        <td style="padding:5px" colspan="2">
                            回复内容：<%=MsgContent%>
                        </td>
                    </tr>
                    <%
                                
                        }
                        }
                                 %>

                                 <tr>
                                                <td style="padding:5px" colspan="2" align="right">
                                                    时间：<%=MsgCreateTime%>
                                                </td>
                                            </tr>
                            </table>
                        </td>
                    </tr>

                    
                <%            
}
                %>
                    <tr><td>&nbsp;</td></tr>
                    <tr>
                        <td colspan="4">
                            <script type="text/javascript">
                                PagerPost.Display("<%=ViewData["Page"] %>","<%=ViewData["PageSize"] %>","<%=ViewData["TotalNum"] %>","f1");
                            </script>
                        </td>
                    </tr>
                <%    
}
                    else
                    { 
                %>
                    <tr>
                        <td colspan="4" align="center" style="padding:6px">暂无信息</td>
                    </tr>
                <%    
                    }
                %>
                </table>
            </td>
        </tr>
    </table>
    </form>
</div>
</asp:Content>

