private void EditEmploymentButton_Click(object sender, EventArgs e) { this.Hide(); Employment selected = (Employment)EmploymentOptionsComboBox.SelectedItem; var editEmploymentForm = new EditEmploymentForm(selected); editEmploymentForm.ShowDialog(); UpdateEmploymentOptionsComboBox(); this.Show(); }
private void AddNewEmploymentButton_Click(object sender, EventArgs e) { var newEmployment = new Employment(); newEmployment = GlobalConfig.Connection.AddNewEmployment(newEmployment); this.Hide(); var editEmploymentForm = new EditEmploymentForm(newEmployment); editEmploymentForm.ShowDialog(); UpdateEmploymentOptionsComboBox(); this.Show(); }