<%@ page autoeventwireup="true" debug="true" enableeventvalidation="false" inherits="_N25_Basicl_Student_parents_modify, App_Web_59rphgcb" language="C#" validaterequest="false" %>

<!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/main1.css" rel="stylesheet" type="text/css" />

    <script src="../js/getstudent.js" type="text/javascript">
    </script>

    <script src="../js/json2.js" type="text/javascript"></script>

    <script src="../jquery-1.5.js" type="text/javascript">
    </script>

    <link href="../window/_css/window.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
 
    
    $(window.document).ready(function () {
    $("#Button1").click(function () {


       var StuClaId=$.trim($("#banji").val());
      var stu = $.trim($("#stu").val());
          
          
        var par_acount = $.trim($("#par_acount").val());
        var par_password = $.trim($("#par_password").val());
        var par_name = $.trim($("#par_name").val());
        var par_sex = $.trim($("#par_sex").val());
        var par_tel = $.trim($("#par_tel").val());
        var par_address = $.trim($("#par_address").val());

        if (StuClaId=="") return Msg("抱歉!请选择班级!","banji");
         if (stu=="") return Msg("抱歉!请选择学生!","stu");
      

        if (par_acount == "") return Msg("抱歉!请输入家长帐号!", "par_acount");

      

        if (par_password == "") return Msg("抱歉!请输入密码!", "par_password");
        
        
        if (par_name == "") return Msg("抱歉!请输入家长姓名!", "par_name");
        
        if (par_sex == "") return Msg("抱歉!请选择性别!", "par_sex");
        
        
         if (par_tel == "") return Msg("抱歉!请输入联系电话!", "par_tel");
        
        var IsStuTel = /((\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}))$)$/;
        if (!IsStuTel.test(par_tel)) return Msg("抱歉!联系电话不正确!", "par_tel");

        if (par_address == "") return Msg("抱歉!请输入家庭住址!", "par_address");

       
    })
})
function Msg(s, obj) {
    $("#" + obj).css({
        "background-color": "#FFE1E1"
    });
    $("#" + obj).change(function () {
        if ($.trim($(this).val()) != "") {
            $("#" + obj).css({
                "background-color": ""
            });
        } else {
            $("#" + obj).css({
                "background-color": "#FFE1E1"
            });
        }
    });
    window.alert(s);
    return false
}
    
function TABLE1_onclick() {

}

    </script>

</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    
        <div class="title">
            学生家长信息
        </div>
        <table border="0" cellpadding="0" cellspacing="0" class="table" width="100%" id="TABLE1" onclick="return TABLE1_onclick()">
            <tr>
                <td align="right" class="line" style="width: 130px">
                    班级：
                </td>
                <td align="left" class="line">
                    <asp:DropDownList ID="banji" AutoPostBack="true"  runat="server"  Width="158" OnSelectedIndexChanged="banji_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    学生姓名：
                </td>
                <td align="left">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                    <asp:DropDownList ID="stu" runat="server">
                    </asp:DropDownList>
                        </ContentTemplate>
                    <Triggers >
                    <asp:AsyncPostBackTrigger ControlID ="banji" />
                    </Triggers>
                    </asp:UpdatePanel>
         
                </td>
            </tr>
          
            
         
            <tr>
                <td align="right" class="line">
                    家长帐号：
                </td>
                <td align="left" class="line">
                    <asp:TextBox ID="par_acount" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="line">
                    密 码：
                </td>
                <td align="left" class="line">
                    <asp:TextBox ID="par_password" runat="server"  Width="150"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="line">
                    家长姓名：
                </td>
                <td align="left" class="line">
                    <asp:TextBox ID="par_name" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    性别：
                </td>
                <td align="left">
                    <asp:DropDownList ID="par_sex" runat="server">
                        <asp:ListItem>男</asp:ListItem>
                        <asp:ListItem>女</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right" class="line">
                    联系电话：
                </td>
                <td align="left" class="line">
                    <asp:TextBox ID="par_tel" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    家庭住址：
                </td>
                <td align="left">
                    <asp:TextBox ID="par_address" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="line">
                    备注：
                </td>
                <td align="left" class="line">
                    <asp:TextBox ID="Par_Remark" runat="server" Rows="5" TextMode="MultiLine" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="修改" /><asp:Button
                        ID="Button2" runat="server" OnClick="Button2_Click" Text="返回列表" />
                </td>
            </tr>
        </table>
        <div id="message" class="window_message" style="position: absolute; left: 42%; top: 35%;
            display: none">
            <img alt="正在处理请稍等...." src="../images/loading.gif" />正在读取数据请稍等....
        </div>
    </form>
</body>
</html>
