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

📄 course.aspx

📁 基于asp.net的网上选课系统
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Course.aspx.cs" Inherits="Course"  %>

<%@ Register Src="../pg.ascx" TagName="pg" TagPrefix="uc1" %>
<!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> 
</head>
<body bgcolor="inactivecaptiontext" style="text-align: center" scroll="auto" background="../img/x200662817362436940.jpg" >
    <form id="form1" runat="server">
           <asp:DataList ID="DataList1" runat="server" DataKeyField="CourseID"  HorizontalAlign="Center" OnItemCommand="DataList1_ItemCommand" OnEditCommand="DataList1_EditCommand"  OnDeleteCommand="DataList1_DeleteCommand" OnItemDataBound="DataList1_ItemDataBound"  OnCancelCommand="DataList1_CancelCommand" OnUpdateCommand="DataList1_UpdateCommand" Font-Bold="False" Font-Italic="False" Font-Names="隶书" Font-Overline="False" Font-Size="Medium" Font-Strikeout="False" Font-Underline="False" Width="579px" Height="283px">
            <HeaderTemplate>
          <table>
          <tr><td colspan="2">已开设的课程列表:</td></tr>
          <tr>
          <td>课程号</td><td> 课程名称</td><td>课时</td><td>学分</td><td>可选人数上限</td><td>已选人数</td><td>修改</td><td>删除</td>
          </tr>
          </HeaderTemplate>
         <EditItemTemplate>
          <tr>
               <td><asp:Label ID="txtCourseID"  runat="server" Width="50px" Enabled=false Text='<%# Eval("CourseID") %>'>
               </asp:Label></td>
                <td><asp:TextBox ID="txtCourseName" runat="server" Width="100px"  Text='<%# Eval("CourseName") %>'>
                </asp:TextBox></td>
                <td><asp:TextBox ID="txtCourseHours" runat="server" Width="50px"   Text='<%# Eval("CourseHours") %>'>
                </asp:TextBox></td>
                <td><asp:TextBox ID="txtCourseScore" runat="server" Width="50px"   Text='<%# Eval("CourseScore") %>'>
                </asp:TextBox></td>
                <td><asp:TextBox ID="txtUpperLimitStudentNumber" runat="server" Width="50px"  Text='<%# Eval("UpperLimitStudentNumber") %>'>
                </asp:TextBox></td>
                <td><asp:Label ID="txtSelectedStudentNumber" runat="server" Width="50px" Enabled=false   Text='<%# Eval("SelectedStudentNumber") %>'>
                </asp:Label></td>
                <td><asp:LinkButton ID="btupdate" runat="server" Text="更新" commandname="update" /></td>
                <td><asp:LinkButton ID="btcancel" runat="server" Text="取消" commandname="cancel"/></td>
             </tr>
         </EditItemTemplate>
            <ItemTemplate>
               <tr>
               <td><asp:Label ID="CourseIDLabel" runat="server" Text='<%# Eval("CourseID") %>'></asp:Label></td>
                <td><asp:Label ID="CourseNameLabel" runat="server" Text='<%# Eval("CourseName") %>'>
                </asp:Label></td>
                <td><asp:Label ID="CourseHoursLabel" runat="server" Text='<%# Eval("CourseHours") %>'>
                </asp:Label></td>
                <td><asp:Label ID="CourseScoreLabel" runat="server" Text='<%# Eval("CourseScore") %>'>
                </asp:Label></td>
                <td><asp:Label ID="UpperLimitStudentNumberLabel" runat="server" Text='<%# Eval("UpperLimitStudentNumber") %>'>
                </asp:Label></td>
                <td><asp:Label ID="SelectedStudentNumberLabel" runat="server" Text='<%# Eval("SelectedStudentNumber") %>'>
                </asp:Label></td>
                <td><asp:LinkButton ID="btmodify" runat="server" Text="编辑" commandname="edit"  EnableViewState="true" /></td>
                <td><asp:LinkButton ID="btdelete" runat="server" Text="删除" commandname="delete" /></td>
                </tr>
           </ItemTemplate>
            <SeparatorTemplate>
            <tr>
            <td colspan="8">
            <hr size="1pt" color="blue" />
            </td>
            </tr>
            </SeparatorTemplate>
            <FooterTemplate>
            <tr>
            <td><asp:TextBox ID="id" runat="server"  Width="50px" BorderStyle="None"></asp:TextBox></td>
            <td><asp:TextBox ID="name" runat="server"  Width="100px"></asp:TextBox></td>
            <td><asp:TextBox ID="score" runat="server" Width="50px"></asp:TextBox></td>
            <td><asp:TextBox ID="hour" runat="server" Width="50px"></asp:TextBox></td>
            <td><asp:TextBox ID="num" runat="server" Width="50px"></asp:TextBox></td>
            <td></td>
            <td colspan="2"><asp:Button ID="btinsert" runat="server" Font-Bold="True" Font-Names="隶书" Font-Size="Medium"
               Text="添加" CommandName="insert" /></td>
            </tr>
            </table>
            </FooterTemplate>            
            <FooterStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
            <EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
            <SelectedItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
            <AlternatingItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
            <SeparatorStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" />
            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:DataList>&nbsp;<br />
        <uc1:pg ID="Pg1" runat="server" />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:courseConn %>"
            SelectCommand="SELECT [CourseID], [CourseName], [CourseHours], [CourseScore], [UpperLimitStudentNumber], [SelectedStudentNumber] FROM [Courses] WHERE ([TeacherID] = @TeacherID)">
            <SelectParameters>
                <asp:SessionParameter Name="TeacherID" SessionField="userid" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>

⌨️ 快捷键说明

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