Manage Legal Notices - Clarification Details
[habeas.git] / src / habeas / Utility.java
index 6ca96e5..f7fdae7 100644 (file)
@@ -340,6 +340,26 @@ 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;
+        }
+        
     }
     public Utility () {