<%@ page language="C#" masterpagefile="../ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_PaymentType, HoWaveVGO" title="付款方式管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pageTitle">付款方式管理</div>
<br />
    <table class="SearchTableStyle">     
       <tr>
          <td>
            <asp:Button ID="ButAddManageType" runat="server" Text="添加付款方式管理" OnClick="ButAddManageType_Click" Width="138px"  />
          </td>
       </tr>
    </table> 
<br /> 
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
        CssClass="tableHead" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"  DataKeyNames="TypeID" OnDataBound="GridView1_DataBound">
        <Columns>
            <asp:BoundField DataField="Typeid" HeaderText="编号" ReadOnly="True" />
            <asp:BoundField DataField="TypeName" HeaderText="名称" />
            <asp:BoundField DataField="DisCount" HeaderText="折扣"   DataFormatString="{0}%"/>
            <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="Shop_AddManagePaytype.aspx?Action=Modify&TypeID={0}"
                HeaderText="修改" Text="修改" />
            <asp:CommandField HeaderText="设为默认" ShowSelectButton="True" SelectText="设为默认" />
            <asp:HyperLinkField DataNavigateUrlFields="TypeID" DataNavigateUrlFormatString="?Action=Del&TypeID={0}"
                HeaderText="删除" Text="删除" />
        </Columns>
         <EmptyDataTemplate >                   
              <div style="padding:10px;">没有符合查询条件的记录！</div>                                       
            </EmptyDataTemplate> 
    </asp:GridView>
                      
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetPayTypeByUserIDTypeIDStatus"
        TypeName="Shop_PayType" UpdateMethod="SetPayTypeAsDefault"   DeleteMethod="DeleteType">
        <UpdateParameters>
            <asp:Parameter Name="TypeID" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="UserID" SessionField="HOWAVE_UserID"
                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>

</asp:Content>

