public void modifyCustomer(Customer cust) {

        Connection con = null;
        PreparedStatement pstmt = null;
        try {
            DBconnection dbCon = new DBconnection();
            Class.forName(dbCon.getJDBC_DRIVER());

            con = DriverManager.getConnection(dbCon.getDATABASE_URL(),
                    dbCon.getDB_USERNAME(), dbCon.getDB_PASSWORD());

            pstmt = con.prepareStatement("Update customer Set cst_firstname=?, cst_lastname=?, cst_gender_id=?, "
                    +"cst_maritalstatus=?, cst_dateofbirth=?, cst_address=?, "
                    +"cst_phone=?, cst_mobile=?, cst_email=?, cst_remarks=?, cst_isactive=?"
                    + " Where cst_id=?");
            pstmt.setString(1, cust.getFirstname());
            pstmt.setString(2, cust.getLastname());
            pstmt.setInt(3, cust.getGender());
            pstmt.setInt(4, cust.getMaritalstatus());
            pstmt.setDate(5, (Date) cust.getDateofbirth());
            pstmt.setString(6, cust.getAddress());
            pstmt.setString(7, cust.getPhone());
            pstmt.setString(8, cust.getMobile());
            pstmt.setString(9, cust.getEmail());
            pstmt.setString(10, cust.getRemarks());
            pstmt.setString(11, (cust.getIsactive()==true)?"1":"0");
            pstmt.setInt(12, cust.getId());
            pstmt.executeUpdate();
        } catch (SQLException | ClassNotFoundException ex) {
            System.err.println("Caught Exception: " + ex.getMessage());
        } finally {
            try {
                if (pstmt != null) {
                    pstmt.close();
                }
                if (con != null) {
                    con.close();
                }
            } catch (SQLException ex) {
                System.err.println("Caught Exception: " + ex.getMessage());
            }
        }
    }