void Mostrarproducto() { if (txtCodigo.Text.Length > 0) { try { DataTable temp; temp = p.AñandirmasMostrarinfoStock(txtCodigo.Text); if (temp.Rows.Count > 0) { txtNombre.Text = temp.Rows[0][0].ToString(); txtstockActual.Text = temp.Rows[0][1].ToString(); } else { MessageBox.Show("no existe ese producto"); } } catch (Exception ee) { MessageBox.Show("Error consulte con su administrador:" + ee.ToString() + "---Consultar producto"); } } }