示例#1
0
 protected void uiLinkButtonMainLogin_Click(object sender, EventArgs e)
 {
     UserInfo user = new UserInfo();
     user.GetUserByUserNameAndPassword(uiTextBoxUserName.Text, uiTextBoxPassword.Text);
     if (user.RowCount > 0)
     {
         Session["CurrentUser"] = user;
         if (Request.QueryString["url"] != null)
             Response.Redirect(Request.QueryString["url"].ToString());
         Response.Redirect("default.aspx");
     }
     else
     {
         uiLabelError.Visible = true;
     }
 }
示例#2
0
 protected void uiLinkButtonMainLogin_Click(object sender, EventArgs e)
 {
     UserInfo user = new UserInfo();
     user.GetUserByUserNameAndPassword(uiTextBoxUserName.Text, uiTextBoxPassword.Text);
     if (user.RowCount > 0 )
     {
         if (user.UserName == "Admin")
         {
             Session["CurrentAdmin"] = user;
             Response.Redirect("admincp.aspx");
         }
         else
         {
             uiLabelError.Visible = true;
         }
     }
     else
     {
         uiLabelError.Visible = true;
     }
 }