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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
 <div class="pageTitle"><font color=red>您的商城帐户余额：￥<asp:Literal ID="UserBalance" runat="server" /></font><asp:PlaceHolder ID="UserActiveBalancePanel" runat="server" Visible="false">（流动资金：￥<asp:Literal ID="UserActiveBalance" runat="server" />）</asp:PlaceHolder></div>
 <br />
 
<script language="javascript" type="text/javascript">
function refreshCode(){
    document.getElementById("ImgCheckCode").innerHTML = "";
    document.getElementById("ImgCheckCode").innerHTML="<img src='/CheckCode.aspx' />";
}
</script>
 
 <table class="SearchTableStyle">
         <tr>  
            <td colspan="2" style="width:50%;"><b>1、充值卡充值</b></td>
            <td colspan="2" style="width:50%;"><b>2、在线自助充值</b></td>
          </tr>
          <tr>
            <th style="width: 150px;">充值卡卡号：</th>
            <td style="width: 300px;"><asp:TextBox ID="TxtCardNum" Width="200px" MaxLength="50"  runat="server"/></td>
            <th style="width: 150px;">充值金额：</th>
            <td style="width: 300px;"><asp:TextBox ID="TxtMoney" Width="80px" MaxLength="20" runat="server" /> 元</td>
          </tr>
          <tr>
            <th style="width: 150px;">充值卡密码：</th>
            <td style="width: 300px;"><asp:TextBox ID="TextCardPassword" Width="200px" MaxLength="50" runat="server" /></td>
            <th style="width: 150px;">&nbsp;</th>
            <td style="width: 300px;"><asp:Button ID="button3" runat="server"  OnClientClick="javascript:{if(document.getElementById('ctl00_ContentPlaceHolder1_TxtMoney').value!='')location.href='AddAccount.aspx?money='+document.getElementById('ctl00_ContentPlaceHolder1_TxtMoney').value;return false;}" Text="立即充值" />
                <asp:Button ID="Button2" runat="server" Text="充值记录" OnClientClick="javascript:{location.href='PayOneline.aspx';return false;}" />
            </td>
          </tr>
          <tr>
            <th style="width: 150px;">验证码：</th>
            <td style="width: 300px;">
                <asp:TextBox ID="CheckCode" Width="80" onclick="return refreshCode()" MaxLength="5" runat="server" /> 
                <div id="ImgCheckCode" style="display:inline;"></div>&nbsp;</td>
            <th style="width: 150px;">&nbsp;</th>
            <td style="width: 300px;">&nbsp;</td>
          </tr>
          <tr>
            <th style="width: 150px;">&nbsp;</th>
            <td style="width: 300px;"><asp:Button ID="Button1" runat="server" Text="提 交" OnClick="Button1_Click" /><asp:Label ID="Lablefterro" runat="server"/></td>
            <th style="width: 150px;">&nbsp;</th>
            <td style="width: 300px;">&nbsp;</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="150px" /></td>
         <td>结束日期：
         <asp:TextBox runat="server"  ID="EndDate" Width="150px"  />
             <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>

