/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCreate_Click(object sender, EventArgs e) { string firstName = txtFirstName.Text; string lastName = txtLastName.Text; string position = txtPosition.Text; int age = Convert.ToInt32(txtAge.Text); Person newPerson = new Person(firstName, lastName, position, age); try { personDAO.CreateObjectInDB(newPerson); RefreshList(); } catch (Exception err) { MessageBox.Show(err.ToString()); } }