X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FUtility.java;fp=src%2Fhabeas%2FUtility.java;h=2d2cacac8b1cd85ca486c76e79a35d7dd1a7bec9;hp=4a4042c727c3c36b5900727031f9f975c1c12e94;hb=d70d1fecd85b5f5b7a6eea4ac59fd8926bb5fe8f;hpb=466a2393accd0d6d2df5f68d53488c667d5369de diff --git a/src/habeas/Utility.java b/src/habeas/Utility.java index 4a4042c..2d2caca 100644 --- a/src/habeas/Utility.java +++ b/src/habeas/Utility.java @@ -272,6 +272,26 @@ public class Utility { Date sqldate = new Date (date.getTime()/1000); return sqldate; } + + static boolean updateNoticeBillDetails(int selid, String bill_status, + java.util.Date bill_date, int bill_amount) { + try { + Connection conn = DriverManager.getConnection(JDBC + connectionURL); + PreparedStatement st = conn.prepareStatement("UPDATE legalnotices" + + " SET BillStatus=?,BillDate=?,BillAmount=? WHERE id=?;"); + st.setString (1, bill_status); + st.setDate(2, toSqlDate(bill_date)); + st.setInt(3, bill_amount); + st.setInt(4, selid); + st.execute(); + conn.close(); + return true; + } catch (SQLException ex) { + Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex); + return false; + } + + } public Utility () { }