admin_res_cla.aspx
上传用户:szhf331
上传日期:2022-06-22
资源大小:1032k
文件大小:7k
源码类别:

行业应用

开发平台:

JavaScript

  1. <%@ page language="C#" autoeventwireup="true" inherits="Admin_admin_res_yea, App_Web_p9n__skl" %>
  2. <%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head runat="server">
  6.     <title>后台管理</title>
  7.     <script src="inc/admin.js" type="text/javascript"></script>
  8.     <script src="inc/showpage.js" type="text/javascript"></script>
  9.     <script src="../Admin/js/jquery-1.3.2.min.js" type="text/javascript"></script>
  10.     <link href="images/css.css" type="text/css" rel="stylesheet" />
  11.     <link href="images/admin_file_css.css" type="text/css" rel="stylesheet" />
  12.     <script type="text/javascript">
  13.     
  14.         function abc(bb) {
  15.             var oo = document.getElementById("pro_id");
  16.             $("#pro_id option:nth-child(1)").text('正在查询中,请稍候...');
  17.           
  18.             $.get("../Admin/handler/GetProByCol.ashx", { colid: bb.value }, //../Admin/handler/GetProByCol.ashx
  19.   function(data) {
  20.       if (data != "") {
  21.           var dd = eval(data);
  22.          $("#HiddenField2").val(data);
  23.           //删除列表
  24.           //alert(oo.length);
  25.           var ol = oo.length;
  26.           for (var i = 0; i < ol; i++) {
  27.               oo.remove(0);
  28.           }
  29.           //重新添加
  30.           AddItem(oo, "请选择", "");
  31.           for (var i = 0; i < dd.aaa.length; i++) {
  32.               AddItem(oo, dd.aaa[i].name, dd.aaa[i].value);
  33.           }
  34.       }
  35.       else {
  36.           var ol = oo.length;
  37.          $("#HiddenField2").val("");
  38.           for (var i = 0; i < ol; i++) {
  39.               oo.remove(0);
  40.           }
  41.           AddItem(oo, "请选择", "");
  42.       }
  43.   });
  44.   }
  45.   //-----------------------------------------------------------------
  46.   $(function() {
  47.       if ($("#HiddenField2").val() != "") {
  48.           var dd = eval($("#HiddenField2").val()); //调出上次页面状态
  49.           if ($("#ddlCol").attr("value") != "") {
  50.               var oo = document.getElementById("pro_id");
  51.               //删除列表
  52.               //alert(oo.length);
  53.               var ol = oo.length;
  54.               for (var i = 0; i < ol; i++) {
  55.                   oo.remove(0);
  56.               }
  57.               //重新添加
  58.               AddItem(oo, "请选择", "");
  59.               for (var i = 0; i < dd.aaa.length; i++) {
  60.                   AddItem(oo, dd.aaa[i].name, dd.aaa[i].value);
  61.               }
  62.            
  63.               //复原选中的值
  64.              $("#pro_id").val($("#HiddenField1").val());
  65.           }
  66.       }
  67.   });
  68.         //加入一个option
  69.         function AddItem(obj, text, value) {
  70.             var varItem = new Option(text, value);
  71.             obj.options.add(varItem);
  72.         }   
  73.     </script>
  74. </head>
  75. <body>
  76.     <form id="form1" runat="server">
  77.         <asp:HiddenField ID="HiddenField2" runat="server" />
  78.     <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/student.mdb"
  79.         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"
  80.         OnSelected="AccessDataSource1_Selected"></asp:AccessDataSource>
  81.     <h1>
  82.         班级信息管理</h1>
  83.     <asp:HiddenField ID="HiddenField1" runat="server" />
  84.     <h4>
  85.         <b>相关操作:</b> <a href="admin_res_cla_add.aspx">添加新班级</a> | <a href="admin_res_cla.aspx">班级列表管理</a>
  86.     </h4>
  87.     <h5>
  88.         <ul >
  89.             <li>年&nbsp;&nbsp;&nbsp;&nbsp;届 <asp:DropDownList ID="ddllj" runat="server">
  90.             </asp:DropDownList>
  91.             </li>
  92.             <li>系&nbsp;&nbsp;&nbsp;&nbsp;所 <asp:DropDownList onchange="abc(this)" ID="ddlCol"
  93.                 runat="server">
  94.             </asp:DropDownList>
  95.             </li>
  96.             <li>专&nbsp;&nbsp;&nbsp;&nbsp;业
  97.                 <select id="pro_id" name="pro_id">
  98.                   <option value="">请选择</option>
  99.                 </select>
  100.                 <span></span></li>
  101.             <li class="lefts">&nbsp;<input type="button" runat="Server"
  102.                 value=" 切 换 " id="Button1" onserverclick="Button1_ServerClick">
  103.             </li>
  104.         </ul>
  105.     </h5>
  106.     <div style="height: 3px; width: 100%; background: #fff;">
  107.     </div>
  108.     <table width="100%" cellspacing="1" cellpadding="0" class="info_tab2">
  109.         <tr>
  110.             <th width="5%" style="height: 34px">
  111.                 ID
  112.             </th>
  113.             <th width="10%" style="height: 34px">
  114.                 年届
  115.             </th>
  116.             <th width="20%" style="height: 34px">
  117.                 系所
  118.             </th>
  119.             <th width="20%" style="height: 34px">
  120.                 专业
  121.             </th>
  122.             <th width="20%" style="height: 34px">
  123.                 班级
  124.             </th>
  125.             <th width="" style="height: 34px">
  126.             </th>
  127.             <th width="" style="height: 34px">
  128.                 操作
  129.             </th>
  130.         </tr>
  131.         <asp:Repeater ID="Repeater1" runat="server">
  132.             <ItemTemplate>
  133.                 <tr>
  134.                     <td>
  135.                         &nbsp;<%# Eval("id").ToString()%>
  136.                     </td>
  137.                     <td>
  138.                         &nbsp;<%# Eval("lj").ToString()%>
  139.                     </td>
  140.                     <td>
  141.                         &nbsp;<%# Eval("col").ToString()%>
  142.                     </td>
  143.                     <td>
  144.                         &nbsp;<%# Eval("pro").ToString()%>
  145.                     </td>
  146.                     <td>
  147.                         &nbsp;<%# Eval("cla").ToString()%>
  148.                     </td>
  149.                     <td>
  150.                         &nbsp;
  151.                     </td>
  152.                     <td>
  153.                         &nbsp;<a href="admin_res_cla_add.aspx?action=edit&id=<%# Eval("id").ToString()%>">修改</a>|<a
  154.                             href="admin_res_cla_add.aspx?action=del&id=<%# Eval("id").ToString()%>" onclick="return confirm('确实要删除吗')">删除</a>
  155.                     </td>
  156.                 </tr>
  157.             </ItemTemplate>
  158.         </asp:Repeater>
  159.     </table>
  160.     <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="anpager" CurrentPageButtonClass="cpb"
  161.         FirstPageText="<<" LastPageText=">>" NextPageText=">" PrevPageText="<" ShowCustomInfoSection="Left"
  162.         ShowDisabledButtons="False" ShowInputBox="Never" OnPageChanged="AspNetPager1_PageChanged"
  163.         PageSize="4">
  164.     </webdiyer:AspNetPager>
  165.     <h1>
  166.         &nbsp;
  167.     </h1>
  168.     </form>
  169.     <script type="text/javascript">
  170.         function aab() {
  171.             $("#pro_id option:nth-child(1)").text('请111选择');
  172.         }
  173.     
  174.     </script>
  175. </body>
  176. </html>