aspx如何创建web接口(在aspx文件的前台界面中)

随着在输入成绩时增加了季度数据,在查看成绩时,也相应增加了按季度查询成绩。

在前台文件querystudentscore.aspx中,主要代码如下:

aspx如何创建web接口(在aspx文件的前台界面中)(1)

在querystudentscore.aspx.cs文件中,主要代码如下:

aspx如何创建web接口(在aspx文件的前台界面中)(2)

结尾一段是:

aspx如何创建web接口(在aspx文件的前台界面中)(3)

前台完整代码如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="querystudentscore.aspx.cs" Inherits="querystudentscore" StylesheetTheme="Blue" %>

<!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="link.css" rel="stylesheet" type="text/css" />

<link href="link.css" rel="stylesheet" type="text/css" />

</head>

<body>

<form id="form1" runat="server">

<div>

<table align="center" style=" background-color: #99ccff;">

<tr>

<td style="width: 456px; height: 22px; text-align: center">

<strong><span style="font-size: 14pt; color: #ff00cc; font-family: 仿宋_GB2312">查看我的员工成绩</span></strong></td>

</tr>

<tr>

<td style="width: 456px; height: 40px; text-align: center">

<span style="font-size: 10pt; color: #0000ff"><strong>按考核查询: </strong></span>

<asp:DropDownList ID="DropDownList1" runat="server" Font-Bold="True" Font-Size="10pt"

Width="113px">

</asp:DropDownList>&nbsp;

<asp:Button ID="Button1" runat="server" Font-Size="10pt" OnClick="Button1_Click"

Text="确定" /></td>

</tr>

<tr>

<td style="width: 456px; height: 40px; text-align: center">

<span style="font-size: 10pt; color: #0000ff"><strong>按季度查询: </strong></span>

<asp:DropDownList ID="DropDownList2" runat="server" Font-Bold="True" Font-Size="10pt"

Width="113px">

</asp:DropDownList>&nbsp;

<asp:Button ID="Button2" runat="server" Font-Size="10pt" OnClick="Button2_Click"

Text="确定" /></td>

</tr>

<tr>

<td style="width: 456px; height: 23px">

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"

BorderColor="Tan" BorderWidth="1px" CellPadding="2" Font-Bold="True" Font-Size="10pt"

ForeColor="Black" GridLines="None" Height="5px" Width="456px">

<FooterStyle BackColor="Tan" />

<Columns>

<asp:BoundField DataField="sno" HeaderText="用户名">

<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>

<asp:BoundField DataField="sname" HeaderText="姓名">

<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>

<asp:BoundField DataField="cno" HeaderText="考核号">

<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>

<asp:BoundField DataField="cname" HeaderText="考核岗位">

<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>

<asp:BoundField DataField="degree" HeaderText="分数">

<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>

<asp:BoundField DataField="jidu" HeaderText="季度">

<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>

</Columns>

<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />

<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />

<HeaderStyle BackColor="Tan" Font-Bold="True" />

<AlternatingRowStyle BackColor="PaleGoldenrod" />

</asp:GridView>

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

</td>

</tr>

</table>

</div>

</form>

</body>

</html>

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页