<%@ Page Language="C#" Inherits="TopWinCMS.BLL.PageFactory.Pages.ShopShow" EnableSessionState="false"
    EnableViewState="false" %>

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="TopWinCMS.Model" %>
<%@ Import Namespace="TopWinCMS.DALFactory" %>
<%@ Import Namespace="TopWinCMS.IDAL" %>
<%@ Import Namespace="TopWinCMS.BLL" %>
<%@ Register Src="Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="SearchBar.ascx" TagName="searchbar" TagPrefix="uc1" %>
<%@ Register Src="Left.ascx" TagName="Left" TagPrefix="uc2" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>园玉商城</title>
    <link href="/Shop/css.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="/JS/TopWinCMS.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/Ajax/Ajax.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/Ajax/MemberLoginBar.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/Ajax/Shop.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/Ajax/PostComment.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/Ajax/PostConsultant.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/Ajax/GetVote.js"></script>
    <script language="javascript" type="text/javascript">
        function HideAndDisplay(TabIndex, o)
        {
            $("current").id = "";
            for (i = 0; i < 5; i++)
            {
                if (i == TabIndex)
                {
                    o.id = "current";

                    if ($("Tab" + i))
                        $("Tab" + i).style.display = "block";
                }
                else
                {
                    if ($("Tab" + i))
                        $("Tab" + i).style.display = "none";
                }
            }

            return false;
        }
        
    </script>
    <script runat="server">
        int GoodsID;
        private void Page_Load(object sender, System.EventArgs e)
        {

            GoodsID = int.Parse(Request["ID"]);
            HttpCookie MyCookie = HttpContext.Current.Request.Cookies["ReadedGoods"];
            if (MyCookie == null)
            {
                MyCookie = new HttpCookie("ReadedGoods");
                MyCookie.Values.Add("GoodIDs", Request["ID"]);
                MyCookie.Expires = DateTime.Now.AddDays(7);

                Response.Cookies.Add(MyCookie);
            }
            else
            {
                List<string> list = new List<string>();
                string[] Arr = MyCookie.Values["GoodIDs"].Split(',');
                list.AddRange(Arr);
                list.Add(Request["ID"]);

                MyCookie.Values["GoodIDs"] = string.Join(",", list.ToArray());
                MyCookie.Expires = DateTime.Now.AddDays(7);
                Response.Cookies.Add(MyCookie);

                Repeater1.DataSource = new TopWinCMS.BLL.Public_Shop(4).ReadedGoods(8, list.ToArray());
                Repeater1.DataBind();

                new TopWinCMS.BLL.ShopImgsManage().GetLists(DL_Imgs, GoodsID);

                new TopWinCMS.BLL.BundlingManage().BindList(DL_Bundling, GoodsID);

                new TopWinCMS.BLL.GoodsPartsManage().BindList(DL_GoodsParts, GoodsID);

                LoadUI(T_CanShu);

                ExtendFieldData(GoodsID, T_CanShu);
            }

        }

        #region 加载扩展字段界面
        private static readonly IField MyClassDAL = DataAccess.Instance<IField>();

        /// <summary>
        /// 加载扩展字段界面
        /// </summary>
        /// <param name="T_DefinedFile"></param>
        /// <param name="ClassID"></param>
        /// <param name="ExtendField"></param>
        public void LoadUI(Table T_DefinedFile)
        {
            ShopInfo m = new TopWinCMS.BLL.Public_Shop(4).PublicShow(int.Parse(Request["ID"]));

            if (m == null) return;

            IList<FieldInfo> list = MyClassDAL.GetShopModelField(m.ModelID, m.ClassID.ToString());
            if (list.Count == 0)
            {
                T_DefinedFile.Visible = false;

                return;
            }
            else
            {

                LoadUI(T_DefinedFile, list);
            }
        }
        private void LoadUI(System.Web.UI.WebControls.Table T_DefinedFile, IList<FieldInfo> list)
        {
            TableRow tr;
            TableCell tc;
            foreach (FieldInfo model in list)
            {
                tr = new TableRow();

                tc = new TableCell();
                tc.CssClass = "RowStyle";
                tc.HorizontalAlign = HorizontalAlign.Right;

                tc.Text = model.Title;


                tr.Controls.Add(tc);

                #region

                tc = new TableCell();
                Label tb = new Label();
                tb.ID = model.FieldName;
                //tb.Width = model.Width;


                tc.Controls.Add(tb);
                tr.Controls.Add(tc);


                tr.Controls.Add(tc);


                #endregion

                T_DefinedFile.Controls.Add(tr);
            }
        }
        #endregion

        /// <summary>
        /// 加载扩展字段的数据
        /// </summary>
        /// <param name="ClassID"></param>
        /// <param name="T_DefinedFile"></param>
        public void ExtendFieldData(int GoodsID, Table T_DefinedFile)
        {
            DataTable dt = DataAccess.Instance<IGoodsCustomFieldValues>().ExtendFieldData(GoodsID).Tables[0];

            if (dt.Rows.Count == 0) return;

            for (int i = 0; i < T_DefinedFile.Rows.Count; i++)
            {
                TableRow tr = T_DefinedFile.Rows[i];
                System.Web.UI.Control c = tr.Cells[1].Controls[0];

                DataRow[] drs = dt.Select(" FieldName='" + c.ID + "'");
                if (drs.Length == 0)
                {
                    continue;
                }


                if (c is Label)
                {
                    Label tb = c as Label;
                    tb.Text = drs[0]["FieldValue"].ToString();
                }

            }
        }
    </script>
    <style type="text/css">
        /*- Menu Tabs J--------------------------- */#tabs
        {
            float: left;
            width: 100%;
            background: #F4F4F4;
            font-size: 93%;
            line-height: normal;
            border-bottom: 1px solid #24618E;
        }
        #tabs ul
        {
            margin: 0;
            padding: 10px 10px 0 50px;
            list-style: none;
        }
        #tabs li
        {
            display: inline;
            margin: 0;
            padding: 0;
        }
        #tabs a
        {
            float: left;
            background: url("/Images/tableftJ.gif") no-repeat left top;
            margin: 0;
            padding: 0 0 0 5px;
            text-decoration: none;
        }
        #tabs a span
        {
            float: left;
            display: block;
            background: url("/Images/tabrightJ.gif") no-repeat right top;
            padding: 5px 15px 4px 6px;
            color: #24618E;
        }
        /* Commented Backslash Hack hides rule from IE5-Mac \*/#tabs a span
        {
            float: none;
        }
        /* End IE5-Mac hack */#tabs a:hover span
        {
            color: #FFF;
        }
        #tabs a:hover
        {
            background-position: 0% -42px;
        }
        #tabs a:hover span
        {
            background-position: 100% -42px;
        }
        #tabs #current a
        {
            background-position: 0% -42px;
        }
        #tabs #current a span
        {
            background-position: 100% -42px;
            color: #FFF;
        }
        .RowStyle
        {
            text-align: right;
            font-weight: bold;
            width: 120px;
        }
        #Tab1, #Tab2, #Tab3, #Tab4, #Tab5, #Tab6
        {
            display: none;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <uc1:Header ID="Header1" runat="server" />
                <table width="1002" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="68" colspan="2" valign="top" background="images/Shop/top_nav.gif">
                            <uc1:searchbar ID="SearchBar1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="5">
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="204" valign="top">
                            <table width="204" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        <table width="204" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td height="28" colspan="2" background="images/Shop/left_nav.gif">
                                                    <span id="chen">&nbsp;&nbsp;<span class="white02"><strong>登陆&nbsp;</strong></span></span><span
                                                        class="white02">Login</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table id="UserLoginUI" width="204" border="0" cellpadding="0" cellspacing="0" class="box3">
                                                        <tr>
                                                            <td height="30">
                                                                <span id="black">&nbsp;&nbsp;&nbsp;<span class="black01">&nbsp;用户名：</span>&nbsp;</span>
                                                                <input type="text" id="UserName" class="box2" />
                                                            </td>
                                                            <td rowspan="2">
                                                                <strong>
                                                                    <img src="images/Shop/pic.gif" width="37" height="51" onclick="PostLogin();" style="cursor: pointer" /></strong>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="30">
                                                                <span id="black">&nbsp;&nbsp;&nbsp;&nbsp;<span class="black01">密&nbsp;&nbsp;&nbsp;&nbsp;码：&nbsp;</span></span>
                                                                <input type="password" id="UserPSW" class="box2" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="40" colspan="2">
                                                                <img src="images/Shop/bt_2.gif" width="92" height="22" onclick="window.open('/Member/Reg.aspx');"
                                                                    style="cursor: pointer" /><img src="images/Shop/bt_3.gif" width="92" height="22"
                                                                        hspace="8" onclick="window.open('/Member/GetPassword.aspx');" style="cursor: pointer" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table id="UserLoginedUI" style="display: none" width="204" border="0" cellpadding="0"
                                                        cellspacing="10" class="box3">
                                                        <tr>
                                                            <td>
                                                                欢迎您，<font color="red"><span id="UserLoginedUI_Name"></span>(<span id="UserLoginedUI_PetName"></span>)</font>&nbsp;&nbsp;<br />
                                                                预付款：<font color="blue"><span id="UserLoginedUI_Money"></span></font>&nbsp;&nbsp;<br />
                                                                积分：<font color="blue"><span id="UserLoginedUI_Score"></span></font>&nbsp;&nbsp;<br />
                                                                折扣：<font color="blue"><span id="UserLoginedUI_Discount"></span></font>&nbsp;&nbsp;<br />
                                                                会员角色：<font color="blue"><span id="UserLoginedUI_RoleName"></span></font>&nbsp;&nbsp;<br />
                                                                <b>用户控制面板：</b><a href="/Member/Default.aspx">进入会员中心</a><br>
                                                                <a onclick="var retValue=window.confirm('是否退出');if(retValue){UserLogout();}" href="#">
                                                                    退出登录</a><br>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <script type="text/javascript">
                                                        GetUserLogin();
                                                    </script>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="5">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="202" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="187" height="28" background="images/Shop/left_nav.gif">
                                                    <span id="chen2">&nbsp;&nbsp;<span class="white02"><strong>相关产品</strong></span></span><span
                                                        class="white02">&nbsp;</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top">
                                                    <table width="204" border="0" cellpadding="0" cellspacing="0" class="box3">
                                                        <tr>
                                                            <td height="28">
                                                                <tw:xggoods rows="10" length="32" key="@Key@" modelid="@ModelID@">
            <ItemTemplet>
              <span class="chen02_right"><a href="@StaticURL@" title="@GoodsName@" onmouseout="ClearImg()" onmouseover="onmouseshow(event,document.documentElement,@ID@)">@ShortTitle@</a></span>
                                                                <br />
                                                                <span class="gray01_right">·发布日期：@UpdateTime@</span>
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <td height="5">
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td height="1" background="images/Shop/line.gif">
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td height="5">
                                                                        </td>
                                                                    </tr>
                                                                </table>
            </ItemTemplet>
            <EmptyTemplet>没有产品</EmptyTemplet>
          </tw:xggoods>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="5">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="202" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="187" height="28" background="images/Shop/left_nav.gif">
                                                    <span id="Span1">&nbsp;&nbsp;<span class="white02"><strong>浏览过的商品</strong></span></span><span
                                                        class="white02">&nbsp;</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top">
                                                    <table width="204" border="0" cellpadding="0" cellspacing="0" class="box3">
                                                        <tr>
                                                            <td>
                                                                <asp:Repeater ID="Repeater1" runat="server">
                                                                    <ItemTemplate>
                                                                        <span class="chen02_right"><a href="<%# Eval("StaticURL") %>" onmouseout="ClearImg()"
                                                                            onmouseover="onmouseshow(event,document.documentElement,<%# Eval("ID") %>)">
                                                                            <%# Eval("GoodsName") %></a></span>
                                                                        <br />
                                                                        <span class="gray01_right">·发布日期：<%# Eval("UpdateTime","{0:d}")%></span>
                                                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                            <tr>
                                                                                <td height="5">
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td height="1" background="images/Shop/line.gif">
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td height="5">
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </ItemTemplate>
                                                                </asp:Repeater>
                                                                <%
                                                                    if (Repeater1.Items.Count == 0)
                                                                    {
                                                                %>
                                                                没有数据
                                                                <%
                            
                                                                    } %>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td valign="top">
                            <table width="794" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="794" height="29" background="images/Shop/middle_bg2.gif">
                                        &nbsp;&nbsp;<span class="black02"><strong>{Path}</strong></span>
                                    </td>
                                </tr>
                            </table>
                            <table style="table-layout: fixed; word-break: break-all; word-wrap: break-word"
                                cellspacing="0" cellpadding="3" width="100%" align="center" border="0">
                                <tbody>
                                    <tr>
                                        <td width="53" height="32" align="center" background="images/Shop/demo_53.gif">
                                            <b>
                                                <img src="images/Shop/demo_51.gif" width="30" height="32" /></b>
                                        </td>
                                        <td width="650" align="center" background="images/Shop/demo_53.gif">
                                            <b>@GoodsName@</b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" valign="top">
                                            <table class="TABLEBG" cellspacing="1" cellpadding="1" width="100%" border="0">
                                                <tbody>
                                                    <tr>
                                                        <td width="19%" bgcolor="#ffffff" rowspan="7">
                                                            <table cellspacing="0" cellpadding="0" border="0">
                                                                <tbody>
                                                                    <tr>
                                                                        <td>
                                                                            <table style="border-right: #eeeeee 3px solid; border-top: #eeeeee 3px solid; border-left: #eeeeee 3px solid;
                                                                                border-bottom: #eeeeee 3px solid" height="104" cellspacing="0" cellpadding="0"
                                                                                width="140">
                                                                                <tbody>
                                                                                    <tr>
                                                                                        <td style="border-right: #cccccc 1px solid; padding-right: 4px; border-top: #cccccc 1px solid;
                                                                                            padding-left: 4px; padding-bottom: 4px; border-left: #cccccc 1px solid; padding-top: 4px;
                                                                                            border-bottom: #cccccc 1px solid">
                                                                                            <!--#缩略图-->
                                                                                            <img height="180" src="@PicUrl@" width="240" border="0" onerror="this.src='/Images/NoPic.jpg'"
                                                                                                alt="" />
                                                                                            <div style="float: left; margin-top: 4px; margin-left: 10px;">
                                                                                                <a href="@BigPicUrl@" target="_blank">放大图片</a></div>
                                                                                            <div style="float: right; margin-top: 4px; margin-right: 10px">
                                                                                                <a href="#" onclick="Favorite('@GoodsName@','<%=Request.Url %>');">收藏此信息</a></div>
                                                                                        </td>
                                                                                    </tr>
                                                                                </tbody>
                                                                            </table>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                        <td style="background-color: #ffffff; height: 24px">
                                                            <b>编号：</b><b>@GoodsNum@</b>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: #f8f8f8; height: 24px">
                                                            <b>产品规格：</b>@Standard@
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: #ffffff; height: 24px">
                                                            <b>市场价：</b><%= model.PriceMarket.ToString("C")%>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: #f8f8f8; height: 24px">
                                                            <b>会员价：</b><%= model.PriceMember.ToString("C")%>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: #ffffff; height: 24px">
                                                            <strong>产品包装：</strong>@Packaging@
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: #f8f8f8; height: 24px">
                                                            <strong>发布时间：</strong>@UpdateTime@
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="text-align: center; background-color: #ffffff; height: 24px; vertical-align: middle;">
                                                            <input class="btn" type="button" onclick="Buy(<%=Request["ModelID"] %>,<%=Request["ID"] %>);"
                                                                value="立即购买" />
                                                            <input class="btnl" type="button" onclick="JoinCart(<%=Request["ModelID"] %>,<%=Request["ID"] %>);"
                                                                value="加入购物车" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                            <br />
                                            <div id="tabs">
                                                <ul>
                                                    <li id="current" onclick="return HideAndDisplay(0,this);"><a href="#"><span>简介</span></a></li>
                                                    <li onclick="return HideAndDisplay(3,this);"><a href="#"><span>详细参数</span></a></li>
                                                    <li onclick="return HideAndDisplay(1,this);"><a href="#"><span>图片</span></a></li>
                                                    <li onclick="return HideAndDisplay(2,this);"><a href="#"><span>捆绑销售</span></a></li>
                                                    <li onclick="return HideAndDisplay(4,this);"><a href="#"><span>配件</span></a></li>
                                                </ul>
                                            </div>
                                            <!--内容--->
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Tab0">
                                                <tr>
                                                    <td width="11%" align="center" background="images/Shop/demo_53.gif">
                                                        <img src="images/Shop/demo_57.gif" alt="" width="50" height="32" />
                                                    </td>
                                                    <td width="89%" background="images/Shop/demo_53.gif">
                                                        &nbsp;<strong>简介：</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <span style="font-size: 12px; text-indent: 2em; line-height: 170%; font-family: 宋体">
                                                            &nbsp;<br />
                                                            @Content@ </span>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Tab1">
                                                <tr>
                                                    <td>
                                                        <asp:DataList ID="DL_Imgs" runat="server" RepeatColumns="5" Width="98%" HorizontalAlign="Center">
                                                            <ItemTemplate>
                                                                <div align="center">
                                                                    <a href="<%#Eval("PicUrl") %>" target="_blank">
                                                                        <img alt="" src="<%#Eval("PicUrl") %>" width="111" height="111" /></a>
                                                                </div>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                        <%
                                                            if (DL_Imgs.Items.Count == 0)
                                                            {
                                                        %>
                                                        没有图片
                                                        <%
                            
                                                            } %>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Tab2">
                                                <tr>
                                                    <td>
                                                        <asp:DataList ID="DL_Bundling" runat="server" HorizontalAlign="Center" RepeatColumns="3"
                                                            RepeatDirection="Horizontal" ShowFooter="False" ShowHeader="False" CellSpacing="20"
                                                            CellPadding="1" Width="560px">
                                                            <ItemTemplate>
                                                                <table width="0" border="0" align="center" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td>
                                                                            <div align="center">
                                                                                <a href="<%#Eval("StaticURL") %>" onmouseout="ClearImg()" onmouseover="onmouseshow(event,document.documentElement,<%#Eval("ID") %>)">
                                                                                    <img alt="" src="<%#Eval("PicUrl") %>" width="111" height="111" /></a>
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td height="20" class="black01">
                                                                            产品名称：<%#Eval("GoodsName") %>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            <img src="images/Shop/icon2.gif" width="16" height="16" align="absmiddle" /><span
                                                                                class="black01">&nbsp;原价：<%# Eval("PriceMarket", "{0:c}")%></span><br />
                                                                            <img src="images/Shop/icon3.gif" width="16" height="16" align="absmiddle" /><span
                                                                                class="chen02">&nbsp;特价：<%# Eval("PriceMember", "{0:c}")%></span>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                        <%
                                                            if (DL_Bundling.Items.Count == 0)
                                                            {
                                                        %>
                                                        没有捆绑商品
                                                        <%
                            
                                                            } %>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Tab3">
                                                <tr>
                                                    <td>
                                                        <asp:Table ID="T_CanShu" runat="server" Width="98%" HorizontalAlign="Center" BorderWidth="1px"
                                                            CellPadding="4">
                                                        </asp:Table>
                                                        <%
                                                            if (T_CanShu.Rows.Count == 0)
                                                            {
                                                        %>
                                                        没有具体参数
                                                        <%
                            
                                                            } %>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Tab4">
                                                <tr>
                                                    <td>
                                                        <asp:DataList ID="DL_GoodsParts" runat="server" HorizontalAlign="Center" RepeatColumns="3"
                                                            RepeatDirection="Horizontal" ShowFooter="False" ShowHeader="False" CellSpacing="20"
                                                            CellPadding="1" Width="560px">
                                                            <ItemTemplate>
                                                                <table width="0" border="0" align="center" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td>
                                                                            <div align="center">
                                                                                <a href="<%#Eval("StaticURL") %>" onmouseout="ClearImg()" onmouseover="onmouseshow(event,document.documentElement,<%#Eval("ID") %>)">
                                                                                    <img alt="" src="<%#Eval("PicUrl") %>" width="111" height="111" /></a>
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td height="20" class="black01">
                                                                            产品名称：<%#Eval("GoodsName") %>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            <img src="images/Shop/icon2.gif" width="16" height="16" align="absmiddle" /><span
                                                                                class="black01">&nbsp;原价：<%# Eval("PriceMarket", "{0:c}")%></span><br />
                                                                            <img src="images/Shop/icon3.gif" width="16" height="16" align="absmiddle" /><span
                                                                                class="chen02">&nbsp;特价：<%# Eval("PriceMember", "{0:c}")%></span>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td height="30">
                                                                            <input type="image" src="images/Shop/bt_6.gif" width="99" height="21" onclick="JoinCart(<%=Request["ModelID"] %>,<%#Eval("ID") %>); return false;" />
                                                                            <input type="image" src="images/Shop/bt_7.gif" width="53" height="21" hspace="10"
                                                                                onclick="Favorite('<%#Eval("GoodsName") %>','<%=Request.Url %>'); return false;" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                        <%
                                                            if (DL_GoodsParts.Items.Count == 0)
                                                            {
                                                        %>
                                                        没有配件商品
                                                        <%
                            
                                                            } %>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <br />
                            <table style="width: 100%;">
                                <tr>
                                    <td>
                                        <table width="98%" border="0" align="right">
                                            <tr>
                                                <td width="358" height="30" background="{SysPath}/Images/Evaluating.gif">
                                                    &nbsp;&nbsp;&nbsp;<b><font color="#ffffff">&nbsp; </font>产 品 评 论</b>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table cellspacing="1" cellpadding="2" bgcolor="#cccccc" border="0" width="100%">
                                                        <tr>
                                                            <td width="12%" align="center" bgcolor="#efefef">
                                                                <input name="button" type="button" onclick="CommentUI();" value="发表评论" class="btn" />
                                                            </td>
                                                            <td width="13%" align="center" nowrap="nowrap" bgcolor="#efefef">
                                                                评论人
                                                            </td>
                                                            <td width="55%" align="center" nowrap="nowrap" bgcolor="#efefef">
                                                                <a href="{SysPath}/Comment/CommentList.aspx?ModelID=@ModelID@&ContentID=@GoodsID@">查看评论</a>
                                                            </td>
                                                            <td align="center" bgcolor="#efefef" width="20%">
                                                                发表时间
                                                            </td>
                                                        </tr>
                                                        <tr id="spanComment" bgcolor="white" style="display: none">
                                                            <td colspan="4">
                                                                <input name="ContentID" id="ContentID" type="hidden" value="@GoodsID@" />
                                                                <input name="ModelID" id="ModelID" type="hidden" value="@ModelID@" />
                                                                &nbsp;&nbsp;&nbsp;*笔 名：
                                                                <input title="笔名不能为空！" maxlength="20" name="Name" id="Name" />
                                                                评分：<select id="Score" name="Score">
                                                                    <option value="100">100</option>
                                                                    <option value="80">80</option>
                                                                    <option value="60" selected>60</option>
                                                                    <option value="40">40</option>
                                                                    <option value="20">20</option>
                                                                    <option value="0">0</option>
                                                                </select>
                                                                分
                                                                <br />
                                                                *评论内容：（最多100字。当前字数：<span id="spanCommentContentLength">0</span>）<br />
                                                                <textarea onkeyup="if(event.ctrlKey &amp;&amp; (10 == event.keyCode || 13 == event.keyCode) &amp;&amp; form.onsubmit()) form.submit(); else onchange();"
                                                                    onpropertychange="onchange()" name="Content" id="Content" rows="5" cols="90"
                                                                    onchange="document.getElementById('spanCommentContentLength').innerHTML=value.length;"></textarea>
                                                                <br />
                                                                <br />
                                                                <div align="right">
                                                                    <input name="submit" class="btn" type="button" value="提交！" onclick="PostComment();" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table id="CommentItem" cellspacing="1" cellpadding="2" bgcolor="#cccccc" border="0"
                                                        style="width: 100%;">
                                                        <tw:commentshow rows="10" length="32" modelid="@ModelID@">
            
              <ItemTemplet>
                <tr  bgcolor="#ffffff">
                  <td width="12%" align="right">@Score@分</td>
                  <td width="13%">@Name@</td>
                  <td width="300">@Content@</td>
                  <td align="center" width="20%">@WriteTime@</td>
                </tr>
              </ItemTemplet>
              <EmptyTemplet><tr  bgcolor="#ffffff">
                  <td colspan="4">没有评论</td>
                
                </tr></EmptyTemplet>
            
          </tw:commentshow>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="98%" border="0" align="right">
                                            <tr>
                                                <td width="358" height="30" background="{SysPath}/Images/Evaluating.gif">
                                                    &nbsp;&nbsp;&nbsp;<b><font color="#ffffff">&nbsp; </font>产 品 咨 询</b>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table cellspacing="1" cellpadding="2" bgcolor="#cccccc" border="0" width="100%">
                                                        <tr>
                                                            <td width="12%" align="center" bgcolor="#efefef">
                                                                <input name="button" type="button" onclick="ConsultantUI();" value="发表咨询" class="btn" />
                                                            </td>
                                                            <td width="13%" align="center" nowrap="nowrap" bgcolor="#efefef">
                                                                咨询人
                                                            </td>
                                                            <td width="55%" align="center" nowrap="nowrap" bgcolor="#efefef">
                                                                <a href="{SysPath}/Consultant/ConsultantList.aspx?ModelID=@ModelID@&ContentID=@GoodsID@">
                                                                    查看咨询</a>
                                                            </td>
                                                            <td align="center" bgcolor="#efefef" width="20%">
                                                                发表时间
                                                            </td>
                                                        </tr>
                                                        <tr id="spanConsultant" bgcolor="white" style="display: none">
                                                            <td colspan="4">
                                                                &nbsp;&nbsp;&nbsp;*笔 名：
                                                                <input title="笔名不能为空！" maxlength="20" id="ConsultantName" />
                                                                <br />
                                                                *咨询内容：（最多100字。当前字数：<span id="spanConsultantContentLength">0</span>）<br />
                                                                <textarea onkeyup="if(event.ctrlKey &amp;&amp; (10 == event.keyCode || 13 == event.keyCode) &amp;&amp; form.onsubmit()) form.submit(); else onchange();"
                                                                    onpropertychange="onchange()" id="ConsultantContent" rows="5" cols="90" onchange="document.getElementById('spanConsultantContentLength').innerHTML=value.length;"></textarea>
                                                                <br />
                                                                <br />
                                                                <div align="right">
                                                                    <input name="submit" class="btn" type="button" value="提交！" onclick="PostConsultant();" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table id="ConsultantItem" cellspacing="1" cellpadding="2" bgcolor="#cccccc" border="0"
                                                        style="width: 100%;">
                                                        <tr bgcolor="#ffffff">
                                                            <td>
                                                                <tw:consultantshow rows="10" length="32" modelid="@ModelID@">
            
              <ItemTemplet>
                 
               
               <table width="768" border="0" cellspacing="4">
  <tr>
    <td width="86" align="right">网友：</td>
    <td width="503">@UserName@&nbsp;</td>
    <td width="157" align="right"></td>
  </tr>
  <tr>
    <td align="right">咨询内容：</td>
    <td colspan="2">@Content@</td>
  </tr>
  <tr>
    <td align="right">回复：</td>
    <td colspan="2">@ReplyContent@</td>
  </tr>
</table>
              </ItemTemplet>
              <EmptyTemplet> 
                  没有咨询 
                </EmptyTemplet>
            
          </tw:consultantshow>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <!--#include file="../Footer.aspx"-->
            </td>
        </tr>
    </table>
    <script language="javascript" type="text/javascript">
      //Ajax显示购物车界面
                ShowShopingCart(<%=Request["ModelID"] %>);
    </script>
    <div id="showLayers" style="display: none">
        <div id="ShowContentTitle">
            图标标题..</div>
        <img id="ShowContentImg" src="images/Shop/Ajax_Loading.gif" border="0" alt="读取中" />
        <div id="ShowConfig">
            配置信息：</div>
    </div>
    </form>
</body>
</html>
