<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="departmentstaff.aspx.cs" Inherits="Web.yw.departmentstaff1" %>

<!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 id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="fom" runat="server">
        <div id ="main-c-03-right" >
            <table cellpadding="0"; cellspacing ="0"; style =" width :100%;background-image: url('../css/images/right_top.png'); background-repeat :repeat-x" >
                <tr>
                    <td style ="width :720px; height :34px;  background-image: url('../css/images/atghtj.png');	background-repeat: no-repeat;
                	background-position: left top;"><div id="main-c-03-right02-top">
                	   <!--这里添加页面标题 -->
                      	员工管理
                      	
                	</div></td>
                </tr>
            </table>
            <div id="main-c-03-right02-main">
                 <asp:Panel ID="Panel3" runat="server">
<!--栏目开始 -->

            <table style ="width :100%" border="0"  cellpadding="0" cellspacing="0" class="ziti04">
               <tr>
                    <td style ="font-weight:bolder;background-image: url('../css/images/asdfrsg.png'); height :33px; padding-left :20px">
                    <!--这里添加栏目标题 -->
                    员工查询
                    
                     &gt;&gt;</td>
                    <td style ="background-image: url('../css/images/asdfrsg.png');  text-align :right ;"> 
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="tbNum" Display="Dynamic" ErrorMessage="行数不能为空。" 
                                                ValidationGroup="RowNum" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="tbNum" Display="Dynamic" ErrorMessage="请输入大于0的整数。" 
                                                ValidationExpression="^\+?[1-9][0-9]*$" 
                            ValidationGroup="RowNum" ForeColor="Red"></asp:RegularExpressionValidator></td>
                    <td style ="background-image: url('../css/images/asdfrsg.png'); width :164px;text-align :right ;">每页显示行数：<asp:TextBox ID="tbNum" runat="server" 
                    Width="44px" MaxLength="4">10</asp:TextBox></td>
                    <td  style ="background-image: url('../css/images/asdfrsg.png'); width :76px" ><asp:Button ID="btnQuery" runat="server" onclick="tijiao_Click" Text="确定" ToolTip="RowNum" 
                           ValidationGroup="RowNum" /></td>
                </tr>
                <tr>
                    <td colspan="4" style="font-weight:bolder; height :10px"></td>
                </tr>
            </table>
            <!--这里添加内容 -->
            <div>&nbsp;单位：<asp:DropDownList ID="ddlDepartment" runat="server">
                </asp:DropDownList>
                &nbsp;证件号/登录名/卡号/姓名：<asp:TextBox ID="tbStaff" runat="server" 
                Width="182px"></asp:TextBox>
            &nbsp;
            <asp:Button ID="tijiao" runat="server" CausesValidation="False" 
                 onclick="tijiao_Click" Text="提交" ValidationGroup="RowNum" />
            &nbsp;（支持姓名模糊查询，为空则查询所有员工）<asp:Label ID="lbRowscountview" runat="server" 
                ForeColor="Red"></asp:Label>
          <div style ="margin-bottom :6px; margin-top :6px">
           <asp:GridView ID="GridView1" 
                  runat="server" BorderWidth="1px" onrowdatabound="GridView1_RowDataBound" 
                Width="100%" CssClass="gv" AutoGenerateColumns="False" 
                  onrowcreated="GridView1_RowCreated" 
                  onselectedindexchanging="GridView1_SelectedIndexChanging" >
                <RowStyle BorderWidth="1px" CssClass="gvrow" />
                <Columns>
                 <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                <asp:BoundField DataField="证件号" HeaderText="证件号" ReadOnly="True" />
                <asp:BoundField DataField="登录名" HeaderText="登录名" ReadOnly="True" />
                <asp:BoundField DataField="卡号" HeaderText="卡号" ReadOnly="True" />
                <asp:BoundField DataField="姓名" HeaderText="姓名" ReadOnly="True" />
                <asp:BoundField DataField="主管部门" HeaderText="主管部门" ReadOnly="True" />
                <asp:BoundField DataField="单位" HeaderText="单位" ReadOnly="True" />
                <asp:BoundField DataField="权限" HeaderText="权限" ReadOnly="True" />
                <asp:BoundField DataField="电话" HeaderText="电话" ReadOnly="True" />
                <asp:BoundField DataField="邮箱" HeaderText="邮箱" ReadOnly="True" />
                <asp:BoundField DataField="帐号状态" HeaderText="帐号状态" ReadOnly="True" />
                <asp:BoundField DataField="登录选择" HeaderText="登录选择" ReadOnly="True" />
                    <asp:CommandField HeaderText="修改" SelectText="修改" ShowSelectButton="True" />

                </Columns>
                <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
            </asp:GridView></div> 
            <table cellpadding="0" cellspacing="0" style ="width :100%">
              <tr>
                  <td style =" padding-left :5px; text-align :left  ">
                      <asp:Panel ID="Panel1" runat="server" Visible="False">
                      </asp:Panel>
                  </td>
                  <td  id ="Td1" runat ="server" style ="text-align :right ;  padding-right  :5px">
                      &nbsp;</td>
              </tr>
          </table>
          <asp:Panel ID="plOutput" runat="server" Visible ="false" >
            <div class =" td_rightnoborder  ">      
                <asp:Button ID="btPrintView" runat="server" onclick="btPrintView_Click" 
                    Text="打印预览" />
                <asp:Button ID="btExcel" runat="server" Text="导出到EXCEL" 
                  onclick="btExcel_Click"  />
                  </div>
              </asp:Panel>
           <table cellpadding="0" cellspacing="0" style ="width :100%">
              <tr>
                  <td style =" padding-left :5px; text-align :left  ">
                      
                  </td>
                  <td  id ="allowpage" runat ="server" style ="text-align :right ;  padding-right  :5px">
                      &nbsp;</td>
              </tr>
          </table>
            </div>

