closeTransaction(false);
closeTransactionDontReset();
  protected void watchAddButton() {    String prototypeName = (String)prototypeNameCombo.getSelectedItem();    if (prototypeName == null) {      setStatus("No asset type selected");      return;    }    prototypeName = prototypeName.trim();    if (prototypeName.length() < 1) {      setStatus("No asset type selected");      return;    }    int quantity;    Date beginDate;    Date endDate;    try {      quantity = Integer.parseInt(addQuantityText.getText().trim());    } catch (Exception quantE) {      quantity = -1;    }    if (quantity < 0) {      setStatus("Invalid quantity");    } else if (quantity == 0) {      setStatus(true, "Added Nothing");    } else if ((beginDate =                dateFormatter.toDate(addBeginText.getText().trim()))               == null) {      setStatus("Invalid begin date");    } else if ((endDate =                dateFormatter.toDate(addEndText.getText().trim()))               == null) {      setStatus("Invalid end date");    } else {      openTransaction();      try {        addAsset(prototypeName, quantity, beginDate, endDate);        setStatus(true, "Added " +           ((quantity > 1) ?            (quantity+" Assets") :            "One Asset"));        if (!prototypeNames.contains(prototypeName)) {          prototypeNames.add(prototypeName);          prototypeNameCombo.addItem(prototypeName);        }      } catch (Exception exc) {        if (prototypeNames.contains(prototypeName)) {          prototypeNames.remove(prototypeName);          prototypeNameCombo.removeItem(prototypeName);        }        System.err.println("Could not add asset: "+exc);        setStatus("Unable to add Asset Type");      }      closeTransaction(false);    }  }