private void btnBuscar_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtnom.Text) == false) { MessageBox.Show("Llene todos los campos obligatorios"); return; } if (!string.IsNullOrEmpty(txtcant.Text) == false) { MessageBox.Show("Llene todos los campos obligatorios"); return; } if (!string.IsNullOrEmpty(txtUnidad.Text) == false) { MessageBox.Show("Llene todos los campos obligatorios"); return; } int ver = Base_de_datos.validarNomRopa(txtnom.Text); if (ver != 1) { MessageBox.Show("Prenda ya existente"); return; } Base_de_datos.Registro_Ropa(1, txtnom.Text, int.Parse(txtcant.Text), txtUnidad.SelectedItem.ToString()); MessageBox.Show("Prenda Ingresada con exito"); Busqueda_ropa a = new Busqueda_ropa(); Base_de_datos busc = new Base_de_datos(); busc.BuscarRopaNom1(""); a.dataGridView1.DataSource = busc.Mostrar_Resultados(); this.Hide(); }
private void bunifuFlatButton23_Click(object sender, EventArgs e) { Busqueda_ropa a = new Busqueda_ropa(); a.ShowDialog(); }