private void Logar() { try { UsuarioTO user = new UsuarioTO(true, true, true); user.Login = txtLogin.Text.Trim(); user.Psw = txtSenha.Text.Trim(); String retorno = user.Logar(Worker.getConnectionString()); if (retorno.Equals("S")) { Session.Add("User", txtLogin.Text); Response.Redirect("Home.aspx"); } else { var idmodal = "#dialog-message"; var texto = "Usuário ou senha inválidos!!"; ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "erro_msg", "document.getElementById('textoMsg').innerHTML='"+texto.ToString()+"';$('" + idmodal.ToString() + "').dialog('open');", true); } } catch (Exception ex) { throw ex; } }
private void Logar() { try { UsuarioTO user = new UsuarioTO(true, true, true); user.Login = txtLogin.Text.Trim(); user.Psw = txtSenha.Text.Trim(); String retorno = user.Logar(Worker.getConnectionString()); if (retorno.Equals("S")) { Session.Add("User", txtLogin.Text); Response.Redirect("Home.aspx"); } else { var idmodal = "#dialog-message"; var texto = "Usuário ou senha inválidos!!"; ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "erro_msg", "document.getElementById('textoMsg').innerHTML='" + texto.ToString() + "';$('" + idmodal.ToString() + "').dialog('open');", true); } } catch (Exception ex) { throw ex; } }
public String Logar(String usuario, String password) { try { UsuarioTO user = new UsuarioTO(true, true, true, usuario, password); String retorno = user.Logar(classes.Worker.getConnectionString()); return(retorno); } catch (Exception ex) { throw ex; } }
public String Logar(String usuario, String password) { try { UsuarioTO user = new UsuarioTO(true, true, true, usuario, password); String retorno = user.Logar(classes.Worker.getConnectionString()); return retorno; } catch (Exception ex) { throw ex; } }