protected void loginDo(object sender, System.EventArgs e) { User currentUser = new User(); User tmp = new User(); currentUser = tmp.Login(((TextBox)ticketOrder.FindControl("loginEmail")).Text, ((TextBox)ticketOrder.FindControl("loginPasswd")).Text); LoginHelper.drawByAuthenticated((PlaceHolder)Master.FindControl("loginBox")); if (currentUser != null) { Order order = (Order) Session["tmpOrder"]; doOrder(order); } else { ticketOrder.Controls.Add(new LiteralControl("Login failed")); } }
protected void loginDo(object sender, System.EventArgs e) { if (Session["UserToken"] != null) { Session["UserToken"] = null; LoginHelper.drawByAuthenticated(loginBox); System.Web.HttpContext.Current.Response.Redirect("Default.aspx"); } else { User currentUser = new User(); User tmp = new User(); currentUser = tmp.Login(((TextBox)loginBox.FindControl("loginEmail")).Text, ((TextBox)loginBox.FindControl("loginPasswd")).Text); if (currentUser != null) { LoginHelper.drawByAuthenticated(loginBox); System.Web.HttpContext.Current.Response.Redirect("Default.aspx"); } else { loginBox.Controls.Add(new LiteralControl("Login failed!")); } } }