<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_Account, WebApp_deploy" title="预付款管理" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
    ////////----------------    begin 页面中所有的js非空认证的代码请写在这里，方便以后的维护  --------------//////
        //判断充值卡和充值卡密码是否为空
        function CheckCarNumAndPwd() {
            if (document.getElementById('<%=TxtCardNum.ClientID %>').value == '') {
                alert('请输入充值卡卡号！');
                return false;
            }
            if (document.getElementById('<%=TextCardPassword.ClientID %>').value == '') {
                alert('请输入充值卡密码！');
                return false;
            }
            return true;
        }
        function CheckMoney() {
            var money = document.getElementById('<%=TxtMoney.ClientID %>').value;
            if ( money != '') {
                location.href = 'AddAccount.aspx?money=' + money;
             }
            else { alert('充值金额不能为空！'); } 
            return false;
         }
        //判断输入的兑换总额是否为空
        function CheckEpCount() {
            if (document.getElementById('<%=txtEpCount.ClientID %>').value == '') {
                alert('请输入兑换总额！');
                return false;
            }
            return true;
        }
     ////////----------------    end 页面中所有的js非空认证（请写在这里，方便以后的维护） --------------//////
</script>
 <div class="pageTitle"><font color="red">您的商城帐户余额：￥<asp:Literal ID="UserBalance" runat="server" />
    &nbsp;&nbsp;&nbsp;</font>冻结资金：￥<asp:Literal ID="LiteralFreezeMoney" runat="server" />
 <asp:PlaceHolder ID="UserActiveBalancePanel" runat="server" Visible="false">（流动资金：￥<asp:Literal ID="UserActiveBalance" runat="server" />）</asp:PlaceHolder></div>
 <br />
 
 <table class="SearchTableStyle">
         <tr>  
            <td colspan="4"><b>1、充值卡充值</b></td>
          </tr>
          <tr>
            <th width="150px">充值卡卡号：</th><td><asp:TextBox ID="TxtCardNum" Width="200px" MaxLength="50" Height="16px" runat="server"/></td>
            <th>充值卡密码：</th><td><asp:TextBox ID="TextCardPassword" Width="200px" Height="16px" MaxLength="50" runat="server" />
             <asp:Label ID="Lablefterro" runat="server"/>
             <asp:Button ID="Button1" OnClientClick="return CheckCarNumAndPwd()" runat="server" Text="提 交" OnClick="Button1_Click" />
             </td>
          </tr>
          <tr>
             <td colspan="4"><b>2、在线自助充值</b></td>
          </tr>
          <tr>
            <th>充值金额：</th>
            <td colspan="3"><asp:TextBox ID="TxtMoney" Width="80px" MaxLength="20" runat="server" /> 元
                <asp:Button ID="button3" runat="server"  OnClientClick="return CheckMoney()" Text="立即充值" />
                <input id="Button4" type="button" onclick="javascript:{location.href='PayOneline.aspx';return false;}" value="充值记录" />
            </td>
         </tr>
         <tr><td colspan="4"><b>3、积分兑换</b></td></tr>
         <tr>
            <th>当前总积分：</th><td><asp:Literal ID="txtAllEp" runat="server" />积分&nbsp; <b>(比率：<asp:Literal ID="txtTransparent" runat="server" />:1商城币)</b></td>
            <th>兑换总额：</th>
            <td><asp:TextBox ID="txtEpCount" runat="server" />
            <asp:Button ID="btTransparent" runat="server" OnClientClick="return CheckEpCount()" OnClick="Transparent_Click" Text="提交" /></td>
         </tr>
 </table>     
 
 <br />
 <table class="SearchTableStyle">
         <tr>
         <td style="width: 200px; padding-left:20px;">类型：<asp:DropDownList ID="DropType" OnSelectedIndexChanged="DropType_Onchange" runat="server" AutoPostBack="true" >
         <asp:ListItem Value="" Text="全部"/>
         <asp:ListItem  Value="0" Text="支出" />
         <asp:ListItem Value="1" Text="收入" />
         <asp:ListItem  Value="-1" Text="退款" />
         </asp:DropDownList>
         </td>
         <td>开始日期：<asp:TextBox runat="server"  ID="begindate" Width="75px" Height="16px" AutoPostBack="True" /></td>
         <td>结束日期：
         <asp:TextBox runat="server"  ID="EndDate" Width="75px" Height="16px" AutoPostBack="True" />
             <asp:Button ID="sb" runat="server" Text="查 询" OnClick="Search_OnClick" />
         </td>
     </tr>
 </table> 
 <br />

        <asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" AllowPaging="True" PageSize="15" CssClass="tableHead">
            <Columns>
                <asp:BoundField ReadOnly="True" DataField="ID" HeaderText="编号" ItemStyle-Width="50px"></asp:BoundField>
                <asp:BoundField DataField="CreateTime" HeaderText="发生日期" ItemStyle-Width="150px"></asp:BoundField>
                <asp:TemplateField HeaderText="类型" ItemStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label ID="cType" runat="server" Text='<%#(Eval("cType").ToString()=="1")?"收入":((Eval("cType").ToString()=="-1")?"退款":"支出") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="cMoney" HeaderText="发生额" ItemStyle-Width="100px"></asp:BoundField>
                <asp:BoundField DataField="uBalance" HeaderText="帐户余额" ItemStyle-Width="100px"></asp:BoundField>
                <asp:BoundField ReadOnly="True" DataField="Remark" HeaderText="备注">
                </asp:BoundField>
            </Columns>
                    <EmptyDataTemplate >
                    
                    <table class="tableHearder" style="width:98%"><tr><th>编号</th><th>发生日期</th><th>类型</th><th>发生额</th><th>帐户余额</th><th>备注</th></tr>
                    <tr><td colspan="6">没有符合查询条件的记录</td></tr>
                    </table>                                 
                    </EmptyDataTemplate>
        </asp:GridView> 

</asp:Content>

