其中“进入系统”按钮的代码如下:
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 = "用户名错误";
WriteLog(strReason);
Response.Write("alert('" + strReason + "');");
break;
case "pError":
strReason = "密码错误";
WriteLog(strReason);
Response.Write("alert('" + strReason + "');");
break;
}
}
人气:112 ℃ 时间:2019-10-26 13:59:47
解答
string[] str = new PxOA.BLL.Sys.User().CheckLogin(txtUserName.Text,System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txtUserPwd.Text,"MD5")); 你是不明白这一句吧?你的代码是不是...
推荐
- 不理解这句话含义,请大家解释一下啊!
- 将两枚同样大小的硬币放在桌子上,固定其中一枚,而另一枚则沿着其边缘滚动一周,这是硬币滚动了几圈.
- 刚入门.看到书上有句话不明白它的意思.
- 以马喻马之非马,不若以非马喻马之马也,以指喻指之非指也,不若以非指喻指之指也.天地一指也,万物一马也.
- 找课文,A man who never gave up .需要全文.
- obama received the Nobel Peace Prize ,how to criticize this thing
- 表示腿的动作的词(30个)
- 初三物理书中气体密度表中气体密度是如何测量的
猜你喜欢