<%@ page title="" language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_myRate, WebApp_deploy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <style type="text/css">
        .tableHead
        {
            width: 98%;
            border: solid 1px #FF962D;
            margin: 5px auto;
            padding: 0;
            text-align: center;
            line-height: 20px;
        }
        .tableHead td
        {
            padding: 5px 0;
            word-break: break-all;
            word-wrap: break-word;
            border-top: solid 1px #FF962D;
            text-align: center;
        }
        
        /*--用户管理中心表头样式*/
        .tableHead th
        {
            background: #fff4f3;
            text-align: center;
            margin: 3px;
            color: #3C3C3C;
            border: solid 1px #FF962D;
            line-height: 20px;
        }
    </style>
    <link href="CSS/rc_show_v2.css" rel="stylesheet" type="text/css" />
    <link href="CSS/tbsp.css" rel="stylesheet" type="text/css" />
    <script src="../Js/StorePublic/f_Credit.js" type="text/javascript"></script>
    <script src="../Js/f_function.js" type="text/javascript"></script>
    <script type="text/javascript">
    </script>
    <div id="new-rate-content" style="text-align: left; margin-top: 15px; margin-left: 10px">
        <div class="clearfix personal-info">
            <div class="skin-gray">
                <div class="box">
                    <span class="rc-tp"><span></span></span>
                    <div class="hd">
                        <h4>
                            个人信息</h4>
                    </div>
                    <div class="bd">
                        <dl class="clearfix">
                            <dt>会员名：</dt>
                            <dd>
                                <a href="#">
                                    <%=UserName%></a>
                            </dd>
                            <dd>
                            </dd>
                            <dt>站内信：</dt>
                            <dd>
                                <a href="#">发送信件</a>
                            </dd>
                            <dt>地址：</dt>
                            <dd>
                                <%=StrAddress %>
                            </dd>
                            <dt class="title">认证信息：</dt>
                            <dd>
                            </dd>
                        </dl>
                    </div>
                </div>
            </div>
            <div class="personal-rating">
                <table>
                    <tr>
                        <td>
                            <h4 class="buyer" style="text-align: left">
                                买家累积信用： <a href="#">
                                    <script type="text/javascript">displayStar(<%=CountBuyCredit %>);</script>
                                </a>
                            </h4>
                            <p class="rate-summary">
                                好评率：<strong><%=GoodRate %>%</strong></p>
                            <table class="buyer-rate-info">
                                <colgroup>
                                    <col width="60" />
                                    <col width="50" />
                                    <col width="50" />
                                    <col width="50" />
                                    <col width="50" />
                                    <col width="50" />
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>
                                            &nbsp;
                                        </th>
                                        <th>
                                            最近1周
                                        </th>
                                        <th>
                                            最近1个月
                                        </th>
                                        <th>
                                            最近6个月
                                        </th>
                                        <th>
                                            6个月前
                                        </th>
                                        <th>
                                            总计
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <img src="../Images/CreditImage/rate-ok.gif" />好评
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=WeekGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=MouthGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SixMGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=PreSixMGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=XTotalGoodRate %></a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <img src="../Images/CreditImage/rate-normal.gif" />
                                            中评
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=WeekNormalRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=MouthNormalRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SixMNormalRate %></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=PreSixMNormalRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <%=XTotalNormalRate %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <img src="../Images/CreditImage/rate-bad.gif" />
                                            差评
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=WeekBadRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=MouthBadRate %></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SixMBadRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=PreSixMBadRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <%=XTotalBadRate %>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h4 class="buyer" style="text-align: left">
                                卖家累积信用： <a href="#">
                                    <script type="text/javascript">displayStar(<%=CountSalerCredit %>);</script>
                                </a>
                            </h4>
                            <p class="rate-summary">
                                好评率：<strong><%=SGoodRate %>%</strong></p>
                            <table class="buyer-rate-info">
                                <colgroup>
                                    <col width="60" />
                                    <col width="50" />
                                    <col width="50" />
                                    <col width="50" />
                                    <col width="50" />
                                    <col width="50" />
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>
                                            &nbsp;
                                        </th>
                                        <th>
                                            最近1周
                                        </th>
                                        <th>
                                            最近1个月
                                        </th>
                                        <th>
                                            最近6个月
                                        </th>
                                        <th>
                                            6个月前
                                        </th>
                                        <th>
                                            总计
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <img src="../Images/CreditImage/rate-ok.gif" />好评
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SWeekGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SMouthGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SSixMGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SPreSixMGoodRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SXTotalGoodRate %></a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <img src="../Images/CreditImage/rate-normal.gif" />
                                            中评
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SWeekNormalRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SMouthNormalRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SSixMNormalRate %></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SPreSixMNormalRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <%=SXTotalNormalRate %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <img src="../Images/CreditImage/rate-bad.gif" />
                                            差评
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SWeekBadRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SMouthBadRate %></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SSixMBadRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <a href="#">
                                                <%=SPreSixMBadRate%></a>
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <%=SXTotalBadRate %>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="">
            <ul class="rate-tab rate-tab-orange clearfix">
                <li id="BuyComment"><a onclick="ChangeComment('BuyC','Shop_myRate.aspx?')"><span>来自买家的评价</span></a></li>
                <li id="SalerComment" class="selected"><a onclick="ChangeComment('SalerC','Shop_myRate.aspx?')">
                    <span>来自卖家的评价</span></a></li>
                <li id="OtherComment"><a onclick="ChangeComment('OtherC','Shop_myRate.aspx?')"><span>
                    给他人的评价</span></a></li>
            </ul>
            <table class='show-rate-table'>
                <colgroup>
                    <col width='50' />
                    <col width='200' />
                    <col width='150' />
                    <col width='150' />
                    <col width='100' />
                </colgroup>
                <thead>
                    <tr>
                        <th class='rate'>
                            <select id="selectRateID" onchange="ChangeRate(this.value,'Shop_myRate.aspx?')">
                                <option selected='selected' value='0'>评价</option>
                                <option value='1'>好评</option>
                                <option value='2'>中评</option>
                                <option value='3'>差评</option>
                            </select>
                        </th>
                        <th class='comment'>
                            <select id="selectCommentID" onchange="ChangeCommentValue(this.value,'Shop_myRate.aspx?')">
                                <option selected='selected' value='-1'>评论</option>
                                <option value='1'>有评论内容</option>
                                <option value='0'>无评论内容</option>
                            </select>
                        </th>
                        <th class='ratee'>
                            &nbsp;
                        </th>
                        <th class='things'>
                            &nbsp;
                        </th>
                        <th class='operate'>
                            &nbsp;
                        </th>
                    </tr>
                </thead>
            </table>
            <asp:GridView ID="gvList" runat="server" CssClass="tableHead" AutoGenerateColumns="False">
                <Columns>
                    <asp:TemplateField HeaderText="评价">
                        <ItemTemplate>
                            <%#Levelrate(Eval("CreditScore").ToString())%>
                        </ItemTemplate>
                        <HeaderStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="评论内容" DataField="Comment">
                        <HeaderStyle Width="46%" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="评价人" DataField="ValuerName">
                        <HeaderStyle Width="16%" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="宝贝信息" DataField="ProductName">
                        <HeaderStyle Width="20%" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                        <asp:HiddenField ID="hfCreditScore" runat="server" Value='<%#Eval("CreditScore") %>' />
                            <asp:LinkButton ID="lbtDel" runat="server" OnClientClick="return confirm('确定删除吗？')"
                                Text="删除" OnCommand="Button_Command" CommandArgument='<%# Eval("CreditID") %>'
                                CommandName="delInfo"></asp:LinkButton>
                            <asp:LinkButton ID="lbtUpdateGood" runat="server" OnClientClick="return confirm('是否修改成好评？')"
                                Text="修改" OnCommand="Button_Command" CommandArgument='<%# Eval("CreditID") %>'
                                CommandName="upInfo"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle Width="8%" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataRowStyle HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    <table class="tableHeader" style="width: 100%">
                        <tr>
                            <th style="width: 10%;">
                                评价
                            </th>
                            <th style="width: 48%;">
                                评论内容
                            </th>
                            <th style="width: 16%;">
                                评价人
                            </th>
                            <th style="width: 20%;">
                                宝贝信息
                            </th>
                        </tr>
                        <tr>
                            <td colspan="4">
                                没有符合查询条件的记录！
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
    </div>
    <script type="text/javascript">
        var getRate = "0";
        var getComment = "-1";
        var BuyComment = document.getElementById("BuyComment");
        var SalerComment = document.getElementById("SalerComment");
        var OtherComment = document.getElementById("OtherComment");

        var selectRateID = document.getElementById("selectRateID");
        var selectCommentID = document.getElementById("selectCommentID");
        var getWhorate = "SalerRate";
        if (request("WhoRate") != null) {
            getWhorate = request("WhoRate");
        }

        switch (getWhorate) {
            case "BuyerRate":
                BuyComment.className = "selected";
                SalerComment.className = "";
                OtherComment.className = "";
                break;
            case "SalerRate":
                BuyComment.className = "";
                SalerComment.className = "selected";
                OtherComment.className = "";
                break;
            case "OtherRate":
                BuyComment.className = "";
                SalerComment.className = "";
                OtherComment.className = "selected";
                break;
        }

        if (request("RateType") != null) {
            getRate = request("RateType");
        }

        switch (getRate) {
            case "0":
                selectRateID.selectedIndex = 0;
                break;
            case "1":
                selectRateID.selectedIndex = 1;
                break;
            case "2":
                selectRateID.selectedIndex = 2;
                break;
            case "3":
                selectRateID.selectedIndex = 3;
                break;
        }

        if (request("CommentRate") != null) {
            getComment = request("CommentRate");
        }

        switch (getComment) {
            case "-1":
                selectCommentID.selectedIndex = 0;
                break;
            case "1":
                selectCommentID.selectedIndex = 1;
                break;
            case "0":
                selectCommentID.selectedIndex = 2;
                break;
        }
    </script>
</asp:Content>
