admin_res_cla.aspx
上传用户:szhf331
上传日期:2022-06-22
资源大小:1032k
文件大小:7k
- <%@ page language="C#" autoeventwireup="true" inherits="Admin_admin_res_yea, App_Web_p9n__skl" %>
- <%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
- <!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>
- <script src="inc/admin.js" type="text/javascript"></script>
- <script src="inc/showpage.js" type="text/javascript"></script>
- <script src="../Admin/js/jquery-1.3.2.min.js" type="text/javascript"></script>
- <link href="images/css.css" type="text/css" rel="stylesheet" />
- <link href="images/admin_file_css.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript">
-
- function abc(bb) {
- var oo = document.getElementById("pro_id");
- $("#pro_id option:nth-child(1)").text('正在查询中,请稍候...');
-
- $.get("../Admin/handler/GetProByCol.ashx", { colid: bb.value }, //../Admin/handler/GetProByCol.ashx
- function(data) {
- if (data != "") {
- var dd = eval(data);
- $("#HiddenField2").val(data);
- //删除列表
- //alert(oo.length);
- var ol = oo.length;
- for (var i = 0; i < ol; i++) {
- oo.remove(0);
- }
- //重新添加
- AddItem(oo, "请选择", "");
- for (var i = 0; i < dd.aaa.length; i++) {
- AddItem(oo, dd.aaa[i].name, dd.aaa[i].value);
- }
- }
- else {
- var ol = oo.length;
- $("#HiddenField2").val("");
- for (var i = 0; i < ol; i++) {
- oo.remove(0);
- }
- AddItem(oo, "请选择", "");
- }
- });
- }
- //-----------------------------------------------------------------
- $(function() {
- if ($("#HiddenField2").val() != "") {
- var dd = eval($("#HiddenField2").val()); //调出上次页面状态
- if ($("#ddlCol").attr("value") != "") {
- var oo = document.getElementById("pro_id");
- //删除列表
- //alert(oo.length);
- var ol = oo.length;
- for (var i = 0; i < ol; i++) {
- oo.remove(0);
- }
- //重新添加
- AddItem(oo, "请选择", "");
- for (var i = 0; i < dd.aaa.length; i++) {
- AddItem(oo, dd.aaa[i].name, dd.aaa[i].value);
- }
-
- //复原选中的值
- $("#pro_id").val($("#HiddenField1").val());
- }
- }
- });
- //加入一个option
- function AddItem(obj, text, value) {
- var varItem = new Option(text, value);
- obj.options.add(varItem);
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <asp:HiddenField ID="HiddenField2" runat="server" />
- <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/student.mdb"
- SelectCommand="SELECT cla.id, cla.cla, cla.pro_id, cla.Col_id, cla.con, cla.lj_id, p.pro, c.Col, lj.lj FROM (((res_cla cla INNER JOIN res_pro p ON cla.pro_id = p.id) INNER JOIN res_Col c ON cla.Col_id = c.id) INNER JOIN res_lj lj ON cla.lj_id = lj.id) order by cla.id desc"
- OnSelected="AccessDataSource1_Selected"></asp:AccessDataSource>
- <h1>
- 班级信息管理</h1>
- <asp:HiddenField ID="HiddenField1" runat="server" />
- <h4>
- <b>相关操作:</b> <a href="admin_res_cla_add.aspx">添加新班级</a> | <a href="admin_res_cla.aspx">班级列表管理</a>
- </h4>
- <h5>
- <ul >
- <li>年 届 <asp:DropDownList ID="ddllj" runat="server">
- </asp:DropDownList>
- </li>
- <li>系 所 <asp:DropDownList onchange="abc(this)" ID="ddlCol"
- runat="server">
- </asp:DropDownList>
- </li>
- <li>专 业
- <select id="pro_id" name="pro_id">
- <option value="">请选择</option>
- </select>
- <span></span></li>
- <li class="lefts"> <input type="button" runat="Server"
- value=" 切 换 " id="Button1" onserverclick="Button1_ServerClick">
- </li>
- </ul>
- </h5>
- <div style="height: 3px; width: 100%; background: #fff;">
- </div>
- <table width="100%" cellspacing="1" cellpadding="0" class="info_tab2">
- <tr>
- <th width="5%" style="height: 34px">
- ID
- </th>
- <th width="10%" style="height: 34px">
- 年届
- </th>
- <th width="20%" style="height: 34px">
- 系所
- </th>
- <th width="20%" style="height: 34px">
- 专业
- </th>
- <th width="20%" style="height: 34px">
- 班级
- </th>
- <th width="" style="height: 34px">
- </th>
- <th width="" style="height: 34px">
- 操作
- </th>
- </tr>
- <asp:Repeater ID="Repeater1" runat="server">
- <ItemTemplate>
- <tr>
- <td>
- <%# Eval("id").ToString()%>
- </td>
- <td>
- <%# Eval("lj").ToString()%>
- </td>
- <td>
- <%# Eval("col").ToString()%>
- </td>
- <td>
- <%# Eval("pro").ToString()%>
- </td>
- <td>
- <%# Eval("cla").ToString()%>
- </td>
- <td>
-
- </td>
- <td>
- <a href="admin_res_cla_add.aspx?action=edit&id=<%# Eval("id").ToString()%>">修改</a>|<a
- href="admin_res_cla_add.aspx?action=del&id=<%# Eval("id").ToString()%>" onclick="return confirm('确实要删除吗')">删除</a>
- </td>
- </tr>
- </ItemTemplate>
- </asp:Repeater>
- </table>
- <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="anpager" CurrentPageButtonClass="cpb"
- FirstPageText="<<" LastPageText=">>" NextPageText=">" PrevPageText="<" ShowCustomInfoSection="Left"
- ShowDisabledButtons="False" ShowInputBox="Never" OnPageChanged="AspNetPager1_PageChanged"
- PageSize="4">
- </webdiyer:AspNetPager>
- <h1>
-
- </h1>
- </form>
- <script type="text/javascript">
- function aab() {
- $("#pro_id option:nth-child(1)").text('请111选择');
- }
-
- </script>
- </body>
- </html>