public void btnPressedFormMain(ActionEvent e) throws NumberFormatException,
			IOException, NoSuchAlgorithmException {

		if (e.getSource() == formMain.btnAddCustomer) {
			LOGGER.debug("add pressed");
			addCustomer();
		} else if (e.getSource() == formMain.btnAddtoTransaction) {
			if (selectedDvd != null && selectedCustomer != null) {
				addTransaction();
			}
		} else if (e.getSource() == formMain.btnLend) {
			if (!formMain.transactinTblModel.getDataVector().isEmpty()) {
				for (Transaction transaction : formMain.transactinTblModel
						.getDataVector()) {
					dao.addEntity(transaction);
				}
			}
		} else if (e.getSource() == formMain.btnRemoveTransaction) {
			int selectedIndex = formMain.tblTransaction.getSelectedRow();
			formMain.transactinTblModel.getDataVector().removeElementAt(
					selectedIndex);
			formMain.transactinTblModel.fireTableDataChanged();
		} else if (e.getSource() == formMain.btnReturn) {
			for (Transaction transaction : formMain.transactinTblModel
					.getDataVector()) {
				dao.removeEntity(transaction);
			}
		} else if (e.getSource() == formMain.btnOk) {
			saveTransaction();
			clearTxt(new JTextField[] { formMain.txtContact,
					formMain.txtCustId, formMain.txtCustName, formMain.txtEmail });
		} else if (e.getSource() == formMain.btnExit) {
			System.exit(0);
		}
	}