public void addItem(Item item) {

        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("Insert Into item (itm_name, itm_barcode, itm_barcodeimgpath, itm_imgpath, itm_description, itm_avgunitcost, itm_salerentprice, itm_minlimit, itm_maxlimit, itm_quantity, itm_isavailable, itm_isactive, itm_deactivationreason, itemCategory_id) Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    
            pstmt.setString(1, item.getName());
            pstmt.setString(2, item.getBarcode());
            pstmt.setString(3, item.getImgBracodePath());
            pstmt.setString(4, item.getImgPath());
            pstmt.setString(5, item.getDescription());
            pstmt.setDouble(6, item.getAvgUnitCost());
            pstmt.setDouble(7, item.getSaleRentPrice());
            pstmt.setInt(8, item.getMinLimit());
            pstmt.setInt(9, item.getMaxLimit());
            pstmt.setInt(10, item.getQuantity());
            pstmt.setBoolean(11, item.getIsAvailable());
            pstmt.setBoolean(12, item.getIsActive());
            pstmt.setString(13, item.getDeactivationReason());
            pstmt.setLong(14, item.getItemCategory_id());
            pstmt.execute();

        } 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());
            }
        }
    }