Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**/.idea/
/**/cmake-build-debug/
/*/cmake-build-debug/
*.exe
/**/CMakeLists.txt
/**/CMakeFiles/
Binary file added Java/2020-2021(1)Java--A卷 参考答案.pdf
Binary file not shown.
Binary file added Java/Java程序设计期末复习(2021).pdf
Binary file not shown.
Binary file added Java/实验报告/实验1.pdf
Binary file not shown.
Binary file added Java/实验报告/实验2.pdf
Binary file not shown.
Binary file added Java/实验报告/实验3.pdf
Binary file not shown.
Binary file added Java/实验报告/实验4.pdf
Binary file not shown.
Binary file added Java/实验报告/实验5.pdf
Binary file not shown.
Binary file added Java/实验报告/实验6.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions Web信息管理系统 实验报告/2024/exp/Ex1/Calculator.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Calculator.aspx.cs" Inherits="Ex1.Calculator" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>简易计算器</title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: center;">
简易计算器<br/>
<asp:TextBox ID="txtDisplay" runat="server" ReadOnly="True" Width="110px"></asp:TextBox><br/>
<asp:Button ID="btnOne" runat="server" Text="1" OnClick="BtnOne_Click" Width="40px" />
<asp:Button ID="btnTwo" runat="server" Text="2" OnClick="BtnTwo_Click" Width="40px" />
<asp:Button ID="btnThree" runat="server" Text="3" OnClick="BtnThree_Click" Width="40px" /><br/>
<asp:Button ID="btnAdd" runat="server" Text="+" OnClick="BtnAdd_Click" Width="40px" />
<asp:Button ID="btnSubtract" runat="server" Text="-" OnClick="BtnSubtract_Click" Width="40px" />
<asp:Button ID="btnEqual" runat="server" Text="=" OnClick="BtnEqual_Click" Width="40px" />
</div>
</form>
</body>
</html>
94 changes: 94 additions & 0 deletions Web信息管理系统 实验报告/2024/exp/Ex1/Calculator.aspx.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Ex1
{
public partial class Calculator : System.Web.UI.Page
{
static string num1 = "0", num2 = "0", total = "", sign = "";
protected void BtnOne_Click(object sender, EventArgs e)
{
total += "1";
txtDisplay.Text = total;
}
protected void BtnTwo_Click(object sender, EventArgs e)
{
total += "2";
txtDisplay.Text = total;
}
protected void BtnThree_Click(object sender, EventArgs e)
{
total += "3";
txtDisplay.Text = total;
}
protected void BtnAdd_Click(object sender, EventArgs e)
{
if (sign.Length == 1)
{
Count();
num1 = txtDisplay.Text;
sign = "+";
}
else
{
num1 = txtDisplay.Text;
txtDisplay.Text = "";
total = "";
sign = "+";
}
}
protected void BtnSubtract_Click(object sender, EventArgs e)
{
if (sign.Length == 1)
{
Count();
num1 = txtDisplay.Text;
sign = "-";
}
else
{
num1 = txtDisplay.Text;
txtDisplay.Text = "";
total = "";
sign = "-";
}
}
protected void BtnEqual_Click(object sender, EventArgs e)
{
Count();
}
protected void Count()
{
num2 = txtDisplay.Text;
if (num2 == "")
{
num2 = "0";
}
switch (sign)
{
case "+":
txtDisplay.Text = (int.Parse(num1) + int.Parse(num2)).ToString();
num1 = "0";
num2 = "0";
total = "";
sign = "";
break;
case "-":
txtDisplay.Text = (int.Parse(num1) - int.Parse(num2)).ToString();
num1 = "0";
num2 = "0";
total = "";
sign = "";
break;
}
}
protected void Page_Load(object sender, EventArgs e)
{

}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Web信息管理系统 实验报告/2024/exp/Ex1/Choice.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Choice.aspx.cs" Inherits="Ex1.Choice" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>单项选择题</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:PlaceHolder ID="plhChoice" runat="server"></asp:PlaceHolder>
<asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="BtnSubmit_Click" />
<asp:Label ID="lblDisplay" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
36 changes: 36 additions & 0 deletions Web信息管理系统 实验报告/2024/exp/Ex1/Choice.aspx.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Ex1
{
public partial class Choice : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label lblQuestion = new Label
{
ID = "lblQuestion",
Text = "1.&nbsp;Web服务器控件不包括(&nbsp;&nbsp;&nbsp;&nbsp;)。"
};
plhChoice.Controls.Add(lblQuestion);
RadioButtonList rdoltChoice = new RadioButtonList
{
ID = "rdoltChoice"
};
rdoltChoice.Items.Add(new ListItem("A. Wizard", "A"));
rdoltChoice.Items.Add(new ListItem("B. input", "B"));
rdoltChoice.Items.Add(new ListItem("C. AdRotator", "C"));
rdoltChoice.Items.Add(new ListItem("D. Calendar", "D"));
plhChoice.Controls.Add(rdoltChoice);
}
protected void BtnSubmit_Click(object sender, EventArgs e)
{
RadioButtonList rdoltChoice = (RadioButtonList)plhChoice.FindControl("rdoltChoice");
lblDisplay.Text = "您选择了:" + rdoltChoice.SelectedValue;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions Web信息管理系统 实验报告/2024/exp/Ex1/Course.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Course.aspx.cs" Inherits="Ex1.Course" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>联动的教师课表</title>
</head>
<body>
<form id="form1" runat="server">
<div>
学年:<asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="True" Width="100px">
</asp:DropDownList>
学期:<asp:DropDownList ID="ddlTerm" runat="server" AutoPostBack="True" Width="40px">
</asp:DropDownList>
分院:<asp:DropDownList ID="ddlCollege" runat="server" AutoPostBack="True" Width="120px" OnSelectedIndexChanged="DdlCollege_SelectedIndexChanged">
</asp:DropDownList>
教师:<asp:DropDownList ID="ddlTeacher" runat="server" AutoPostBack="True">
</asp:DropDownList>
</div>
</form>
</body>
</html>
Loading