public boolean insert(DataRow row)
    {
        if(!checkUser())
        {
            return false;
        }
        DataRow parameter = new DataRow(row.getAttribute("name").getValue());
        parameter.setTableName(row.getTableName());
        parameter.addAttribute("userName", getUserName());
        if(!select(parameter).isEmpty())
        {
            ErrorDialog errorDialog = new ErrorDialog(true, "W bazie danych istnieje wpis o podanych parametrach.", "DatabaseManager", "insert(DataRow row)", "row");
            errorDialog.setVisible(true);
            return false;
        }
        boolean result;
        row = addIdentifyingParameters(row);
        DataRow removed = new DataRow(row.getTableName() + row.getAttribute("name").getValue());
        removed.setTableName("removedData");
        removed.addAttribute("tableName", row.tableName);
        removed.addAttribute("objectName", row.getAttribute("name").getValue());
        removed.addAttribute("userName", userName);
        try
        {
            result = local.insert(row);
            if(!local.select(removed).isEmpty())
            {
                local.remove(removed);
            }
            if(server.checkConnection())
            {
                result = result && server.insert(row);
                if(!server.select(removed).isEmpty())
                {
                    server.remove(removed);
                }
            }
        } catch(Exception e) {
            ErrorDialog errorDialog = new ErrorDialog(true, "Błąd operacji w bazie danych: \n" +  e.getMessage(), "DatabaseManager", "insert(DataRow row)", "row");
            errorDialog.setVisible(true);
            result = false;
        }
        return result;
    }