其中“進(jìn)入系統(tǒng)”按鈕的代碼如下:
其中“進(jìn)入系統(tǒng)”按鈕的代碼如下:
public partial class Ln_DangBan_Login :System.Web.UI.Page
{
protected void Page_Load(object sender,EventArgs e)
{
}
protected void imgLogin_Click(object sender,ImageClickEventArgs e)
{
string[] str = new PxOA.BLL.Sys.User().CheckLogin(txtUserName.Text,System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txtUserPwd.Text,"MD5"));
string strReason = string.Empty;
switch (str[0])
{
case "access":
strReason = "登錄成功";
WriteLog(strReason);
Session["UserID"] = str[1];
Session["EmpID"] = str[2];
Session["DepID"] = str[3];
Response.Redirect("Index.aspx");
break;
case "noEmp":
strReason = "用戶名錯(cuò)誤";
WriteLog(strReason);
Response.Write("alert('" + strReason + "');");
break;
case "pError":
strReason = "密碼錯(cuò)誤";
WriteLog(strReason);
Response.Write("alert('" + strReason + "');");
break;
}
}
public partial class Ln_DangBan_Login :System.Web.UI.Page
{
protected void Page_Load(object sender,EventArgs e)
{
}
protected void imgLogin_Click(object sender,ImageClickEventArgs e)
{
string[] str = new PxOA.BLL.Sys.User().CheckLogin(txtUserName.Text,System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txtUserPwd.Text,"MD5"));
string strReason = string.Empty;
switch (str[0])
{
case "access":
strReason = "登錄成功";
WriteLog(strReason);
Session["UserID"] = str[1];
Session["EmpID"] = str[2];
Session["DepID"] = str[3];
Response.Redirect("Index.aspx");
break;
case "noEmp":
strReason = "用戶名錯(cuò)誤";
WriteLog(strReason);
Response.Write("alert('" + strReason + "');");
break;
case "pError":
strReason = "密碼錯(cuò)誤";
WriteLog(strReason);
Response.Write("alert('" + strReason + "');");
break;
}
}
其他人氣:575 ℃時(shí)間:2019-10-26 13:59:47
優(yōu)質(zhì)解答
string[] str = new PxOA.BLL.Sys.User().CheckLogin(txtUserName.Text,System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txtUserPwd.Text,"MD5")); 你是不明白這一句吧?你的代碼是不是...
我來回答
類似推薦
- 不理解這句話含義,請(qǐng)大家解釋一下啊!
- 將兩枚同樣大小的硬幣放在桌子上,固定其中一枚,而另一枚則沿著其邊緣滾動(dòng)一周,這是硬幣滾動(dòng)了幾圈.
- 剛?cè)腴T.看到書上有句話不明白它的意思.
- 以馬喻馬之非馬,不若以非馬喻馬之馬也,以指喻指之非指也,不若以非指喻指之指也.天地一指也,萬物一馬也.
- 陳蕃的“蕃”在這里的讀音是什么?
- But the one million people of the city,who thought little of these events,were asleep as usual that
- 線粒體的氧化磷酸化和葉綠體的光合磷酸化有什么共同點(diǎn)和不同點(diǎn)?
- 一個(gè)含30度角的直角三角形能否分割成2個(gè)全等的三角形
- 設(shè)f(x)=√x,g(x)=-x+a(a>0,a∈R),若不等式▏{f(x)+a[g(x)-2a]}/f(x)▕ ≤1對(duì)x∈[1,4]恒成立,求a的取值范圍.小弟拜謝!
- 熱帶魚最適合的溫度是幾度?
- 有關(guān)圓周率的知識(shí)
- f(x)=|x²+3x|,關(guān)于x的方程f(x)-a|x-1|=0恰有4個(gè)互異的實(shí)根,則a的取值范圍
猜你喜歡
- 1用120個(gè)邊長是1cm的正方形,可以擺出 種面積是120平方厘米的長方形.
- 2m為何值時(shí),方程組y=x+my2?4x?2y+1=0 (1)有兩組不相等的實(shí)數(shù)解; (2)有相同的兩組實(shí)數(shù)解; (3)無實(shí)數(shù)解.
- 3初一語文(下)主要復(fù)習(xí)什么?
- 4腦筋急轉(zhuǎn)彎:.How can you make a rope shorter without cutting or winding it?
- 5一根跳繩長五分之四米,這根跳繩的四分之三有多長?怎么算?
- 6人們?cè)诖笞匀恢惺艿竭^哪些啟發(fā),有什么發(fā)明創(chuàng)造
- 7為什么before后面加being given而不是giving
- 8不要把污水直接排入河流英文怎么說
- 9兩個(gè)同體積的容器一個(gè)裝HCl氣體另一裝H2和CL2的混合氣體同溫同壓下,一定相同的是.
- 10五星村共有小麥的320公頃,玉米地比小麥地多1/4,這個(gè)村的玉米地比小麥地多多少公頃?玉米地有多少公頃?
- 11老外口中的的she average是什么意思
- 12大什么大什么,要成語的.