<%@ Page Language="C#" AutoEventWireup="true" CodeFile="user_add.aspx.cs" Inherits="general_user_user_add" %>

<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>用户管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link rel="stylesheet" type="text/css" href="../../styles/1/style.css">

    <script language="JavaScript">
function CheckForm()
{
   if(document.form1.USER_ID.value=="")
   { alert("用户名不能为空！");
     return (false);
   }

   if(document.form1.USER_PRIV.value=="")
   { alert("角色不能为空！");
     return (false);
   }

   if(document.form1.USER_NAME.value=="")
   { alert("真实姓名不能为空！");
     return (false);
   }

}

function clear_dept()
{
  document.form1.TO_ID.value="";
  document.form1.TO_NAME.value="";
}

function LoadWindow()
{
  URL="/module/dept_select?PRIV_OP=1";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:330px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}

function select_dept()
{
   if (form1.POST_PRIV.value=="2")
       dept.style.display='';
   else
       dept.style.display="none";
}

function clear_priv()
{
  document.form1.PRIV_ID.value="";
  document.form1.PRIV_NAME.value="";
}

function LoadPrivWindow()
{
  URL="/module/priv_select?PRIV_OP=1";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+200;
  window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:330px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
    </script>
</head>

    <body class="bodycolor" topmargin="5" onload="document.form1.USER_ID.focus();">
        <table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
            <tr>
                <td class="Big">
                    <img src="~/images/notify_new.gif" align="absmiddle" id="IMG2" runat="server"><span
                        class="big3"> 新建用户 </span>
                </td>
            </tr>
        </table>
        <form id="form1" onsubmit="return CheckForm();" runat="server">
            <table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3"
                align="center">
                <tr>
                    <td nowrap class="TableHeader" colspan="2">
                        <img src="~/images/green_arrow.gif" align="absMiddle" id="IMG1" runat="server">
                        以下选项由管理员设置：</td>
                </tr>
                <tr>
                    <td nowrap class="TableContent" width="120">
                        用户名：</td>
                    <td nowrap class="TableContent">
                        <input type="text" name="USER_ID" class="BigInput" size="10" maxlength="20">&nbsp;
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableContent">
                        真实姓名：</td>
                    <td nowrap class="TableContent">
                        <input type="text" name="USER_NAME" class="BigInput" size="10" maxlength="10">&nbsp;
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableContent">
                        主角色：</td>
                    <td nowrap class="TableContent">
                        &nbsp;
                        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="priv_name" DataValueField="user_priv">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td nowrap class="TableData">
                        部门：</td>
                    <td nowrap class="TableData">
                        <select name="DEPT_ID" class="BigSelect" id="Select1" runat="server">
                            
                        </select>
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableData">
                        用户排序号：</td>
                    <td nowrap class="TableData">
                        <input type="text" name="USER_NO" class="BigInput" size="10" value="" id="Text1" runat="server">&nbsp; &nbsp;
                        用于同角色用户的排序<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="Text1"
                            ErrorMessage="只充许是数字" ValidationExpression="\d*"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableData" width="120">
                        管理范围：</td>
                    <td nowrap class="TableData">
                        <select name="POST_PRIV" class="BigSelect" onchange="select_dept()">
                            <option value="0">本部门</option>
                            <option value="1">全体</option>
                            
                        </select>
                        在管理型模块中起约束作用
                    </td>
                </tr>
                
                <tr>
                    <td nowrap class="TableData">
                        访问控制：</td>
                    <td nowrap class="TableData">
                        <input type="checkbox" name="NOT_LOGIN" id="NOT_LOGIN"><label for="NOT_LOGIN">禁止登录OA系统</label><br>
                        <input type="checkbox" name="NOT_VIEW_USER" id="NOT_VIEW_USER"><label for="NOT_VIEW_USER">禁止查看用户列表</label><br>
                        <input type="checkbox" name="NOT_VIEW_TABLE" id="NOT_VIEW_TABLE"><label for="NOT_VIEW_TABLE">禁止显示桌面</label><br>
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableData">
                        考勤排班类型：</td>
                    <td nowrap class="TableData">
                        <select name="DUTY_TYPE" class="BigSelect">
                            <option value="1">正常班</option>
                            <option value="2">全日班</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableHeader" colspan="2">
                        <img src="~/images/green_arrow.gif" align="absMiddle" id="IMG3" runat="server">
                        以下选项用户可自己设置：</td>
                </tr>
                <tr>
                    <td nowrap class="TableData">
                        密码：</td>
                    <td nowrap class="TableData">
                        <input type="password" name="PASSWORD" class="BigInput" size="10" maxlength="10">&nbsp;
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableData">
                        性别：</td>
                    <td nowrap class="TableData">
                        <select name="SEX" class="BigSelect">
                            <option value="0">男</option>
                            <option value="1">女</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableData">
                        生日：</td>
                    <td nowrap class="TableData">
                        <!--#include file="../../module/date.htm"-->
                    </td>
                </tr>
                <tr>
                    <td nowrap class="TableControl" colspan="2" align="center" style="height: 30px">
                        <input type="submit" value="新 建" class="BigButton" title="新建用户" name="button" id="Submit1"
                            onserverclick="Submit1_ServerClick" runat="server">&nbsp;&nbsp;
                       
                    </td>
                </tr>
            </table>
        </form>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:hqglConnectionString %>"
                            SelectCommand="SELECT [USER_PRIV], [PRIV_NAME] FROM [user_priv] order by [priv_no]"></asp:SqlDataSource>
    </body>
</html>
