private void bunifuThinButton21_Click(object sender, EventArgs e) { LgestionProducto reg = new LgestionProducto(); string registrado = reg.d(nombre); string g = ""; if (txtnombre.Text == "" || cmbtipo.Text == "" || cmbunidad.Text == "" || nudcontenido.Value == 0 || nudcantidad.Value == 0 || txtvalorunidad.Text == "" || txtimbima.Text == "" || cmbempresa.Text == "" || cmbproveedor.Text == "") { MessageBox.Show("los campos de usuario deben contener datos", "Error de acceso", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { LgestionProducto regis = new LgestionProducto(); g = regis.regisproducto(txtnombre.Text, cmbtipo.Text, cmbunidad.Text, nudcontenido.Value, nudcantidad.Value, txtvalorunidad.Text, txtimbima.Text, nombre, nudiva.Value, cmbproveedor.Text); } if (g == "1") { PFechavencimiento cargar = new PFechavencimiento(); LgestionProducto codproducto = new LgestionProducto(); string a = codproducto.codpro(txtnombre.Text); cargar.cedula(a, txtnombre.Text); txtnombre.Text = ""; cmbtipo.Text = ""; cmbunidad.Text = ""; nudcontenido.Value = 0; nudcantidad.Value = 0; txtvalorunidad.Text = ""; txtimbima.Text = ""; nudiva.Value = 0; cmbempresa.Text = ""; cmbproveedor.Text = ""; nudiva.Value = 0; cargar.ShowDialog(); } else { MessageBox.Show("Proveedor no registrado", "Informacion de registro", MessageBoxButtons.OK, MessageBoxIcon.Error); } }