⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newclass.aspx

📁 这是一个自动排课软件(包含源码,需求分析,详细设计).希望对你有所帮助.
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewClass.aspx.cs" Inherits="SystemManage_NewClass" %>

<!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>
    <base target=_self />
    <script type="text/javascript">
			var xmlHttp;
			var TxtName
			function verify(txtname)
			{
				this.TxtName = txtname;
				doPost("NewClass.aspx?ClassName="+txtname.value);
				
			}
			function createXmlHttp()
			{
			   
				if(window.ActiveXObject)
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				else if(Window.XMLHRequest)
				{
				    xmlHttp=new XMLHttpRequest();
				}
			}
			function doGet(url)
			{
				createXmlHttp();
				xmlHttp.onreadystatechange=handleStateChange;
				
				xmlHttp.open("GET",url);
				xmlHttp.send(null);
			}
			function doPost(url)
			{
				createXmlHttp();
				xmlHttp.onreadystatechange=handleStateChange;
				xmlHttp.open("POST",url);
				xmlHttp.send(null);
				//xmlHttp.send("ClassName="+document.form1.txtName.value);
			}
			function handleStateChange()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var returnValue=eval(xmlHttp.responseText);
					if(returnValue)
					{
					   labError.innerText='已存在同名班级名';
					   //alert("已存在同名用户名");
					   TxtName.value="";
					   TxtName.focus();
					   TxtName.select();
					   return;
					}
					else
					{
					    labError.innerText='';
					    //alert("该用户名可以使用");
					}
				}
			}
			
		function closemodel()
        {
            window.close();
        }
        
		</script>

</head>
<body class="model">
    <form id="form1" runat="server">
    <div>
    <br />
    <table align="center">
        <tr>
            <td align="right" >
                <asp:Label ID="Label1" runat="server" Text="班级名称" Font-Size="9pt"></asp:Label></td>
            <td >
                <asp:TextBox ID="txtName" runat="server" Font-Size="9pt"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                    Display="Dynamic" ErrorMessage="班级名不能为空"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="Label2" runat="server" Text="学期" Font-Size="9pt"></asp:Label></td>
            <td >
                <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ODSTrem" DataTextField="TermName"
                    DataValueField="TermID" Width="132px" Font-Size="9pt">
                </asp:DropDownList><asp:ObjectDataSource ID="ODSTrem" runat="server" SelectMethod="Select"
                    TypeName="BLL.BTerm"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td align="right" >
                <asp:Label ID="Label3" runat="server" Text="班主任" Font-Size="9pt"></asp:Label></td>
            <td >
                <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="ODSCharge" DataTextField="EmployeeName"
                    DataValueField="EmployeeID" Width="132px" Font-Size="9pt">
                </asp:DropDownList><asp:ObjectDataSource ID="ODSCharge" runat="server" SelectMethod="ChargeSelect"
                    TypeName="BLL.BEmployee"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td align="right" >
                <asp:Label ID="Label4" runat="server" Text="班级状态" Font-Size="9pt"></asp:Label></td>
            <td >
                <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="ODSStatus" DataTextField="StatusDesc"
                    DataValueField="StatusID" Width="133px" Font-Size="9pt">
                </asp:DropDownList><asp:ObjectDataSource ID="ODSStatus" runat="server" SelectMethod="Select"
                    TypeName="BLL.BStatus"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2" style="height: 36px" valign="bottom">
                <asp:Button ID="Button1" runat="server" Text="确定" OnClick="Button1_Click" />
                &nbsp;&nbsp;
                <input id="Button2" type="button" value="取消" onclick="closemodel()"/></td>
        </tr>
    </table>
    </div>
           <p align=center><asp:Label ID="labError" runat="server" ForeColor="Red" Width="90px" Font-Size="9pt"></asp:Label></p> 
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -