<%@ page language="C#" autoeventwireup="true" inherits="Admin_Group_List, ShopNum1Deploy" %>

<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
     <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>
    </head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
    <div class="navigator">【 用户组管理 】</div>
    <table style="width:100%">
        <tr>
            <td>
            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" 
                AutoGenerateColumns="False" DataSourceID="ObjectDataSourceData" 
                AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif" 
                DescendingImageUrl="~/images/SortDesc.gif" Width="100%" 
                    AddSequenceColumn="False" AllowMultiColumnSorting="False" BorderColor="#CCDDEF" 
                    BorderStyle="Solid" BorderWidth="1px" CellPadding="4" Del="False" 
                    DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" 
                    GridViewSortDirection="Ascending" PagingStyle="None" style="margin-left: 2px;" 
                    TableName="">          
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF"></HeaderStyle>

<PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                       <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" 
                            type="checkbox"  />
                    </HeaderTemplate>
                    <ItemTemplate>
<%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                        <input id="checkboxItem"   value='<%# Eval("Guid") %>'  type="checkbox" />
               </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                    <asp:BoundField DataField="Name" HeaderText="用户组名称" SortExpression="Name" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ShortName" HeaderText="用户组标志" 
                        SortExpression="ShortName" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
            </cc1:Num1GridView>
            </td>
        </tr>
        <tr>
            <td>
            <div class="vote">
            <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" 
                onclick="ButtonAdd_Click" CssClass="bt2"/>
            <asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" 
                onclientclick="return EditButton()" onclick="ButtonEdit_Click" CssClass="bt2"/>
            <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" 
                Text="删除" onclientclick="return DeleteButton()" 
                onclick="ButtonDelete_Click" CssClass="bt2"/>
                </div>
            </td>
        </tr>
    </table>
    <br />
  
 <table width="100%" border="0" cellspacing="3" cellpadding="2" style="line-height:180%;text-align:left">
  <tr>
    <td colspan="5"  style="background-color:#6699CC;">
    <div style="color:White;padding-left:6px;line-height:30px;height:30px">
                        <asp:Label ID="LabelPageTitle" runat="server" Font-Bold="True" Text="新增用户组"></asp:Label>&nbsp;
                     </div>
    
    </td>
  
  </tr>
  <tr>
  <td width="20%" align="right"><asp:Label ID="LabelAddName" runat="server" Text="用户组名称："></asp:Label> 
      </td>
    <td colspan="4" > 
     <asp:TextBox ID="TextBoxName" runat="server" CssClass="input2"></asp:TextBox>
        <asp:Label ID="Label3" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorLoginID" 
                            runat="server" ControlToValidate="TextBoxName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorName" 
                        runat="server" ControlToValidate="TextBoxName" Display="Dynamic" 
                        ErrorMessage="用户组名最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
  
     </td>
  </tr>
  
  <tr>
  <td align="right">   <asp:Label ID="LabelAddShortName" runat="server" Text="用户组标志："></asp:Label>
         </td>
  <td colspan="4">   
         <asp:TextBox ID="TextBoxShortName" runat="server"  CssClass="input2"></asp:TextBox>
        <asp:Label ID="Label4" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorLoginID0" 
                            runat="server" ControlToValidate="TextBoxShortName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShortName" 
                        runat="server" ControlToValidate="TextBoxShortName" Display="Dynamic" 
                        ErrorMessage="用户组标志最多20个字符" ValidationExpression="^[\s\S]{0,20}$"></asp:RegularExpressionValidator></td>
  </tr>
  
  <tr>
    <td>&nbsp;</td>
    <td  colspan="4">  <asp:Label ID="LabelControlPage" runat="server" Text="控制页面："></asp:Label></td>
   </tr>
  <tr>
    <td>&nbsp;</td>
    <td > <asp:ListBox ID="ListBoxPageLeft" runat="server" Height="440px" Width="300px" 
                                SelectionMode="Multiple">
                            </asp:ListBox></td>
    <td align="center"> 
    <table width="100%" border="0" cellspacing="3" cellpadding="2" style="text-align:center">
  <tr>
    <td><asp:Button ID="ButtonAddAllPage" runat="server" CausesValidation="False" 
                                onclick="ButtonAddAllPage_Click" Text="&gt;&gt;"  CssClass="bt2"/></td>
  </tr>
  <tr>
    <td><asp:Button ID="ButtonAddPage" runat="server" Text="&gt;" 
                                onclick="ButtonAddPage_Click" CausesValidation="False" CssClass="bt2" /></td>
  </tr>
  <tr>
    <td><asp:Button ID="ButtonDeletePage" runat="server" Text="&lt;" 
                                onclick="ButtonDeletePage_Click" CausesValidation="False"  CssClass="bt2" /></td>
  </tr>
  <tr>
    <td><asp:Button ID="ButtonDeleteAllPage" runat="server" 
                                onclick="ButtonDeleteAllPage_Click" CausesValidation="False"  Text="&lt;&lt;"  CssClass="bt2" /></td>
  </tr>
