//este metodo recupera los datos y los manda a insertar a la BD private void btnAgegarR_Click(object sender, EventArgs e) { //se crea el participante "en memoria" Participante par = new Participante(); //se asignana los valores par.nombre = text_nombre.Text; par.snumero = txt_numero.Text; par.categoria = this.cb_categoria.SelectedValue.ToString(); par.sclub = txt_club.Text; par.direcc = txt_direccion.Text; par.email = txt_email.Text; par.prueba = txt_prueba.Text; par.id_tag = sTag; par.sexo = "F"; if (this.radioM.Checked) { par.sexo = "M"; } par.pais = tb_pais.Text; //se prepara la conexion a la BD string strConexion = "server=" + cxml.Text("ACUANET/BD/SBD_ip", "127.0.0.1") + ";uid=" + cxml.Text("ACUANET/BD/SBD_usuario", "root") + ";pwd=" + cxml.Text("ACUANET/BD/SBD_passwd", "") + ";database=" + cxml.Text("ACUANET/BD/SBD_bdn", "ntritondb"); //MessageBox.Show(strConexion); ModParticipante modp = new ModParticipante(strConexion); //se crea el particiapante if (modp.crearP(par)) { MessageBox.Show("Se creo correctamente el participante", "Notificacioon", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("No se creo el participante", "Notificacioon", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }