<%@ page language="C#" masterpagefile="~/member/MemberMasterPage.master" autoeventwireup="true" inherits="V5Shop.NewMember.User_UserScore_Manage, V5Shop.Member" title="我的积分" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <script type="text/javascript" language="javascript">
    //积分对换值变更时
    function txtScore_OnChange(v, intLock)
    {
        var thisText = document.getElementById(v);
//        alert(thisText);
        //var thisValue = GetObject(v + "_hid01");
        var thisPrecent = document.getElementById('<%=lblUseSorcePrecent.ClientID%>').innerText;
        var thisCanUseScore = document.getElementById('<%=lblCanUseScore.ClientID%>').innerText;
        var thisPrice = document.getElementById('txtPrice');

        var newPrice = 0.0;
        
        if(thisText.value * 1 > thisCanUseScore * 1)
        {
            thisPrice.value = "";
            alert("对不起， 您可用积分不足!");
            thisText.value = 0;
//            thisValue.value = 0;
            thisPrice.value = "";

            return false;
        }
        else
        {
            newPrice = thisText.value / thisPrecent;
//            alert(String(newPrice));
            if(String(newPrice)!="NaN")
            {
            newPrice = parseInt(newPrice * 100, 0)/100;
            thisPrice.value = newPrice;
            }
        }
        return true;
    }
    </script>
  <div style="float:left; width:759px">
    <div><img src="images/list/top-1.gif" /></div>
	<div style="border-right:1px #C5DCE7 solid; width:753px;height:675px; padding:3px">
	  <div style="background:url(images/list/a-1.gif); width:738px; height:30px; line-height:30px">
	    <div style="float:left; font-weight:bold; color:#014D7F; font-size:14px; padding-left:10px">我的积分</div>
		<div style="float:right; padding-right:10px"><font color="#ff0000">*</font>表示该项必填</div>
	  </div>
	  <div class="account">
      
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="320">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="49%">您的积分：</td>
    <td width="51%"> <asp:Label ID="lblScore" runat="server" ></asp:Label> </td>
  </tr>
  <tr>
    <td width="49%">已冻结积分：</td>
    <td width="51%"> <asp:Label ID="lblFrozenScore" runat="server" ></asp:Label> </td>
  </tr>
  <tr>
    <td width="49%">可使用积分：</td>
    <td width="51%"> <asp:Label ID="lblCanUseScore" runat="server" ></asp:Label> </td>
  </tr>
    <tr>
        <td width="49%">
            积分转换比例：</td>
        <td width="51%">
            <asp:Label ID="lblUseSorcePrecent" runat="server" Text="0"></asp:Label>
            <asp:Label ID="Label12" runat="server">点积分兑换1元人民币。</asp:Label></td>
    </tr>
  <tr>
    <td colspan="2" align="center"><a href="User_UserScoreLog_View.aspx">查看积分兑换记录</a></td>
  </tr>
</table>
    
    </td>
    <td>
    <table id="changeArea" runat="server">
        <tr>
            <td align="right" bgcolor="#fafafa" style="height: 30px">
                <asp:Label ID="Label1" runat="server" Font-Bold="True">积分兑换区</asp:Label></td>
            <td align="left" bgcolor="#fafafa" style="vertical-align: middle; height: 30px; text-align: left">
            </td>
        </tr>
    
      <tr>
                    <td align="right" bgcolor="#FAFAFA" style="height: 30px">
                        <asp:Label ID="Label7" runat="server">请输入要转换的积分数值：</asp:Label></td>
                    <td align="left" bgcolor="#FAFAFA" style="vertical-align: middle; height: 30px; text-align: left">
                        &nbsp;
                      <%--  <cc1:NumberBox ID="txtScore" runat="server"  Width="60px" />--%>
                        <asp:TextBox ID="txtScore" runat="server" Width="60px" ></asp:TextBox>      <asp:RegularExpressionValidator ID="RegularExpressionValidator14" runat="server"
                                            ControlToValidate="txtScore" Display="Dynamic" ErrorMessage="只能为数字,不大于9位"
                                            ValidationExpression="^[\d]{0,9}([\.]+\d+){0,9}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px">
                        <asp:Label ID="Label8" runat="server">兑换后的预存款为：</asp:Label></td>
                    <td align="left" bgcolor="#FFFFFF" style="vertical-align: middle; height: 30px; text-align: left">
                        &nbsp;&nbsp;<input id="txtPrice" type="text" readonly="readOnly" class="input2" style="width: 60px" />
                        <asp:Button ID="btnChange" runat="server" Text="我要兑换" CssClass="input_bg2"  OnClick="btnChange_Click" /></td>
                </tr>
    
    </table>

    
    </td>
  </tr>
</table>

	  </div>
      
      <div style="background:url(images/list/a-1.gif); width:739px; height:30px; line-height:30px">
	    <div style="float:left; font-weight:bold; color:#014D7F; font-size:14px; padding-left:10px">积分兑换专区</div>
	  </div>
      
       <div class="center_5">
	  <ul>
 <asp:Repeater ID="RpLike" runat="server">
	    
        <ItemTemplate>
    
     
      <li > <a href="../product.aspx?id=<%#Eval("ID")%>" style="color:White;border-color:White" target="_blank"><img src='../<%#Eval("SrcDetail")%>'  alt="" height=115;width=115 border="0" /></a><br /><a href="../product.aspx?id=<%#Eval("ID")%>" target="_blank"><span><%#V5Shop.Common.utils.left(Convert.ToString(Eval("Name")),9)%></span> </a><br />商城价：<b>￥<%#Eval("MarketPrice")%></b></li>
        </ItemTemplate>
        </asp:Repeater>
	    
	  </ul>
	<div class="clear"></div></div>
      
	</div>
	<div><img src="images/list/bottom-1.gif" /></div>
  </div>
  
  
    <asp:Label ID="lblCardLock" runat="server" Text="会员卡已被锁定，无法进行兑换操作！" Visible="false" ></asp:Label>
      <asp:Label ID="lblScore0" runat="server" Text="输入积分的必须大于0的！" Visible="false" ></asp:Label>
        <asp:Label ID="lblNotEnough" runat="server" Text="对不起， 您可用积分不足!" Visible="false" ></asp:Label>
          <asp:Label ID="lblConvert" runat="server" Text="转换的积分必须是" Visible="false" ></asp:Label>
            <asp:Label ID="lblDouble" runat="server" Text="的整数倍。" Visible="false" ></asp:Label>
              
</asp:Content>

