private void buttonEventAdd_Click(object sender, EventArgs e) { DatabaseWorks database = new DatabaseWorks(Credentials); listBoxMainLog.Items.Add(database.AddEvent( textBoxEventName.Text, textBoxEventShortName.Text, dateTimePickerEventDate.Value, Convert.ToInt32(textBoxEventPplAmount.Text), GetDirCode("Db_Construct", comboBoxEventConstruct.SelectedItem.ToString(), 1), GetDirCode("Db_EventType", comboBoxEventType.SelectedItem.ToString(), 1), GetDirCode("Db_Locale", comboBoxLocaleEvent.SelectedItem.ToString(), 1), GetAddingEventCode())); MainTabUpdate(3); database.Dispose(); }