📄 studentdelete.aspx.cs
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -