Commit 79aa8098 by Jose Baez

Correccion filtro por aceptados

parent 028b969a
......@@ -73,32 +73,19 @@ import java.util.List;
}
public static void update(int id, String valor) {
String v = valor;
if (v == "1") {
boolean v = valor.equals("0") ? false : true;
try {
Connection con = DataBase.getConnection();
PreparedStatement ps = con.prepareStatement("update postulante set aceptado= false " +
"where id=?");
ps.setInt(1, id);
PreparedStatement ps = con.prepareStatement("update postulante set aceptado= ? where id=?");
ps.setBoolean(1, v);
ps.setInt(2, id);
ps.executeUpdate();
con.close();
}
catch (Exception ex) {
ex.printStackTrace();
}
} else {
try {
Connection con = DataBase.getConnection();
PreparedStatement ps = con.prepareStatement("update postulante set aceptado= true " +
" where id=?");
ps.setInt(1, id);
ps.executeUpdate();
con.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment