private void btnGuardar_Click_1(object sender, EventArgs e) { string mensaje = ""; FormularioConsultasModelo b = new FormularioConsultasModelo(); b.Nombre = txtNombre.Text; b.ApeidoPaterno = txtApeidoPaterno.Text; b.ApeidoMaterno = txtApeidoMaterno.Text; b.Empresa = txtEmpresa.Text; b.RFC = txtRFC.Text; b.Direccion = txtDireccion.Text; b.NumeroExt = txtNumeroExterior.Text; b.NumeroInt = txtNumeroInterior.Text; b.Colonia = txtColonia.Text; b.CiudadRespuestaAyuda = txtCiudadRespuestaAyuda.Text; b.EstadoRespuestaAyuda = boxEstado.Text; b.CodigoPostal = txtCodigoPostal.Text; b.TelefonoCasa = txtTelefonoCasa.Text; b.Celular = txtCelular.Text; b.Correo1 = txtCorreoPrincipal.Text; b.Correo2 = txtCorreoAdicional.Text; b.AyudaSolicitada = boxInformacionSolicitada.Text; b.Respuesta = boxPersonalAtendio.Text; b.CiudadInteres = txtCiudadInteres.Text; b.MontoInvercion = boxMontoInversion.Text; b.ComoLlegoMensaje = boxDondellegoMensaje.Text; b.Seguimiento = boxStatus.Text; FormularioConsultaCrud fd = new FormularioConsultaCrud(); fd.Ingresar(b); if (mensaje != " ") { txtNombre.Clear(); txtApeidoPaterno.Clear(); txtApeidoMaterno.Clear(); txtEmpresa.Clear(); txtRFC.Clear(); txtDireccion.Clear(); txtNumeroExterior.Clear(); txtNumeroInterior.Clear(); txtColonia.Clear(); txtCiudadRespuestaAyuda.Clear(); txtCodigoPostal.Clear(); txtTelefonoCasa.Clear(); txtCelular.Clear(); txtCorreoPrincipal.Clear(); txtCorreoAdicional.Clear(); txtCiudadInteres.Clear(); boxEstado.SelectedIndex = 0; boxInformacionSolicitada.SelectedIndex = 0; boxMontoInversion.SelectedIndex = 0; boxDondellegoMensaje.SelectedIndex = 0; boxPersonalAtendio.SelectedIndex = 0; id(); fecha(); string dato = Convert.ToString(b.IdCliente); txtId.Text = dato; MessageBox.Show("Datos Guardados correctamente", " ", MessageBoxButtons.OK); } else { MessageBox.Show("Los datos no se han guardado correctamente", " ", MessageBoxButtons.OK); } }