<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!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>
    <title>ActorInfo</title>
    <style type="text/css">
        body
        {
            font-size:10pt;  
            line-height:14px;  
        }
        .tdBorder
        {
            border:1px solid #cccccc;
            border-bottom-width:0px;
            padding:6px;
        }
        .tdBorderFontBold
        {
            border:1px solid #cccccc;
            border-bottom-width:0px;
            padding:6px;
            font-size:11pt; 
            font-weight:bold;
        }
    </style>
    <script type="text/javascript">
        function Back() {
            window.history.go(-1);
        }
    </script>
</head>
<body>
    <% 
        System.Data.DataRow drActor = ViewData["Actor"] as System.Data.DataRow;
        System.Data.DataTable dtProduct = ViewData["Product"] as System.Data.DataTable;
    %>
    <table width="800" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td align="left">
            <% 
                string atrName = Server.HtmlEncode(drActor["AtrName"].ToString());
                string bthCode = Server.HtmlEncode(drActor["BthCode"].ToString());
                bthCode = bthCode == "" ? "展位号" : bthCode;
                string typeName = Server.HtmlEncode(ViewData["TypeName"].ToString()).Replace(",", "&nbsp;,&nbsp;");
                typeName = typeName == "" ? "暂无" : typeName;
                string atrIntro = Server.HtmlEncode(drActor["Intro"].ToString()).Replace("\n", "<br />");
                atrIntro = atrIntro == "" ? "暂无" : atrIntro;
            %>
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="center" class="tdBorder" style="font-size:14pt; font-weight:bold;">
                            <%=atrName %>
                            （<%=bthCode %>）
                        </td>
                    </tr>
                    <tr>
                        <td align="left" class="tdBorderFontBold">产品类别：</td>
                    </tr>
                    <tr>
                        <td align="left" class="tdBorder"><%=typeName %></td>
                    </tr>
                    <tr>
                        <td align="left" class="tdBorderFontBold">公司产品介绍：</td>
                    </tr>
                    <tr>
                        <td align="left" class="tdBorder"><%=atrIntro %></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
	            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left" class="tdBorderFontBold">产品展示:</td>
                    </tr>
                    <tr>
                        <td class="tdBorder" style="padding:0px;">
            <%
                if (dtProduct.Rows.Count > 0)
                {
                    foreach (System.Data.DataRow dr in dtProduct.Rows)
                    {
                        string intro = dr["PdtIntro"].ToString();
                        string showIntro = intro;
                        if (intro.Length > 50)
                        {
                            showIntro = intro.Substring(0, 50) + "...";
                        }
            %>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-bottom:1px solid #cccccc">
                                <tr>
                                    <td rowspan="3" width="180" align="center" valign="middle">
                                        <img alt="" src="<%=FamousFurnitureExpo.Models.Helper.VRoot + dr["FilSPath"] %>" />
                                    </td> 
                                    <td align="right" width="80" style="height:15px; padding-top:8px">产品名称：</td>
                                    <td align="left" style="padding-top:8px">
                                        <%=Server.HtmlEncode(dr["PdtName"].ToString())%>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="height:15px; padding-top:8px">产品类别：</td>
                                    <td align="left" style="padding-top:8px"><%=Server.HtmlEncode(dr["TypName"].ToString())%></td>
                                </tr>
                                <tr>
                                    <td align="right" valign="top" style="height:50px; padding-top:8px">产品介绍：</td>
                                    <td align="left" valign="top" title="<%=intro %>" style="padding-top:8px"><%=Server.HtmlEncode(showIntro).Replace("\n", "<br />")%></td>
                                </tr>
                            </table>
            <%
                    }
                }
                else
                { 
            %>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-bottom:1px solid #cccccc">
                                <tr>
                                    <td style="padding:6px">暂无</td>
                                </tr>
                            </table>
            <%    
                }
            %>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="40" align="center">
                <a href="javascript:Back();">返回</a>
            </td>
        </tr>
    </table>
</body>
</html>