<!--栏目结束 -->
               
<!--栏目开始 -->
         <asp:Panel ID="Panel4" runat="server">
                <table style =" width :100%" border="0" cellpadding="0" cellspacing="0" class="ziti04">
                     <tr>
                         <td style ="font-weight:bolder;background-image: url('../css/images/asdfrsg.png'); width :497px; height :33px; padding-left :20px">
                             <!--这里添加栏目标题 -->
                             添加员工 
                             &gt;&gt;</td>
                         <td style ="background-image: url('../css/images/asdfrsg.png'); width :103px"></td>
                         <td style ="background-image: url('../css/images/asdfrsg.png'); width :64px"></td>
                         <td  style ="background-image: url('../css/images/asdfrsg.png');  text-align :right ; padding-right :5px" >
                             <asp:Button ID="btExcelUpload" runat="server" Text="EXCEL导入" 
                                 onclick="btExcelUpload_Click" />
                         </td>
                    </tr>
                    <tr>
                         <td  colspan="4" style="font-weight:bolder; height :10px"></td>
                    </tr>
                </table>
                        <!--这里添加内容 -->
                        <table border="1"  style=" width :700px" class ="table" cellpadding ="0" cellspacing ="0">
            <tr>
                <td  class ="tabletd_right ">
                    证件号：</td>
                <td class ="tabletd_left ">
                    <asp:TextBox ID="tbAddStaffId" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                    <span >（必填）</span><asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                        ControlToValidate="tbAddStaffId" Display="Dynamic" ErrorMessage="证件号不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                        ControlToValidate="tbAddStaffId" Display="Dynamic" ErrorMessage="请输入2-25个合法字符。" 
                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,25}$" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class ="tabletd_right ">
                    登录名：</td>
                <td class ="tabletd_left ">
                    <asp:TextBox ID="tbAddLoginName" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                    <span >（必填）</span><asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                        ControlToValidate="tbAddLoginName" Display="Dynamic" ErrorMessage="登录名不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                        ControlToValidate="tbAddLoginName" Display="Dynamic" 
                        ErrorMessage="请输入2-20个合法字符。" 
                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,20}$" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class ="tabletd_right ">
                    密码：</td>
                <td class ="tabletd_left ">
                    <asp:TextBox ID="tbAddPassword" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                    <span >（必填）</span><asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
                        ControlToValidate="tbAddPassword" Display="Dynamic" ErrorMessage="密码不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                        ControlToValidate="tbAddPassword" Display="Dynamic" 
                        ErrorMessage="请输入6-20个合法字符。" 
                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{6,20}$" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                </td>
            </tr>
                            <tr>
                                <td class="tabletd_right ">
                                    卡号：</td>
                                <td class="tabletd_left ">
                                    <asp:TextBox ID="tbAddCardid" runat="server" MaxLength="50" Width="214px"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator16" 
                                        runat="server" ControlToValidate="tbAddCardid" Display="Dynamic" 
                                        ErrorMessage="请输入少于50个合法字符。" 
                                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{0,50}$" 
                                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="tabletd_right ">
                                    姓名：</td>
                                <td class="tabletd_left ">
                                    <asp:TextBox ID="tbAddStaffName" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                                    <span>（必填）</span><asp:RequiredFieldValidator ID="RequiredFieldValidator14" 
                                        runat="server" ControlToValidate="tbAddStaffName" Display="Dynamic" 
                                        ErrorMessage="姓名不能为空。" ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" 
                                        ControlToValidate="tbAddStaffName" Display="Dynamic" 
                                        ErrorMessage="请输入2-20个合法字符。" 
                                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,20}$" 
                                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
            <tr>
                <td  class ="tabletd_right ">
                    单位：</td>
                <td class ="tabletd_left ">
                    <asp:DropDownList ID="ddlAddDepartment" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class ="tabletd_right ">
                    权限：</td>
                <td class ="tabletd_left ">
                    <asp:DropDownList ID="ddlAddPost" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class ="tabletd_right ">
                    电话：</td>
                <td class ="tabletd_left ">
                    <asp:TextBox ID="tbAddTel" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator15" 
                        runat="server" ControlToValidate="tbAddTel" Display="Dynamic" 
                        ErrorMessage="请输入少于22个合法字符。" 
                        ValidationExpression="(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                </td>
            </tr>
              <tr>
                  <td class="tabletd_right ">
                      邮箱：</td>
                  <td class="tabletd_left">
                      <asp:TextBox ID="tbAddEmail" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                      <asp:RegularExpressionValidator ID="RegularExpressionValidator14" 
                          runat="server" ControlToValidate="tbAddEmail" Display="Dynamic" 
                          ErrorMessage="请输入少于50个合法字符。" 
                          ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{0,50}$" 
                          ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                  </td>
              </tr>
                         <tr>
                             <td class="tabletd_right">
                                 &nbsp;</td>
                             <td class="tabletd_left ">
                                 <asp:Button ID="btAdd" runat="server" onclick="btAdd_Click" Text="添加" 
                                     ValidationGroup="Add" />
                             </td>
                         </tr>
            </table>
       </asp:Panel>                  
