<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopPaymentType, WebApp_deploy" title="付款方式管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <table class="adminheading">
     <tr>
        <th valign="middle" class="inbox"  align="left">付款方式管理</th>                  
        <td align="right"></td> 
         <td class="rtdw"></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"/></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 Value="-1">所有</asp:ListItem>
            </asp:DropDownList>&nbsp;
            <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetUserLikeUserName"
                TypeName="HoWave.Web.UserBll" OldValuesParameterFormatString="original_{0}">
                <SelectParameters>
                    <asp:ControlParameter ControlID="TextBox1" Name="UserName" PropertyName="Text" Type="String" />
                    <asp:Parameter Name="m_page" Type="Int32" DefaultValue="1" />
                    <asp:Parameter Name="pagesize" Type="Int32" DefaultValue="10" />
                </SelectParameters>
            </asp:ObjectDataSource></td></tr>
        </table><br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
        OnDataBound="GridView1_DataBound" DataKeyNames="TypeID" OnRowDataBound="GridView1_RowDataBound" AllowPaging="true" PageSize="15" CssClass="adminlist"　>
        <Columns>
            <asp:BoundField DataField="Typeid" HeaderText="编号" ReadOnly="True" />
            <asp:BoundField DataField="TypeName" HeaderText="名称" />
            <asp:BoundField DataField="DisCount" HeaderText="折扣" />
            <asp:CheckBoxField DataField="isdisabled" HeaderText="禁用" Text="是" />
            <asp:CheckBoxField DataField="isdefault" HeaderText="默认" Text="是" ReadOnly="True" />
            <asp:BoundField HeaderText="描述" DataField="Intro" ReadOnly="True" >
                <ItemStyle Width="40%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="删除">
                <ItemTemplate>
                     <asp:LinkButton ID="cl" CommandArgument='<%# Eval("TypeID") %>' CommandName='<%# Eval("UserID") %>' OnCommand="DeleteType_Button" OnClientClick="if(confirm('确定删除吗？'))return true;return false;" runat="server" Text="删除" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
                <tr>
                    <th>编号</th>
                    <th>名称</th>
                    <th>折扣</th>
                    <th>禁用</th>
                    <th>默认</th>
                    <th>描述</th>
                    <th>删除</th>
                </tr>
                <tr><td colspan="7">暂无信息！</td></tr>
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetPayTypeByUserIDTypeIDStatus"
        TypeName="HoWave.Web.Shop_PayType" UpdateMethod="SetPayTypeAsDefault" OldValuesParameterFormatString="{0}" DeleteMethod="DeleteType">
        <UpdateParameters>
            <asp:Parameter Name="TypeID" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList1" DefaultValue="-1" Name="UserID" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:Parameter DefaultValue="-1" Name="Typeid" Type="Int32" />
            <asp:Parameter DefaultValue="-1" Name="Status" Type="Int32" />
        </SelectParameters>
        <%--<DeleteParameters>
            <asp:Parameter Name="TypeID" Type="Int32" />
        </DeleteParameters>--%>
    </asp:ObjectDataSource>
    &nbsp; &nbsp;
</asp:Content>

