private void jButton11ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton11ActionPerformed
    boolean noSection = false;

    for (int r = 0; r < jTable11.getRowCount(); r++) {
      if (!(jTable11.getValueAt(r, 0) == null)) {
        if (jTable11.getValueAt(r, 1).equals("-")) {
          noSection = true;
        }
      }
    }

    if (noSection) {
      javax.swing.JOptionPane.showMessageDialog(
          this,
          "Please ensure all the sections have been set!",
          "Incomplete row!",
          javax.swing.JOptionPane.INFORMATION_MESSAGE);

    } else {
      try {

        connectDB.setAutoCommit(false);

        java.sql.PreparedStatement insertPs =
            connectDB.prepareStatement(
                "INSERT INTO maintenance.section_allocation (section, user_name) VALUES (?, ?)");

        for (int r = 0; r < jTable11.getRowCount(); r++) {

          if (jTable11.getValueAt(r, 0) == null || jTable11.getValueAt(r, 1) == null) {
            // do nothing
          } else {
            insertPs.setString(1, jTable11.getValueAt(r, 1).toString());
            insertPs.setString(2, jTable11.getValueAt(r, 0).toString());

            insertPs.executeUpdate();
          }
        }

        connectDB.commit();
        connectDB.setAutoCommit(true);

        javax.swing.JOptionPane.showMessageDialog(
            this,
            "Maintenance Section(s) allocated successfully!",
            "Insert Successful!",
            javax.swing.JOptionPane.INFORMATION_MESSAGE);

        // clear table
        jButton31.doClick();

      } catch (java.sql.SQLException sqle) {
        sqle.printStackTrace();

        javax.swing.JOptionPane.showMessageDialog(
            this, sqle, "Error Message!!", javax.swing.JOptionPane.ERROR_MESSAGE);

        try {

          connectDB.rollback();
          connectDB.setAutoCommit(true);

        } catch (java.sql.SQLException sqlerollback) {

          sqlerollback.printStackTrace();
          javax.swing.JOptionPane.showMessageDialog(
              this, sqlerollback, "Error Message!!", javax.swing.JOptionPane.ERROR_MESSAGE);
        }
      }
    } // ends else
  } // GEN-LAST:event_jButton11ActionPerformed