<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopBank, HoWaveVGO" title="银行帐户管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table width="100%" class="adminheading">
        <tr>
            <th valign="middle" class="frontpage" align="left">
                银行帐户管理
            </th>
            <td align="right">
              </td>
          
        </tr>
    </table>

  <table class="nick"><tr><td colspan="4" class="tit">快速查找</td></tr>
    <tr><td class="ltd">卖家：</td><td class="rtd" style="width:35%"><asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True"></asp:TextBox></td>
        <td class="ltd">卖家列表：</td><td class="rtd" style="width:35%"><asp:DropDownList
                    ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2"
                    DataTextField="username" DataValueField="userid" AppendDataBoundItems="True">
                    <asp:ListItem Selected="True" Value="-1">所有</asp:ListItem>
                </asp:DropDownList></td></tr>
        </table> <br />       
        <asp:GridView AllowPaging="true"   PageSize="15" ID="GridView1" runat="server" 
          AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="BankID" CssClass="adminlist">
            <Columns>
                <asp:BoundField DataField="BankID" HeaderText="编号" >
                    <HeaderStyle Width="10%" />
                </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="Accounts" HeaderText="银行帐号" >
                    <HeaderStyle Width="11%" />
                </asp:BoundField>
                <asp:BoundField DataField="CardNum" HeaderText="卡号" >
                    <HeaderStyle Width="5%" />
                </asp:BoundField>
                <asp:BoundField DataField="BankIntro" HeaderText="备注" >
                    <HeaderStyle Width="15%" />
                </asp:BoundField>
                <asp:CheckBoxField DataField="IsDisabled" HeaderText="禁用" >
                    <HeaderStyle Width="10%" />
                </asp:CheckBoxField>
                <asp:CheckBoxField DataField="IsDefault" HeaderText="是否默认" >
                    <HeaderStyle Width="11%" />
                </asp:CheckBoxField>
                <asp:TemplateField HeaderText="删除" >
                   <ItemTemplate>
                       <asp:LinkButton ID="cl" Text="删除" runat="server" OnClientClick="if(confirm('确定删除吗？'))return true;return false;" CommandName="Delete" />
                   </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                    <tr>
                        <th>编号</th>
                        <th>帐户名称</th>
                        <th>银行名称</th>
                        <th>银行帐号</th>
                        <th>卡号</th>
                        <th>备注</th>
                        <th>禁用</th>
                        <th>是否默认</th>
                        <th>删除</th>                        
                    </tr>
                    <tr><td colspan="9">暂无信息！</td></tr>
        
        </EmptyDataTemplate>
        </asp:GridView>
  
 
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetUserLikeUserName"
                    TypeName="UserBLL">
    <SelectParameters>
        <asp:ControlParameter ControlID="TextBox1" Name="UserName" PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
       
 <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetBankByUserID"
                    TypeName="Shop_Bank" UpdateMethod="GetBankByUserID" OldValuesParameterFormatString="{0}" DeleteMethod="DeleteBank">
        <UpdateParameters>
            <asp:Parameter Name="UserID" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList1" DefaultValue="-1" Name="UserID" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="BankID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>        
</asp:Content>

