protected void btoIngreso_Click(object sender, EventArgs e) { lblError.Visible = false; USUARIO usrLogin = CRUD_Usuario.Login(txtUser.Text, txtPassword.Text); if (usrLogin != null) { this.Master.ActiveUser = usrLogin; if (usrLogin.area.Equals("UC")) { Response.Redirect(URL_DEFAULT_UC, true); } else { Response.Redirect(URL_DEFAULT_Bod, true); } } else { txtUser.Text = ""; txtPassword.Text = ""; lblError.Visible = true; } }
protected void btoIngreso_Click(object sender, EventArgs e) { lblError.Visible = false; USUARIO usrLogin = CRUD_Usuario.Login(txtUser.Text, txtPassword.Text); if (usrLogin != null) { this.Master.ActiveUser = usrLogin; if (this.Master.URL_ORIGINAL == null) { Response.Redirect(URL_DEFAULT(usrLogin.area)); } else { if (this.Master.TienePermiso(this.Master.URL_ORIGINAL)) { string url_red = this.Master.URL_REDIRECT; this.Master.URL_REDIRECT = null; this.Master.URL_ORIGINAL = null; Response.Redirect(url_red); } else { this.Master.URL_ORIGINAL = null; this.Master.URL_REDIRECT = null; Response.Redirect(URL_DEFAULT(usrLogin.area)); } } } else { txtUser.Text = ""; txtPassword.Text = ""; lblError.Visible = true; } }