private void txtCodProd_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Convert.ToInt32(Keys.Enter)) { if (!BuscarProducto()) { var form = new FormBuscarProducto(); form.ShowDialog(); if (form.producto != null) { CleanProducto(); SetProducto(form.producto); } } } }
private void btnproductos_Click(object sender, EventArgs e) { FormBuscarProducto frm = new FormBuscarProducto(); frm.ShowDialog(); }