<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_GroupEdit, mallz" title="修改会员组设置" debug="true" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="adminheading">
    <tr  ><th class="menus">会员组设置</th>     
    <td align="right"></td> </tr>
</table>
  
<asp:FormView id="FormView1" runat="server"  AllowPaging="True" width="100%" 
    DefaultMode="Edit" DataKeyNames="GroupID" DataSourceID="ObjectDataSource1" OnDataBound="FormView1_OnDataBound">
    <EditItemTemplate>
        <table class="nick">
            <tr>
                <td colspan="2" class="tit">编辑会员组</td>
            </tr>
            <tr class="tdbg">
                <td class="ltd">会员组名：</td>
                <td class="rtd"><asp:TextBox ID="GroupName" Text='<%# Bind("GroupName") %>' runat="server" /></td>
            </tr>
            <tr>
                <td class="ltd">会员组说明：</td>
                <td class="rtd"><asp:TextBox ID="GroupIntros" TextMode="MultiLine" Height="80px" Width="500px" Text='<%# Bind("GroupIntro") %>' runat="server" /></td>
            </tr>
            <tr>
                <td class="ltd">允许上传最大文件：</td>
                <td class="rtd"><asp:TextBox ID="TextBox2" Text='<%# Bind("AllowUploadSize") %>' runat="server" Width="60" />KB</td>
            </tr>
            <tr>
                <td class="ltd">商品发布数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox13" Text='<%# Bind("maxproduct") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">添加付款方式的数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox15" Text='<%# Bind("maxpaytype") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">添加送货方式的数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox16" Text='<%# Bind("maxdelitype") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">收藏商品的数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox17" Text='<%# Bind("maxmyfav") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">商城货币支付手续费：</td>
                <td class="rtd"><asp:TextBox ID="TextBox19" Text='<%# Bind("paytip") %>' runat="server" Width="60" />%</td>
            </tr>
            <tr>
                <td class="ltd">商城权限：</td>
                <td class="rtd">
                <asp:CheckBoxList ID="GroupPower" runat="server" >
                    <asp:ListItem Value="showbuy" Text="是否显示买家" />
                    <asp:ListItem Value="showsaler" Text="是否显示卖家" />
                    <asp:ListItem Value="allowopenshop" Text="是否允许开店" />
                    <asp:ListItem Value="allowsaleproduct" Text="是否允许未开店出售商品" />
                    <asp:ListItem Value="allowaddpaytype" Text="是否允许自定义付款方式" />
                    <asp:ListItem Value="allowadddelivertype" Text="是否允许自定义运费方式" />
                    <asp:ListItem Value="needcheck" Text="开店自动审核" />
                </asp:CheckBoxList>
                </td>
            </tr>             
            <tr>
                <td colspan="2" class="btm">
                <asp:Button id="UpdateButton" runat="server" Text="修 改" CommandName="Update" CausesValidation="True"></asp:Button> 
                 <input type="button" onclick="location.href='Admin_Group.aspx'" value="返 回" />
                </td>
            </tr>
        </table>
	<table class="adminlist"></table>
     </EditItemTemplate>
    <InsertItemTemplate>
        <table class="nick">
            <tr>
                <td colspan="2" class="tit">添加会员组</td>
                </tr>
            <tr class="tdbg">
                <td class="ltd">会员组名：</td>
                <td class="rtd"><asp:TextBox ID="GroupName" Text='<%# Bind("GroupName") %>' runat="server" /></td>
            </tr>
            <tr>
                <td class="ltd">会员组说明：</td>
                <td class="rtd"><asp:TextBox ID="GroupIntros" TextMode="MultiLine" Height="80px" Width="500px" Text='<%# Bind("GroupIntro") %>' runat="server" /></td>
            </tr>
            <tr>
                <td class="ltd">允许上传最大文件：</td>
                <td class="rtd"><asp:TextBox ID="TextBox2" Text='<%# Bind("AllowUploadSize") %>' runat="server" Width="60" />KB</td>
            </tr>
            <tr>
                <td class="ltd">商品发布数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox13" Text='<%# Bind("maxproduct") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">添加付款方式的数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox15" Text='<%# Bind("maxpaytype") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">添加送货方式的数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox16" Text='<%# Bind("maxdelitype") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">收藏商品的数量：</td>
                <td class="rtd"><asp:TextBox ID="TextBox17" Text='<%# Bind("maxmyfav") %>' runat="server" Width="60" /></td>
            </tr>
            <tr>
                <td class="ltd">商城货币支付手续费：</td>
                <td class="rtd"><asp:TextBox ID="TextBox19" Text='<%# Bind("paytip") %>' runat="server" Width="60" />%</td>
            </tr>

            <tr>
                <td class="ltd">商城权限：</td>
                <td class="rtd">
                <asp:CheckBoxList ID="GroupPower" runat="server" >
                    <asp:ListItem Value="showbuy" Text="是否显示买家" />
                    <asp:ListItem Value="showsaler" Text="是否显示卖家" />
                    <asp:ListItem Value="allowopenshop" Text="是否允许开店" />
                    <asp:ListItem Value="allowsaleproduct" Text="是否允许未开店出售商品" />
                    <asp:ListItem Value="allowaddpaytype" Text="是否允许自定义付款方式" />
                    <asp:ListItem Value="allowadddelivertype" Text="是否允许自定义运费方式" />
                    <asp:ListItem Value="needcheck" Text="开店自动审核" />
                </asp:CheckBoxList>
                </td>
            </tr>             
            <tr>
                <td colspan="2" class="btm">
                <asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="添 加"/>                             
                <input type="button" onclick="location.href='Admin_Group.aspx'" value="返 回" />
                </td>
            </tr>
        </table>
	<table class="adminlist"></table>
    </InsertItemTemplate>
</asp:FormView>

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="AddGroup"
        SelectMethod="GetGroupByGroupID" TypeName="MallZ.Data.GroupBll" UpdateMethod="UpdateGroup"
        OnInserting="OnSubmit" OnUpdating="OnSubmit" 
        OnInserted="ObjectDataSource1_Inserted" OnUpdated="ObjectDataSource1_Updated"  >
        <UpdateParameters>
            <asp:Parameter Name="GroupID" Type="Int32" />
            <asp:Parameter Name="GroupName" Type="String" />
            <asp:Parameter Name="GroupIntro" Type="String" />
            <asp:Parameter Name="SendMessage" Type="Int32" />
            <asp:Parameter Name="MaxMessage" Type="Int32" />
            <asp:Parameter Name="AllowUploadSize" Type="Int32" />
            <asp:Parameter Name="ShoppingDiscount" Type="Int32" />
            <asp:Parameter Name="OverDraft" Type="Int32" />
            <asp:Parameter Name="TransferCharge" Type="Int32" />
            <asp:Parameter Name="AllowSycharArticle" Type="Int32" />
            <asp:Parameter Name="GroupPower" Type="String" />
            <asp:Parameter Name="GroupMemberNum" Type="Int32" />
            <asp:Parameter Name="maxmessagesend" Type="Int32" />
            <asp:Parameter Name="maxproduct" Type="Int32" />
            <asp:Parameter Name="maxpaytype" Type="Int32" />
            <asp:Parameter Name="maxdelitype" Type="Int32" />
            <asp:Parameter Name="maxmyfav" Type="Int32" />
            <asp:Parameter Name="maxteambuyrate" Type="Int32" />
            <asp:Parameter Name="paytip" Type="Single" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="GroupName" Type="String" />
            <asp:Parameter Name="GroupIntro" Type="String" />
            <asp:Parameter Name="SendMessage" Type="Int32" />
            <asp:Parameter Name="MaxMessage" Type="Int32" />
            <asp:Parameter Name="AllowUploadSize" Type="Int32" />
            <asp:Parameter Name="ShoppingDiscount" Type="Int32" />
            <asp:Parameter Name="OverDraft" Type="Int32" />
            <asp:Parameter Name="TransferCharge" Type="Int32" />
            <asp:Parameter Name="AllowSycharArticle" Type="Int32" />
            <asp:Parameter Name="GroupPower" Type="String" />
            <asp:Parameter Name="GroupMemberNum" Type="Int32" />
            <asp:Parameter Name="maxmessagesend" Type="Int32" />
            <asp:Parameter Name="maxproduct" Type="Int32" />
            <asp:Parameter Name="maxpaytype" Type="Int32" />
            <asp:Parameter Name="maxdelitype" Type="Int32" />
            <asp:Parameter Name="maxmyfav" Type="Int32" />
            <asp:Parameter Name="maxteambuyrate" Type="Int32" />
            <asp:Parameter Name="paytip" Type="Single" />
        </InsertParameters>
        <SelectParameters>
        <asp:QueryStringParameter QueryStringField="GroupID" Name="GroupID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

