SE TRATA HACER UN METODO O LLAMAR EL METODO PARA QUE HAGA UNA CONSULTA Y EL ARCHIVO JSP DESPLIEGUE LOS DATOS
/////Paciente.java
package modelo;
import java.sql.*;
import controlador.BeanPaciente;
public class Paciente {
public static boolean agregarPaciente(BeanPaciente paciente){
boolean agregado=false;
try{
Conexion c=new Conexion();
Connection con=c.getConexion();
if(con!=null){
Statement st;
st = con.createStatement();
st.executeUpdate("INSERT INTO Paciente(`clave_issemym`,`nombre`,`apellido_paterno`,`apellido_materno`,`genero`,`edad`,`tipo_visita`,`nombre_doctor`) VALUES ('"+paciente.getClave_issemym()+"','"+paciente.getNombre()+"','"+paciente.getApellido_paterno()+"','"+paciente.getApellido_materno()+"','"+paciente.getGenero()+"','"+paciente.getEdad()+"','"+paciente.getTipo_visita()+"','"+paciente.getNombre_doctor()+"')");
agregado=true;
st.close();
}
c.cerrarConexion();
}catch (SQLException e){
agregado=false;
e.printStackTrace();
}
return agregado;
}
public static boolean consultarPaciente(BeanPaciente paciente){
Comentarios recientes
hace 2 días 1 hora
hace 6 semanas 6 días
hace 51 semanas 6 días
hace 2 años 11 semanas
hace 2 años 15 semanas
hace 2 años 22 semanas
hace 2 años 31 semanas
hace 2 años 33 semanas
hace 2 años 35 semanas
hace 2 años 38 semanas