private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Equals("") || textBox2.Text.Equals("")) { MessageBox.Show("No se pueden dejar campos vacios"); } else { int idBusiness = BusinessNonQuery.BusinessQuery(textBox2.Text); ProductNonQuery.AddProduct(idBusiness, textBox1.Text); } }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Equals("") || textBox2.Text.Equals("") || textBox3.Text.Equals("") || textBox4.Text.Equals("")) { MessageBox.Show("No se pueden dejar campos vacios"); } else { //Agregando producto: ProductNonQuery.AddProduct(textBox1.Text, textBox2.Text, "0", textBox3.Text, textBox4.Text, "0", "0", "0", "0"); //int idProduct = ProductNonQuery.idProduct(textBox1.Text); ProductNonQuery.UpdateProduct(textBox1.Text); } }