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

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

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

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc2" %>



<!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>
    <style type="text/css">
        .style1
        {
            width: 296px;
        }
    </style>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
   </asp:ScriptManager>
<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
    <div class="navigator">【 部门列表 】</div>
   <table  style="width:100%">
                    <tr>
                        <td align="left">
                            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" 
                                AutoGenerateColumns="False" 
                                AllowPaging="True" style="width:100%" DataSourceID="ObjectDataSourceData" 
                                AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif" 
            DescendingImageUrl="~/images/SortDesc.gif" AllowMultiColumnSorting="False" 
                                GridViewSortDirection="Ascending" AddSequenceColumn="False" 
                                BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="1px" CellPadding="4" 
                                Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" 
                                PagingStyle="None" TableName="" Width="99%">
                                 <HeaderStyle Font-Bold="True" HorizontalAlign="Center" />
                                 <PagerStyle  HorizontalAlign="Left" />
                                 <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 align="left">
                        <div class="vote">
                        <asp:Button ID="ButtonAdd" runat="server" onclick="ButtonAdd_Click" 
                                onclientclick="GetCheckedBoxValues()" Text="添加" CausesValidation="False" CssClass="bt2" />
                            &nbsp;<asp:Button ID="ButtonEdit" runat="server" onclick="ButtonEdit_Click" 
                                onclientclick="return EditButton()" Text="编辑" CausesValidation="False" CssClass="bt2" />
                            &nbsp;<asp:Button ID="ButtonDelete" runat="server" onclick="ButtonDelete_Click" 
                                onclientclick="return DeleteButton()" Text="删除" CausesValidation="False" CssClass="bt2" />  </div>                     
                        </td>                    
                    </tr>
</table>
    <table style="width:100%" >
        <tr>
            <td style="width:40%" align="right">
                &nbsp;</td>
            <td style="width:60%" align="left">
                &nbsp;</td>
        </tr>
    </table>
   
 <table width="100%" border="0" cellspacing="2" cellpadding="0" style="line-height:180%" >
<tr><Td style="width:100%;background-color:#6699CC;" colspan="4">
<div style="color:White;padding-left:6px;line-height:30px">
                        <asp:Label ID="LabelPageTitle" runat="server" Font-Bold="True" Text="新增部门"></asp:Label>
                     </div>
</Td></tr>
  <tr>
    <td align="right" width="20%">
  <asp:Label ID="LabelName" runat="server" Text="部门名称："></asp:Label>
                        
                           </td>
  
    <td  colspan="3" >
                        
                                      <asp:TextBox ID="TextBoxName" runat="server" width="295"></asp:TextBox>
                            <asp:Label ID="Label2" runat="server" Text="*" ForeColor="red"></asp:Label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorName" 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="LabelShortName" runat="server" Text="部门缩写："></asp:Label>
                             </td>
    <td   colspan="3">  
                             <asp:TextBox ID="TextBoxShortName" runat="server" width="295"></asp:TextBox>
                            <asp:Label ID="Label3" runat="server" Text="*" ForeColor="red"></asp:Label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorShortName" runat="server" 
                        ControlToValidate="TextBoxShortName" Display="Dynamic" ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorName0" 
                        runat="server" ControlToValidate="TextBoxShortName" Display="Dynamic" 
                        ErrorMessage="部门缩写最多20个字符" ValidationExpression="^[\s\S]{0,20}$"></asp:RegularExpressionValidator> </td>
   
  </tr>
  <tr>
    <td align="right" > 选择部门：</td>
    <td class="style1"><asp:DropDownList ID="DropDownListDept" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="DropDownListDept_SelectedIndexChanged" 
                        width="300"> </asp:DropDownList>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
   
  </tr>
  <tr>
    <td ></td>
    <td class="style1" > <asp:Label ID="LabelDpetUser" runat="server" Text="部门员工："></asp:Label></td>
    <td></td>
    <td>公司部门：</td>
   
  </tr>
  <tr>
    <td >
        &nbsp;</td>
    <td class="style1" >
    <asp:ListBox ID="ListBoxUserLeft" runat="server" Height="440px" 
                                            SelectionMode="Multiple" Width="300px"></asp:ListBox></td>
    <td>
    <table border="0" cellspacing="3" cellpadding="2" 
            style="text-align:center;">
    <tr><td></td></tr>
  <tr>
    <td>  <asp:Button ID="ButtonAddUser" runat="server" onclick="ButtonAddUser_Click" 
                                                Text="添加&gt;&gt;"  CausesValidation="False" CssClass="bt2"/></td>
  </tr>
  
  <tr>
    <td> <asp:Button ID="ButtonDeleteUser" runat="server" 
                                                onclick="ButtonDeleteUser_Click" Text="&lt;&lt;移除" CssClass="bt2" 
                                                CausesValidation="False"  /></td>
  </tr>
</table>

    
    
    
    </td>
    <td align="left" width="48%">  <asp:ListBox ID="ListBoxRight" runat="server" Height="440px" 
                                            SelectionMode="Multiple" Width="300px"></asp:ListBox></td>
    
  </tr>
  <tr><td>&nbsp;</td><td class="style1">&nbsp;</td></tr>
  <tr>
    
    <td colspan="4">      <div  class="btconfig" style="text-align:center; ">
                         <asp:Button ID="ButtonConfirm" runat="server" onclick="ButtonConfirm_Click" 
                             Text="确定" ToolTip="Submit" CssClass="bt2" />
                         <input ID="inputReset" runat="server" type="reset" value="重置"  class="bt2"/>
                         <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                     </div></td>
  </tr>
</table>

     
<%--        </ContentTemplate>
   </asp:UpdatePanel>--%>
    <br />
    
    <br />
  
    <br />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_Dept_Action" 
        >
        <SelectParameters>
            <asp:Parameter Name="IsDeleted" Type="Int32" />
        </SelectParameters>
       
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="hiddenGuid" runat="server" Value="0" />
    </form>
</body>
</html>
