private void btnIngresar_Click(object sender, EventArgs e) { String strCodigo = tbCodigo.Text; String strDescripcion = tbDescripcion.Text; String strPrecio = tbPrecio.Text; String strCantidad = tbCantidad.Text; try { productos.InsertarProducto(strCodigo, strDescripcion, strPrecio, strCantidad); MessageBox.Show("Producto ingresado con éxito!", "Mensaje"); tbCodigo.Clear(); tbDescripcion.Clear(); tbPrecio.Clear(); tbCantidad.Clear(); } catch (ExcepcionExisteID ex) { MessageBox.Show(ex.Message, "Error"); } catch (ExcepcionEsVacio ex) { MessageBox.Show(ex.Message, "Error"); } }