studentdelete.aspx.cs
来自「在线考试系统 主要真对考试 开发的个人项目」· CS 代码 · 共 60 行
CS
60 行
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class studentDelete : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["adminId"] == null)
{
Response.Redirect("Default.aspx");
}
else
{
if (!Page.IsPostBack)
{
if (Session["ht_stuId"] != null)
{
Hashtable ht_stuId = (Hashtable)Session["ht_stuId"];
IDictionaryEnumerator myEnumerator = ht_stuId.GetEnumerator();
while (myEnumerator.MoveNext())
lbl_showDel.Text += myEnumerator.Key + " " + myEnumerator.Value + "<br/>";
}
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Session["ht_stuId"] != null)
{
Hashtable ht_stuId = (Hashtable)Session["ht_stuId"];
IDictionaryEnumerator myEnumerator = ht_stuId.GetEnumerator();
while (myEnumerator.MoveNext())
{
int count;
count = (new projClass()).deleteStuInfo(myEnumerator.Key.ToString());
}
Session["ht_stuId"] = null;
string script = "<script>window.opener.location.href='stuInfoView.aspx';window.close();</script> ";
Page.RegisterStartupScript("refresh", script);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
string script = "<script>window.opener.location.href='stuInfoView.aspx';window.close();</script> ";
Page.RegisterStartupScript("refresh", script);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?