📄 stuchoose.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="stuchoose.aspx.cs" Inherits="stu" %>
<!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>
<link href="maincss.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<iframe frameborder="0" height="59" scrolling="no" src="html/head.htm"
width="100%"></iframe>
<div id="main">
<div id="title">
<div id="title_l">
</div>
<div id="title_m">
学生全校性选修课选课</div>
<div id="title_r">
</div>
</div>
<div id="content">
<div id="tool2">
<span id="Label3" style="width: 100%">姓名:<asp:Label ID="Name" runat="server" Text="Label"></asp:Label>
系别:<asp:Label ID="Depart" runat="server" Text="Label"></asp:Label>
可选门数:
<asp:Label ID="txtsnum" runat="server" Text="Label"></asp:Label> 剩余门数:<asp:Label
ID="txtqsnum" runat="server" Text="Label"></asp:Label>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/admin/pwdchange.aspx">修改密码</asp:HyperLink></span></div>
<div class="search_content">
<asp:Label ID="Label1" runat="server" Text="您所选修的课程数已满" Visible="False"></asp:Label> </div>
<div class="search_content">
根据课程名称查询:<input id="TextBox1" name="TextBox1" style="width: 152px" />
<input id="Button2" class="button" name="Button2" style="width: 56px" type="submit"
value="确定" />
</div>
<div id="tool">
<fieldset><legend>可选课程</legend>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%" OnRowCommand="GridView1_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="Cno" HeaderText="课程编号" Visible="False" ConvertEmptyStringToNull="False" />
<asp:BoundField DataField="Teaid" HeaderText="教师编号" Visible="False" />
<asp:BoundField HeaderText="课程名称" DataField="Cname" SortExpression="Cname" >
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField HeaderText="教师姓名" DataField="Name" />
<asp:BoundField DataField="Cnum" HeaderText="容量" />
<asp:BoundField HeaderText="余量" DataField="Clnum" />
<asp:BoundField HeaderText="上课时间" DataField="Coursetime" />
<asp:BoundField HeaderText="上课地点" DataField="Caddress" />
<asp:HyperLinkField HeaderText="详情" DataNavigateUrlFields="Cno,Teaid" DataNavigateUrlFormatString="courseDetail.aspx?Cno={0}&Teaid={1}" Text="详情" />
<asp:ButtonField CommandName="select" HeaderText="选修" Text="选修" />
</Columns>
<RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" />
<HeaderStyle HorizontalAlign="Center" BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</fieldset>
</div>
<fieldset>
<legend>已选课程</legend>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="Sno,Cno"
DataSourceID="SqlDataSource1" Width="100%" OnRowCommand="GridView2_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="Sno" HeaderText="学号" ReadOnly="True" SortExpression="Sno"
Visible="False" />
<asp:BoundField DataField="Cno" HeaderText="课程号" ReadOnly="True" SortExpression="Cno" />
<asp:BoundField DataField="Teaid" HeaderText="教师编号" SortExpression="Teaid" Visible="False" />
<asp:BoundField DataField="Cname" HeaderText="课程名称" SortExpression="Cname" />
<asp:BoundField DataField="Name" HeaderText="教师名称" SortExpression="Name" />
<asp:BoundField DataField="Coursetime" HeaderText="上课时间" SortExpression="Coursetime" />
<asp:BoundField DataField="Caddress" HeaderText="地点" SortExpression="Caddress" />
<asp:HyperLinkField HeaderText="详情" DataNavigateUrlFields="Cno,Teaid" DataNavigateUrlFormatString="courseDetail.aspx?Cno={0}&Teaid={1}" Text="详情" />
<asp:ButtonField CommandName="shanchu" HeaderText="退选" Text="退选" />
</Columns>
<RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" />
<HeaderStyle HorizontalAlign="Center" BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT SC.Sno, SC.Cno, SC.Teaid, Course.Cname, Teacher.Name, Course.Coursetime, Course.Caddress, Course.Cinformation FROM SC INNER JOIN Course ON SC.Cno = Course.Cno AND SC.Teaid = Course.Teaid INNER JOIN Teacher ON SC.Teaid = Teacher.Teaid AND Course.Teaid = Teacher.Teaid WHERE (SC.Sno = @Sno)">
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="Sno" SessionField="Username" />
</SelectParameters>
</asp:SqlDataSource>
</fieldset>
</div>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -