public void delete() {
		String message = getMessageForDelete();
		if (!message.equals(CHOOSE_MORE_THAN_ONE_STOCK_OWNER)) {
			int choise = JOptionPane.showOptionDialog(frameDBView, message,
					DELETING, JOptionPane.YES_NO_OPTION,
					JOptionPane.PLAIN_MESSAGE, null, new String[] { YES, NO },
					null);
			if (choise == JOptionPane.YES_OPTION) {
				int[] selectedRows = table.getSelectedRows();
				int selectedRowsCount=selectedRows.length;
				 for(int i=0;i<selectedRowsCount; i++) {
					int id = Integer.parseInt((String) table.getValueAt(
							selectedRows[0], 0));
					String resultFromDBAction = new CreateDatabase()
							.changeToInactive(id);
					if (resultFromDBAction.equals(OK)) {
						deleteStocksFromStaticListOwner(id);
						refreshLocal();
					}
					if (!resultFromDBAction.equals(OK)) {
						JOptionPane.showMessageDialog(frameDBView,
								resultFromDBAction + "numurs " + id + " ",
								ERROR, JOptionPane.ERROR_MESSAGE);
					}
				}
			}
		}
	}