X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FUtility.java;h=aac247c9a3d9fcde388e854c06adbfc72d058015;hp=6ca96e5d6c63cc92fa14d61ac546dcebd259cf37;hb=5b12182f8ba1ad6811d37ba582095b45a34fde2f;hpb=43efa7c67c7da936d3395345983dde4603253896 diff --git a/src/habeas/Utility.java b/src/habeas/Utility.java index 6ca96e5..aac247c 100644 --- a/src/habeas/Utility.java +++ b/src/habeas/Utility.java @@ -340,6 +340,42 @@ public class Utility { return false; } + } + + static boolean updateNoticeClarificationDetails(int selected_id, boolean + clarification_pending, String clarification_remarks) { + try { + Connection conn = DriverManager.getConnection(JDBC + connectionURL); + PreparedStatement st = conn.prepareStatement ("UPDATE legalnotices" + + " SET ClarificationPending=?, ClarificationRemarks=? " + + "WHERE id=?;"); + st.setBoolean(1, clarification_pending); + st.setString(2, clarification_remarks); + st.setInt (3, selected_id); + st.execute(); + conn.close (); + return true; + } catch (SQLException ex) { + Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex); + return false; + } + + } + + static boolean deleteNotice(int r) { + try { + Connection conn = DriverManager.getConnection(JDBC + connectionURL); + PreparedStatement st = conn.prepareStatement("DELETE FROM legalnotices" + + " WHERE id=?;"); + st.setInt(1, r); + st.execute(); + conn.close(); + return true; + } catch (SQLException ex) { + Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex); + return false; + } + } public Utility () {