Exemple #1
0
        //Consultas Productos
        private void productosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmBuscaProducto _frmBuscaProducto = new frmBuscaProducto();

            _frmBuscaProducto.StartPosition = FormStartPosition.CenterScreen;
            _frmBuscaProducto.ShowDialog();
        }
 private void btnBuscarProducto_Click(object sender, EventArgs e)
 {
     try
     {
         frmBuscaProducto myForm = new frmBuscaProducto();
         myForm.StartPosition = FormStartPosition.CenterScreen;
         myForm.ShowDialog();
         if (!(myForm.varID_PRODUCTO == ""))
         {
             txtID_PRODUCTO.Text = myForm.varID_PRODUCTO;
             txtID_PRODUCTO.Focus();
         }
         myForm.Dispose();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "btnBuscaProducto", MessageBoxButtons.OK, MessageBoxIcon.Error);
         txtID_PRODUCTO.Text = "";
     }
 }