<%@ page language="C#" masterpagefile="../ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_Bank, HoWaveVGO" title="银行帐户管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pageTitle">银行帐户管理</div>
<asp:Panel ID="Panel2" runat="server">
<br />
    <table class="SearchTableStyle">   
        <tr>
            <td><asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="新增加银行帐户信息" CausesValidation="False" Width="145px" /></td>
        </tr>
    </table>
<br />
</asp:Panel>
     <asp:GridView ID="GridView1"   runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" DataKeyNames="BankID" 
     CssClass="tableHead" OnRowDataBound="GridView1_RowDataBound">
     <Columns>
            <asp:BoundField DataField="BankID" HeaderText="编号" >
                <HeaderStyle Width="5%" />
            </asp:BoundField>
            <asp:BoundField DataField="BankShortName" HeaderText="帐户名称" >
                <HeaderStyle Width="11%" />
            </asp:BoundField>
            <asp:BoundField DataField="BankName" HeaderText="银行名称" >
                <HeaderStyle Width="11%" />
            </asp:BoundField>          
            <asp:BoundField DataField="BankIntro" HeaderText="备注" >
                <HeaderStyle Width="15%" />
            </asp:BoundField>
            <asp:CheckBoxField DataField="IsDisabled" HeaderText="禁用" >
                <HeaderStyle Width="5%" />
            </asp:CheckBoxField>
            <asp:CheckBoxField DataField="IsDefault" HeaderText="默认" >
                <HeaderStyle Width="5%" />
            </asp:CheckBoxField>
            <asp:HyperLinkField DataNavigateUrlFields="Bankid" DataNavigateUrlFormatString="?Bankid={0}&amp;tag=update"
                HeaderText="修改" Text="修改" >
                <HeaderStyle Width="7%" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="BankID" DataNavigateUrlFormatString="?Bankid={0}&amp;tag=setdefault"
                HeaderText="设为默认" Text="设为默认" >
                <HeaderStyle Width="10%" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFormatString="?Bankid={0}&amp;tag=setdisabled"
                HeaderText="禁启" Text="禁启" DataNavigateUrlFields="BankID" >
                <HeaderStyle Width="5%" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="BankID" DataNavigateUrlFormatString="?Bankid={0}&amp;tag=delete"
                HeaderText="删除" Text="删除" >
                <HeaderStyle Width="10%" />
            </asp:HyperLinkField>
        </Columns>
         <EmptyDataTemplate >                   
              <div style="padding:10px;">没有符合查询条件的记录！</div>                       
            </EmptyDataTemplate>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetBankByUserID"
        TypeName="Shop_Bank" UpdateMethod="GetBankByUserID">
        <UpdateParameters>
            <asp:Parameter Name="UserID" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="UserID" SessionField="Howave_UserID"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    <asp:Panel ID="Panel1" runat="server" Visible="false">
            <table class="ShopOrderStyle">
            <caption>银行帐户信息</caption>
                <tr>
                    <td class="OrderTitle">帐户名称：</td>
                    <td>
                        <asp:TextBox ID="BankShortName" runat="server" Height="16px"/>
                        <asp:RequiredFieldValidator ID="Rq2" runat="server" ControlToValidate="BankShortName" ErrorMessa="不能空"/></td>
                </tr>
                <tr>
                    <td class="OrderTitle">开户行：</td>
                    <td><asp:TextBox ID="BankName" runat="server" Height="16px"/>
                        <asp:RequiredFieldValidator ID="Rq1" runat="server" ControlToValidate="BankName" ErrorMessage="不能空"/></td>
                </tr>
                <tr>
                    <td class="OrderTitle">户名：</td>
                    <td><asp:TextBox ID="HolderName" runat="server" Height="16px"/>
                        <asp:RequiredFieldValidator ID="Rq3" runat="server" ControlToValidate="HolderName"
                            ErrorMessage="不能空"/></td>
                </tr>
                <tr>
                    <td class="OrderTitle">帐号：</td>
                   <td><asp:TextBox ID="Accounts" runat="server" Height="16px"/></td>
                </tr>
                <tr>
                    <td class="OrderTitle">卡号：</td>
                   <td><asp:TextBox ID="CardNum" runat="server" Height="16px"/></td>
                </tr>
                <tr>
                    <td class="OrderTitle">帐户说明：</td>
                    <td><asp:TextBox ID="Remark" runat="server" TextMode="MultiLine" /></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:CheckBox ID="CheckBox1" runat="server" Text="设为默认银行帐户" /></td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align:center">               
                        <asp:Button ID="ButAdd" runat="server" Text="增加银行帐户" OnClick="Button3_Click" />
                        <asp:Button ID="ButSave" runat="server" Text="更新银行帐户" OnClick="ButSave_Click" />
                        <asp:Button ID="ButClose" runat="server" Text="关闭" Width="104px" OnClick="ButClose_Click" CausesValidation="False" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
</asp:Content>

