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

📄 studentjichuke.aspx

📁 学生网上选课系统,实现了学生的在线选课和教师课程的上传
💻 ASPX
字号:

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="studentjichuke.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <table >
            <tr>
                <td align="center" style="width: 100px; height: 318px; text-align: center" valign="top">
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        DataKeyNames="courceID,teaID" ForeColor="#333333" GridLines="None" OnPageIndexChanging="Data_Page"
                        OnRowCommand="GridView1_RowCommand" PageSize="10" Width="806px">
                        <Columns>
                            <asp:BoundField DataField="courceID" HeaderText="courceID" ReadOnly="True" SortExpression="courceID"
                                Visible="False" />
                            <asp:BoundField DataField="teaID" HeaderText="teaID" ReadOnly="True" SortExpression="teaID"
                                Visible="False" />
                            <asp:BoundField DataField="courceName" HeaderText="课程名称" SortExpression="courceName" />
                            <asp:BoundField DataField="typename" HeaderText="课程类别" SortExpression="typename" />
                            <asp:BoundField DataField="teaName" HeaderText="教师姓名" SortExpression="teaName" />
                            <asp:BoundField DataField="courceTime" HeaderText="上课时间" SortExpression="courceTime" />
                            <asp:BoundField DataField="courceAddress" HeaderText="上课地点" SortExpression="courceAddress" />
                            <asp:BoundField DataField="credit" HeaderText="课程学分" SortExpression="credit" />
                            <asp:BoundField DataField="xueshi" HeaderText="课程学时" SortExpression="xueshi" />
                            <asp:BoundField DataField="courcerenshu" HeaderText="限选人数" SortExpression="courcereshu" />
                            <asp:BoundField DataField="renshu" HeaderText="已选人数" SortExpression="renshu" />
                            <asp:HyperLinkField DataNavigateUrlFields="courceID,teaID" DataNavigateUrlFormatString="courseDetail.aspx?courceID={0}&amp;teaID={1}"
                                HeaderText="详细..." Text="详细..." />
                            <asp:ButtonField CommandName="select" HeaderText="选修" Text="选修">
                                <ItemStyle Width="60px" Wrap="False" />
                                <HeaderStyle Wrap="False" />
                            </asp:ButtonField>
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                        <PagerTemplate>
                            <table>
                                <tr>
                                    <td>
                                        <asp:Label ID="LabelCurrentPage" runat="server" Font-Size="Small">当前页:<%# ((GridView)Container.NamingContainer).PageIndex + 1 %></asp:Label></td>
                                    <td>
                                        <asp:Label ID="LabelPageCount" runat="server" Font-Size="Small">总页数:<%# ((GridView)Container.NamingContainer).PageCount %></asp:Label></td>
                                    <td>
                                        <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page"
                                            Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" Font-Size="Small">首页</asp:LinkButton></td>
                                    <td>
                                        <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev"
                                            CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"
                                            Font-Size="Small">上一页</asp:LinkButton></td>
                                    <td>
                                        <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page"
                                            Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                            Font-Size="Small">下一页</asp:LinkButton></td>
                                    <td>
                                        <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page"
                                            Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                            Font-Size="Small">尾页</asp:LinkButton></td>
                                </tr>
                            </table>
                        </PagerTemplate>
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td align="center" style="width: 100px; text-align: center" valign="top">
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="查看所选课程" Width="151px" /></td>
            </tr>
        </table>
    
</asp:Content>



⌨️ 快捷键说明

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