<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_HowavePayType, HoWaveVGO" title="Untitled Page" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="adminheading">
     <tr>
        <th valign="middle" class="shoppage"  align="left">商城支付方式管理</th>                  
        <td align="right"><div style="width:100px">
        <a href="Admin_HowaveUpdatePaytype.aspx?Action=add">添加支付方式</a>
        </div>
        </td>
        <td class="rtdw"></td>
     </tr>
 </table> 

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
        CssClass="adminlist" OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnDataBound="GridView1_DataBound" DataKeyNames="TypeID">
        <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:HyperLinkField DataNavigateUrlFields="typeid" DataNavigateUrlFormatString="Admin_HowaveUpdatePaytype.aspx?typeid={0}&Action=update"
                HeaderText="修改" Text="修改" />
            <asp:CommandField HeaderText="设为默认" ShowSelectButton="True" SelectText="设为默认" />
            <asp:TemplateField HeaderText="删除">
               <ItemTemplate>
                   <asp:LinkButton ID="cl" CommandArgument='<%# Eval("TypeID") %>' OnClientClick="if(confirm('确定删除吗？'))return true;return false;" OnCommand="Delete_ButtonClick" runat="server" Text="删除" />
               </ItemTemplate>
            </asp:TemplateField>
        </Columns>
         <EmptyDataTemplate >                   
                 <tr>                                 
                     <th>编号</th>
                     <th>名称</th>                 
                     <th>折扣</th>
                     <th>禁用</th>  
                     <th>默认</th>
                     <th>描述</th>                 
                     <th>修改</th>
                     <th>收货人</th> 
                     <th>设为默认</th>
                     <th>删除</th>                           
                 </tr>
                 <tr><td colspan="10" style="text-align:center">暂无信息！</td></tr>                             
                                      
            </EmptyDataTemplate> 
    </asp:GridView>
                      
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetHowavePayType"
        TypeName="Shop_PayType" UpdateMethod="SetPayTypeAsDefault" OldValuesParameterFormatString="original_{0}">
        <UpdateParameters>
            <asp:Parameter Name="TypeID" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>

