<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PostUser.aspx.cs" Inherits="MTCUN.Mobile.Admin.PostUser"
    Title="编辑用户-系统" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" TagPrefix="uc3" %>
<!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></title>
    <link id="mobileCss" runat="server" href="../themes/mobile.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">
        function OpenSearch() {
            if (setContent.style.display == 'none') {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲所有角色';
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼所有角色';
            }
        }
    </script>
</head>
<script type="text/javascript">

    function Face(src) {
        document.getElementById("imgFace").src = "../../images/userface/" + src;
    }

    function ValidPassword(source, arguments) {
        var pwd = document.getElementById("__tbxPassword").value;
        var pwd2 = document.getElementById("tbxPassword2").value;
        if (pwd != "") {
            if (pwd2 == "") {
                document.getElementById("_Password").innerText = "请再次输入密码！";
                arguments.IsValid = false;

            }
            else {
                if (pwd != pwd2) {
                    document.getElementById("_Password").innerText = "两次密码不一致！";
                    arguments.IsValid = false;

                }
            }
        }
    }
</script>
<body>
    <form id="form1" runat="server">
        <uc3:col_Header ID="col_Header1" runat="server" />


        <div id="web_page_contents">
            <div class="search biao_zhun_suo_jin">
                <asp:ScriptManager ID="ScriptManager1" runat="server" AllowCustomErrorsRedirect="False">
                </asp:ScriptManager>

                <div class="kuai_show">
                    <table class=" table_simple_kuan" cellspacing="0">
                        <tr>
                            <th colspan="2">编辑员工权限
                            </th>
                        </tr>
                        <tr class="required">
                            <td style="width: 80px">真实姓名：
                            </td>
                            <td>
                                <asp:TextBox ID="tbxTrueName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>登录名：<td>
                                <asp:TextBox ID="__tbxUserName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>密码：<td>
                                <asp:TextBox ID="__tbxPassword" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>确认密码：<td>
                                <asp:TextBox ID="tbxPassword2" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:CustomValidator ID="_Password" runat="server" ClientValidationFunction="ValidPassword"
                                    ControlToValidate="tbxPassword2" ValidateEmptyText="True"></asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>头像：<td>
                                <span class="inline_block">
                                    <asp:Image ID="imgFace" runat="server" /></span> <span class="inline_block">
                                        <asp:DropDownList runat="server" ID="ddlUserFace">
                                            <asp:ListItem Value="1.gif">1</asp:ListItem>
                                            <asp:ListItem Value="2.gif">2</asp:ListItem>
                                            <asp:ListItem Value="3.gif">3</asp:ListItem>
                                            <asp:ListItem Value="4.gif">4</asp:ListItem>
                                            <asp:ListItem Value="5.gif">5</asp:ListItem>
                                            <asp:ListItem Value="6.gif">6</asp:ListItem>
                                            <asp:ListItem Value="7.gif">7</asp:ListItem>
                                            <asp:ListItem Value="8.gif">8</asp:ListItem>
                                            <asp:ListItem Value="9.gif">9</asp:ListItem>
                                            <asp:ListItem Value="10.gif">10</asp:ListItem>
                                            <asp:ListItem Value="11.gif">11</asp:ListItem>
                                            <asp:ListItem Value="12.gif">12</asp:ListItem>
                                            <asp:ListItem Value="13.gif">13</asp:ListItem>
                                            <asp:ListItem Value="14.gif">14</asp:ListItem>
                                            <asp:ListItem Value="15.gif">15</asp:ListItem>
                                        </asp:DropDownList></span>
                            </td>
                        </tr>
                        <tr>
                            <td>手机号：<td>
                                <asp:TextBox ID="tbxMobileTel" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>状态：
                <td>
                    <asp:DropDownList runat="server" ID="ddlLockState">
                        <asp:ListItem Value="0" Selected="True" Text="禁用"></asp:ListItem>
                        <asp:ListItem Value="1" Text="启用"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                        </tr>
                        <tr>
                            <td rowspan="2">隶属组：
                            </td>
                            <td>
                                <asp:UpdatePanel ID="upUserGroup" runat="server">
                                    <ContentTemplate>
                                        <div class="striking">

                                            <ul class="searchtool">
                                                <li>
                                                    <div id="setControl" onclick="OpenSearch()">
                                                        ▼所有角色
                                                    </div>
                                                </li>
                                            </ul>

                                            <div id="setContent" style="display: none">
                                                <asp:CheckBoxList ID="lbxUserGroups" runat="server" CssClass="font16" RepeatColumns="2" RepeatDirection="Horizontal">
                                                </asp:CheckBoxList>
                                                <table class="table_simple">
                                                    <tr>
                                                        <td>
                                                                <asp:DropDownList ID="ddlSchool0" runat="server" DataTextField="SchoolName" DataValueField="SchoolID">
                                                                </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <label class="lab_button dianming btn_width">
                                                                <asp:Button ID="btnAddUser" runat="server" Text="▼加入" OnClick="btnAddUser_Click" Width="91px" CausesValidation="False" />
                                                            </label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>

                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:UpdatePanel ID="upSelected" runat="server">
                                    <ContentTemplate>
                                        <div class="striking">
                                            <asp:CheckBoxList ID="lbxSelected" runat="server" CssClass="font16" RepeatColumns="1" RepeatDirection="Horizontal">
                                            </asp:CheckBoxList>
                                            <table class="table_simple_kuan">
                                                <tr>
                                                    <td>
                                                        <label class="lab_button dianming btn_width">
                                                            <asp:Button ID="btnRemoveUser" runat="server" Text="▲移除" OnClick="btnRemoveUser_Click" Width="91px" CausesValidation="False" />
                                                        </label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td>所属校区：
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlSchool" runat="server" DataValueField="SchoolID" DataTextField="SchoolName">
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </div>
                <label class="lab_button_kuan">
                    <asp:Button ID="btnAdd" runat="server" Text="提交" OnClick="btnAdd_Click"></asp:Button>
                </label>
                <label class="lab_button_kuan" id="__mt_labBack" runat="server">
                    <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                </label>
                <script type="text/javascript">
                    document.getElementById("ddlUserFace").onchange();
                </script>

                <div class="divremark">
                    <b>注意事项：</b><br />
                    不修改密码，为空即可。
                </div>
            </div>
        </div>
    </form>
</body>
</html>