</table>
</td>
    <td ><asp:ListBox ID="ListBoxPageRight" runat="server" Height="440px" 
                                Width="300px" SelectionMode="Multiple" AutoPostBack="True" 
                                onselectedindexchanged="ListBoxPageRight_SelectedIndexChanged"></asp:ListBox></td>
    <td width="20%" >&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="4"><asp:Button ID="ButtonSetControlPower" runat="server" Text="设置页面控件访问权限" 
                     onclick="ButtonSetControlPower_Click" 
                    CausesValidation="False"  CssClass="input2"/><asp:DataList ID="DataListPageControl" runat="server"  onitemdatabound="DataListPageControl_ItemDataBound" 
                   width="100%" >
                    <ItemTemplate>
                                            <br />
                        ---------------------------------------<br />
                        <asp:Label ID="LabelPageName" runat="server" Text=<%#Eval("Name")%> 
></asp:Label>
                        <asp:Label ID="LabelPageGuid" runat="server" Text=<%#Eval("Guid")%> 
 Visible="false"></asp:Label>
                        <asp:CheckBoxList ID="CheckBoxListControl" runat="server"                 
 DataTextField="Name" DataValueField="Guid" 
                           RepeatDirection="Horizontal" AutoPostBack="True">
                        </asp:CheckBoxList>
                    </ItemTemplate>
                </asp:DataList></td>
  </tr>
    <tr>
    <td align="right">将权限赋予给该部门</td>
    <td colspan="4" align="left"><asp:DropDownList ID="DropDownListDept" runat="server"   AutoPostBack="True" 
                                onselectedindexchanged="DropDownListDept_SelectedIndexChanged" CssClass="select2">
                            </asp:DropDownList>     </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><asp:Label ID="LabelGroupUser" runat="server" Text="用户组用户："></asp:Label></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><asp:ListBox ID="ListBoxLeftUser" runat="server" Height="440px" Width="300px" 
                                SelectionMode="Multiple">
                            </asp:ListBox></td>
    <td  align="center"> <table width="100%" border="0" cellspacing="3" cellpadding="2">
  <tr>
    <td><asp:Button ID="ButtonAddAllUser" CausesValidation="False"  runat="server" Text="&gt;&gt;"  CssClass="bt2" /></td>
  </tr>
  <tr>
    <td>  <asp:Button ID="ButtonAddUser" runat="server" Text="&gt;" 
                                onclick="ButtonAddUser_Click" CausesValidation="False"  CssClass="bt2" /></td>
  </tr>
  <tr>
    <td><asp:Button ID="ButtonDeleteUser" runat="server" Text="&lt;" 
                                onclick="ButtonRemoveUser_Click" CausesValidation="False"  CssClass="bt2" /></td>
  </tr>
  <tr>
    <td><asp:Button ID="ButtonDeleteAllUser" runat="server" Text="&lt;&lt;" 
                                onclick="ButtonRemoveUser_Click" CausesValidation="False"  CssClass="bt2" /></td>
  </tr>
</table>
</td>
    <td> <asp:ListBox ID="ListBoxUserRight" runat="server" Height="440px" 
                                Width="300px" SelectionMode="Multiple"></asp:ListBox></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5"  class="btconfig">                          <asp:Button ID="ButtonConfirm" runat="server" Text="确定" 
                    onclick="ButtonConfirm_Click" ToolTip="Submit"  CssClass="bt2"/>
                        <input ID="inputReset"  type="reset" value="重置"  runat="server" class="bt2"/>
                        <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" /></td>
 
  </tr>
</table>
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_Group_Action" 
        >
        <SelectParameters>
            <asp:Parameter Name="IsDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br />
    <asp:ObjectDataSource ID="ObjectDataSourcePageControl" runat="server">
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="hiddenGuid" runat="server" Value="0" />

    </form>
</body>
</html>
