<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_GroupEdit, HoWaveIMSV5.0" title="修改会员组设置" debug="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<table class="adminheading">
   <tr>
      <th class="menus" >会员组设置</th>     
      <td style="width:15%; text-align:center;">
        <asp:Image ImageUrl="~/Images/Manage/new.png"  AlternateText="新增频道"  runat="server" id="AddNewChannel"  CssClass="Imagebutton"/><br />新增
      </td>
   </tr>
</table>
  <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetGroups" TypeName="GroupBLL"/>
  <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" DeleteMethod="DeleteGroup"
                   InsertMethod="AddGroup" SelectMethod="GetGroupByGroupID" TypeName="GroupBLL"
                   UpdateMethod="UpdateGroup">
                   <DeleteParameters>
                       <asp:Parameter Name="GroupID" Type="Int32" />
                   </DeleteParameters>
                   <UpdateParameters>
                       <asp:Parameter Name="GroupID" Type="Int32" />
                       <asp:Parameter Name="GroupName" Type="String" />
                       <asp:Parameter Name="GroupIntro" Type="String" />
                       <asp:Parameter Name="GroupType" Type="Int32" />
                       <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="ReCharge" Type="Boolean" />
                       <asp:Parameter Name="Transfer" Type="Boolean" />
                       <asp:Parameter Name="TransferCharge" Type="Int32" />
                       <asp:Parameter Name="AllowAnswerLibrary" Type="Boolean" />
                       <asp:Parameter Name="AllowReadLibrary" Type="Boolean" />
                       <asp:Parameter Name="AllowQuestion" Type="Boolean" />
                       <asp:Parameter Name="AllowSycharArticle" Type="String" />
                       <asp:Parameter Name="AllowRss" Type="Boolean" />
                       <asp:Parameter Name="GroupMemberNum" Type="Int32" />
                   </UpdateParameters>
                   <SelectParameters>
                       <asp:ControlParameter ControlID="SelectGroup" DefaultValue="1" Name="ID" PropertyName="SelectedValue"
                           Type="Int32" />
                   </SelectParameters>
                   <InsertParameters>
                       <asp:Parameter Name="GroupName" Type="String" />
                       <asp:Parameter Name="GroupIntro" Type="String" />
                       <asp:Parameter Name="GroupType" Type="Int32" />
                       <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="ReCharge" Type="Boolean" />
                       <asp:Parameter Name="Transfer" Type="Boolean" />
                       <asp:Parameter Name="TransferCharge" Type="Int32" />
                       <asp:Parameter Name="AllowAnswerLibrary" Type="Boolean" />
                       <asp:Parameter Name="AllowReadLibrary" Type="Boolean" />
                       <asp:Parameter Name="AllowQuestion" Type="Boolean" />
                       <asp:Parameter Name="AllowSycharArticle" Type="String" />
                       <asp:Parameter Name="AllowRss" Type="Boolean" />
                       <asp:Parameter Name="GroupMemberNum" Type="Int32" />
                   </InsertParameters>
  </asp:ObjectDataSource>
  <table cellpadding="0" cellspacing="0" border="0" width="100%" id="AdminChannelShow">
     <tr>
        <td>
            &nbsp;<asp:Label ID="Label1" runat="server" Text="&nbsp;&nbsp;&nbsp;查看会员组"></asp:Label>
               <asp:DropDownList ID="SelectGroup" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource1"
                   DataTextField="GroupName" DataValueField="GroupID">
               </asp:DropDownList>            
        </td>
     </tr>
     <tr>
        <td valign="top">
           <fieldset>
               <legend>会员组设置</legend>              
               <br />
               <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                   <ContentTemplate>
                       <asp:FormView ID="FormView1" runat="server" DataKeyNames="GroupID" 
                              DataSourceID="ObjectDataSource2"
                              DefaultMode="Edit"
                              width="100%" AllowPaging="True">
                   <EditItemTemplate>
                       <table width="100%" class="tbgroup">
                          <tr class="tdbg">
                              <td style="width:20%; text-align:right" class="tdbg1">会员组名</td>
                              <td style="width:80%; text-align:left" ><asp:TextBox ID="GroupName" Text='<%# Bind("GroupName") %>' runat="server" /></td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">会员组说明</td>
                              <td style="width:80%; text-align:left" >
                              <asp:TextBox ID="GroupIntros" Text='<%# Bind("GroupIntro") %>' runat="server" Width="400px" /></td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">会员组类型</td>
                              <td style="width:80%; text-align:left">
                                  <asp:DropDownList ID="GroupType"  runat="server" SelectedValue='<%#Bind("GroupType") %>'>
                                     <asp:ListItem Text="未验证用户" Value="0"/>
                                     <asp:ListItem Text="注册会员" Value="1"/>
                                     <asp:ListItem Text="VIP会员" Value="2"/>
                                     <asp:ListItem Text="商业客户" Value="3"/>
                                     <asp:ListItem Text="代理商" Value="4"/>                                     
                                     <asp:ListItem Text="公司职员" Value="5"/>
                                     <asp:ListItem Text="经理" Value="7"/>
                                     <asp:ListItem Text="管理员" Value="8"/>
                                     <asp:ListItem Text="超级管理员" Value="9"/>
                                   </asp:DropDownList>
                              </td>
                          </tr>                         
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">短消息权限</td>
                              <td style="width:80%; text-align:left">每次最多可同时向<asp:TextBox ID="TextBox1" Text='<%# Bind("SendMessage") %>' runat="server" width="50px"/>发送短消息<br />
                                  最多可收藏<asp:TextBox ID="TextBox6" Text='<%# Bind("MaxMessage") %>' runat="server" width="50px"/>条短消息
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">上传权限</td>
                              <td style="width:80%; text-align:left">每次允许上传最大<asp:TextBox ID="TextBox2" Text='<%# Bind("AllowUploadSize") %>' runat="server" width="50px"/>KB的文件</td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">购物权限</td>
                              <td style="width:80%; text-align:left">购物可享受<asp:TextBox ID="TextBox3" Text='<%# Bind("ShoppingDiscount") %>' runat="server" width="50px"/>% 折扣的优惠<br />
                              允许最大透支<asp:TextBox ID="TextBox4" Text='<%# Bind("OverDraft") %>' runat="server" width="50px"/>元
                              </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">社区银行权限</td>
                              <td style="width:80%; text-align:left">
                                  <asp:CheckBox ID="ReCharge" runat="server" Checked='<%# Bind("ReCharge") %>' Text="允许使用社区银行充值" />                                  
                                  <br />                                  
                                   <asp:CheckBox ID="Transfer" runat="server" Checked='<%# Bind("Transfer") %>' Text="允许自助货币转换"/>                                   
                                  <br />
                                  每次转换收取手续费<asp:TextBox ID="TextBox5" Text='<%# Bind("TransferCharge") %>' runat="server" width="50px"/>元
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">知识库权限</td>
                              <td style="width:80%; text-align:left" >
                                <asp:CheckBox ID="AllowReadLibrary" runat="server" Checked='<%# Bind("AllowReadLibrary") %>' Text="允许查看知识库"/>                                  
                                  <br />                                  
                                   <asp:CheckBox ID="AllowQuestion" runat="server" Checked='<%# Bind("AllowQuestion") %>' Text="允许提出问题"/>                                  
                                  <br />                                  
                                  <asp:CheckBox ID="AllowAnswerLibrary" runat="server" Checked='<%# Bind("AllowAnswerLibrary") %>' Text="允许解答问题"/>
                                   <br />
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">同步权限</td>
                              <td style="width:80%; text-align:left">
                                 <asp:CheckBoxList ID="AllowSycharArticle" runat="server">
                                      <asp:ListItem Text="不开放" Value="0" />
                                      <asp:ListItem Text="开启文章同步" Value="1" />
                                      <asp:ListItem Text="开启论坛帖子同步" Value="2" />
                                      <asp:ListItem Text="开启博客日志同步" Value="3" />
                                 </asp:CheckBoxList>
                                  <br />
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">聚合空间权限</td>
                              <td style="width:80%; text-align:left">
                               <asp:CheckBox ID="AllowRss" runat="server" Checked='<%# Bind("AllowRss") %>' Text="启用聚合空间"/>                                
                              </td>
                          </tr>
                          <tr class="tdbg">
                             <td>&nbsp;</td>
                             <td style="width:80%; text-align:left">
                                <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                                     Text="更新"/>                        
                                <asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                                    Text="取消"/>
                                <asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="new"
                                    Text="新增"/>
                                <asp:Button ID="Button2" runat="server" CausesValidation="False" CommandName="delete"
                                    Text="删除" OnClientClick="return confirm('您真的要删除?')"/>
                            </td>
                          </tr>
                       </table> 
                   </EditItemTemplate>
                   <InsertItemTemplate>
                              <table width="100%" class="tbgroup">
                          <tr class="tdbg">
                              <td style="width:20%; text-align:right" class="tdbg1">会员组名</td>
                              <td style="width:80%; text-align:left" ><asp:TextBox ID="GroupName" Text='<%# Bind("GroupName") %>' runat="server" /></td>
                          </tr class="tdbg">
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">会员组说明</td>
                              <td style="width:80%; text-align:left" ><asp:TextBox ID="GroupIntros" Text='<%# Bind("GroupIntro") %>' runat="server" /></td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">会员组类型</td>
                              <td style="width:80%; text-align:left">
                                 <asp:DropDownList ID="GroupType"  runat="server" SelectedValue='<%# Bind("GroupType") %>'>
                                     <asp:ListItem Text="未验证用户" Value="0"/>
                                     <asp:ListItem Text="注册会员" Value="1"/>
                                     <asp:ListItem Text="VIP会员" Value="2"/>
                                     <asp:ListItem Text="商业客户" Value="3"/>
                                     <asp:ListItem Text="代理商" Value="4"/>                                     
                                     <asp:ListItem Text="公司职员" Value="5"/>
                                     <asp:ListItem Text="经理" Value="7"/>
                                     <asp:ListItem Text="管理员" Value="8"/>
                                     <asp:ListItem Text="超级管理员" Value="9"/>
                                   </asp:DropDownList>
                              </td>
                          </tr>                         
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">短消息权限</td>
                              <td style="width:80%; text-align:left">每次最多可同时向<asp:TextBox ID="TextBox1" Text='<%# Bind("SendMessage") %>' runat="server" />发送短消息<br />
                                  最多可收藏<asp:TextBox ID="TextBox6" Text='<%# Bind("MaxMessage") %>' runat="server" />条短消息
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">上传权限</td>
                              <td style="width:80%; text-align:left">每次允许上传最大<asp:TextBox ID="TextBox2" Text='<%# Bind("AllowUploadSize") %>' runat="server" />KB的文件</td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">购物权限</td>
                              <td style="width:80%; text-align:left">购物可享受<asp:TextBox ID="TextBox3" Text='<%# Bind("ShoppingDiscount") %>' runat="server" />%折扣的优惠<br />
                              允许最大透支<asp:TextBox ID="TextBox4" Text='<%# Bind("OverDraft") %>' runat="server" />元
                              </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">社区银行权限</td>
                              <td style="width:80%; text-align:left">
                                  <asp:CheckBox ID="ReCharge" runat="server" Checked='<%# Bind("ReCharge") %>' Text="允许使用社区银行充值" />                                  
                                  <br />                                  
                                   <asp:CheckBox ID="Transfer" runat="server" Checked='<%# Bind("Transfer") %>' Text="允许自助货币转换"/>                                   
                                  <br />
                                  每次转换收取手续费<asp:TextBox ID="TextBox5" Text='<%# Bind("TransferCharge") %>' runat="server" />元
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">知识库权限</td>
                              <td style="width:80%; text-align:left" >
                                <asp:CheckBox ID="AllowReadLibrary" runat="server" Checked='<%# Bind("AllowReadLibrary") %>' Text="允许查看知识库"/>                                  
                                  <br />                                  
                                   <asp:CheckBox ID="AllowQuestion" runat="server" Checked='<%# Bind("AllowQuestion") %>' Text="允许提出问题"/>                                  
                                  <br />                                  
                                  <asp:CheckBox ID="AllowAnswerLibrary" runat="server" Checked='<%# Bind("AllowAnswerLibrary") %>' Text="允许解答问题"/>                                  
                                  <br />
                               </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">同步权限</td>
                              <td style="width:80%; text-align:left">
                                 <asp:CheckBoxList ID="SyncharAccess" runat="server" >
                                      <asp:ListItem Text="不开放" Value="0" />
                                      <asp:ListItem Text="开启文章同步" Value="1" />
                                      <asp:ListItem Text="开启论坛帖子同步" Value="2" />
                                      <asp:ListItem Text="开启博客日志同步" Value="3" />
                                 </asp:CheckBoxList>
                                  <br />
                              </td>
                          </tr>
                          <tr class="tdbg">
                              <td style="text-align:right" class="tdbg1">聚合空间权限</td>
                              <td style="width:80%; text-align:left">
                                 <asp:CheckBox ID="AllowRss" runat="server" Checked='<%# Bind("AllowRss") %>' Text="启用聚合空间"/>                                
                              </td>
                          </tr>
                          <tr>
                          <tr>
                              <td>&nbsp;</td>
                              <td>
                                 <asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="插入"/>                             
                                 <asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消"/>
                              </td>
                          </tr>
                      </InsertItemTemplate>                  
                       </asp:FormView>
                   </ContentTemplate>
                    <Triggers>
                       <asp:AsyncPostBackTrigger ControlID="SelectGroup" EventName="SelectedIndexChanged" />
                    </Triggers>
             </asp:UpdatePanel>
              
           </fieldset>
        </td>
      </tr>
  </table>           
</asp:Content>

