private void BtnGuardar_Click(object sender, EventArgs e) { string msj; if (id == null) { msj = obj.Insert(txtNombre.Text, txtApellido.Text, Convert.ToInt32(txtDni.Text), txtTelefono.Text, txtEmail.Text, dpFechaIngreso.Value, Convert.ToInt32(cbMedico.SelectedValue)); MessageBox.Show(msj, "Clinica", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { msj = obj.Edit(id, txtNombre.Text, txtApellido.Text, Convert.ToInt32(txtDni.Text), txtTelefono.Text, txtEmail.Text, dpFechaIngreso.Value, Convert.ToInt32(cbMedico.SelectedValue)); MessageBox.Show(msj, "Clinica", MessageBoxButtons.OK, MessageBoxIcon.Information); } this.Close(); }