public bool setExhibit(DataSetMuseum dataSet) { bool result = false; Connection connection = new Connection(); connection.Open(); try { Transaction transaction = connection.BeginTransaction(); try { exhibit = new Exhibit(); exhibit.Save(dataSet, connection, transaction); transaction.Commit(); result = true; } catch (Exception ex) { ShowError(ex.ToString()); transaction.Rollback(); result = false; } } finally { connection.Close(); } return(result); }