<!--栏目结束 -->
</asp:Panel> 

<!--栏目开始 -->
<asp:Panel ID="Panel2" runat="server" Visible="False">
                <table style =" width :100%" border="0"  cellpadding="0" cellspacing="0" class="ziti04">
                     <tr>
                         <td style ="font-weight:bolder;background-image: url('../css/images/asdfrsg.png'); width :497px; height :33px; padding-left :20px">
                             <!--这里添加栏目标题 -->
                             修改员工 
                             &gt;&gt;</td>
                         <td style ="background-image: url('../css/images/asdfrsg.png'); width :103px"></td>
                         <td style ="background-image: url('../css/images/asdfrsg.png'); width :64px"></td>
                         <td  style ="background-image: url('../css/images/asdfrsg.png'); width :76px" ></td>
                    </tr>
                    <tr>
                         <td  colspan="4" style="font-weight:bolder; height :10px"></td>
                    </tr>
                </table>
                        <!--这里添加内容 -->
                        <table  style =" width :700px" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td class ="tabletd_right " >
                        证件号：</td>
                    <td class ="tabletd_left ">
        <asp:TextBox ID="tbEditStaffId" runat="server" Width="130px" MaxLength="20"></asp:TextBox>
                        <asp:RequiredFieldValidator 
                            ID="RequiredFieldValidator4" runat="server" 
                              ControlToValidate="tbEditStaffId" Display="Dynamic" ErrorMessage="证件号不能为空。" 
                            ValidationGroup="Edit" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" 
                            ControlToValidate="tbEditStaffId" Display="Dynamic" 
                            ErrorMessage="请输入2-25个合法字符。" 
                            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,25}$" 
                            ValidationGroup="Edit" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td  class ="tabletd_right ">
                        登录名：</td>
                    <td class ="tabletd_left ">
                        <asp:TextBox ID="tbEditLoginName" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                            ControlToValidate="tbEditLoginName" Display="Dynamic" ErrorMessage="登录名不能为空。" 
                            ValidationGroup="Edit" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" 
                            ControlToValidate="tbEditLoginName" Display="Dynamic" 
                            ErrorMessage="请输入2-20个合法字符。" 
                            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,20}$" 
                            ValidationGroup="Edit" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td  class ="tabletd_right ">
                        密码：</td>
                    <td class ="tabletd_left " style="color: #FF0000">
                                         <asp:TextBox ID="tbEditPassword" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                                         密码不修改请留空。<asp:RegularExpressionValidator ID="RegularExpressionValidator10" 
                            runat="server" ControlToValidate="tbEditPassword" Display="Dynamic" 
                            ErrorMessage="请输入6-20个合法字符。" 
                            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{6,20}$" 
                            ValidationGroup="btPassword"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                    <tr>
                    <td class="tabletd_right ">
                        卡号：</td>
                    <td class="tabletd_left " style="color: #FF0000">
                        <asp:TextBox ID="tbEditCardid" runat="server" MaxLength="50" Width="214px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator17" 
                            runat="server" ControlToValidate="tbEditCardid" Display="Dynamic" 
                            ErrorMessage="请输入少于50个合法字符。" 
                            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{0,50}$" 
                            ValidationGroup="Edit"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                            <tr>
                                <td class="tabletd_right ">
                                    姓名：</td>
                                <td class="tabletd_left ">
                                    <asp:TextBox ID="tbEditStaffName" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                                        ControlToValidate="tbEditStaffName" Display="Dynamic" ErrorMessage="姓名不能为空。" 
                                        ValidationGroup="Edit" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator11" 
                                        runat="server" ControlToValidate="tbEditStaffName" Display="Dynamic" 
                                        ErrorMessage="请输入2-25个合法字符。" 
                                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{2,25}$" 
                                        ValidationGroup="Edit" ForeColor="Red"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                <tr>
                    <td class="tabletd_right ">
                        主管部门：</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbEditIndustry" runat="server"></asp:Label>
                    </td>
                </tr>
                            <tr>
                                <td class="tabletd_right ">
                                    单位：</td>
                                <td class="tabletd_left ">
                                    <asp:DropDownList ID="ddlEditDepartment" runat="server">
                                    </asp:DropDownList>
                                    <asp:Label ID="lbEditDepartment" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                            </tr>
                <tr>
                    <td class ="tabletd_right ">
                        权限：</td>
                    <td class ="tabletd_left">
                        <asp:DropDownList ID="ddlEditPost" runat="server">
                        </asp:DropDownList>
                        <asp:Label ID="lbEditPost" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        电话：</td>
                    <td class ="tabletd_left">
                        <asp:TextBox ID="tbEditTel" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator12" 
                            runat="server" ControlToValidate="tbEditTel" Display="Dynamic" 
                            ErrorMessage="请输入少于22个合法字符。" 
                            ValidationExpression="(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$" 
                            ValidationGroup="Edit" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right">
                        邮箱：</td>
                    <td class ="tabletd_left">
                        <asp:TextBox ID="tbEditEmail" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator13" 
                            runat="server" ControlToValidate="tbEditEmail" Display="Dynamic" 
                            ErrorMessage="请输入少于50个合法字符。" 
                            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{0,50}$" 
                            ValidationGroup="Edit" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        账号状态：</td>
                    <td class ="tabletd_left ">
                        <asp:DropDownList ID="ddlEditZhuangtai" runat="server">
                            <asp:ListItem Selected="True">正常</asp:ListItem>
                            <asp:ListItem>禁用</asp:ListItem>
                            <asp:ListItem>锁定</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="lbEditZhuangtai" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        登录选择：</td>
                    <td class="tabletd_left ">
                        <asp:DropDownList ID="ddlEditLoginSelect" runat="server">
                            <asp:ListItem Selected="True">全部允许</asp:ListItem>
                            <asp:ListItem>仅证件号登录</asp:ListItem>
                            <asp:ListItem>仅登录名登录</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="lbEditLoginSelect" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        <asp:Label ID="lbEditId" runat="server" Visible="False"></asp:Label>
                    </td>
                    <td class="tabletd_left ">
                        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="提交修改" 
                            ValidationGroup="Edit" />
                    </td>
                </tr>
            </table>
                </asp:Panel>         
<!--栏目结束 -->
                </div>
            </div>
        </form>
    </body>
</html>

