public void addCustomer(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("Insert Into customer "
                    + "(cst_username, cst_password, cst_firstname, cst_lastname, cst_gender_id, cst_maritalstatus, cst_dateofbirth, cst_address, cst_phone, cst_mobile, cst_email, cst_remarks, cst_isactive) "
                    + "Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

            pstmt.setString(1, cust.getUsername());
            pstmt.setString(2, cust.getPassword());
            pstmt.setString(3, cust.getFirstname());
            pstmt.setString(4, cust.getLastname());
            pstmt.setInt(5, cust.getGender());
            pstmt.setInt(6, cust.getMaritalstatus());
            pstmt.setDate(7, (Date) cust.getDateofbirth());
            pstmt.setString(8, cust.getAddress());
            pstmt.setString(9, cust.getPhone());
            pstmt.setString(10, cust.getMobile());
            pstmt.setString(11, cust.getEmail());
            pstmt.setString(12, cust.getRemarks());
            pstmt.setBoolean(13, cust.getIsactive());

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