private void button1_Click(object sender, EventArgs e) { ProductoFinal pf = new ProductoFinal(); pf.Show(); this.Close(); }
private void bt_ingresar_Click(object sender, EventArgs e) { if (ValidarCampos()) { if (db.SiExiste("InventarioProducto", "Nom_Producto", txtNombre.Text) == false) { MessageBox.Show("Ya hay un producto con este nombre", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { int categoria = cb_categoria.SelectedIndex + 1; int estado = cb_activo.SelectedIndex + 1; string agregar = "INSERT INTO InventarioProducto VALUES('" + txtNombre.Text + "'," + txtPrecio.Text + "," + txtCantidad.Text + "," + categoria + "," + obtenerEstado() + ")"; if (db.Insertar(agregar)) { MessageBox.Show("Producto Agregado", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); pf.Show(); } else { MessageBox.Show("No se pudo agregar el Producto", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } else { } }
private void bunifuImageButton2_Click(object sender, EventArgs e) { this.Close(); pf.Show(); }
private void bt_cancelar_Click(object sender, EventArgs e) { pf.Show(); this.Close(); }