Esempio n. 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                var personAccessor = new PersonAccessor();
                string gender = "";
                if (rbMale.Checked == true)
                {
                    gender = "M";
                }
                else
                {
                    gender = "F";
                }

                personAccessor.Update(Convert.ToInt32(txtId.Text),txtFirstName.Text, txtLastName.Text, txtMiddleName.Text, gender);
                txtFirstName.Text = "";
                txtLastName.Text = "";
                txtMiddleName.Text = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }