<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopDeliverType, HoWaveVGO" title="送货方式管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 <table class="adminheading">
       <tr>
          <th valign="middle" class="cpane" >送货方式列表</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="UserBLL" OldValuesParameterFormatString="original_{0}">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="TextBox1" Name="UserName" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource></td></tr>
        </table><br />
    <asp:GridView ID="GridView1" CssClass="adminlist" runat="server" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="False" DataSourceID="DeliverSource"  AllowPaging="True" EmptyDataText="没有符合你查询条件的数据" PageSize="20" DataKeyNames="TypeID">
            <Columns>
                <asp:BoundField DataField="Typeid" HeaderText="编号" />
                <asp:BoundField DataField="TypeName" HeaderText="名称" />
                <asp:BoundField DataField="chargetype" HeaderText="运费类型" />
                <asp:BoundField HeaderText="运费价格" DataField="Charge" />
                <asp:CheckBoxField DataField="IsDisabled" HeaderText="是否禁用" />
                <asp:CheckBoxField DataField="IsDefault" HeaderText="是否默认" />
                <asp:BoundField HeaderText="备注" DataField="Intro" />
                <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:LinkButton ID="cl" CommandName="Delete" 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>
                        <th>删除</th>
                    </tr>
                    <tr><td colspan="8">暂无信息！</td></tr>
           </EmptyDataTemplate>
    </asp:GridView>            
   
    <asp:ObjectDataSource ID="DeliverSource" runat="server" SelectMethod="GetDeliverTypeByUserIDTypeIDStatus"
        TypeName="Shop_DeliverType" UpdateMethod="SetDeliverTypeAsDefault" OldValuesParameterFormatString="{0}" DeleteMethod="DeleteDeliver">
        <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>
        <UpdateParameters>
            <asp:Parameter Name="TypeID" Type="Int32" />
        </UpdateParameters>
        <DeleteParameters>
            <asp:Parameter Name="TypeID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    
</asp:Content>

