Exemplo n.º 1
0
        public void buscarCliente()
        {
            DataSet          resultado        = new DataSet();
            modCliente       modCliente       = new modCliente();
            frmBuscarCliente frmBuscarCliente = new frmBuscarCliente();

            if (IsNumeric(txtIdCliente.Text) == true)
            {
                resultado = modCliente.cargarCliente(txtIdCliente.Text);
                if (resultado.Tables["rsCliente"].Rows.Count > 0)
                {
                    txtNombreCliente.Text = Convert.ToString(resultado.Tables["rsCliente"].Rows[0]["Nombre"]);
                    txtCodigoProducto.Focus();
                }
                else
                {
                    AddOwnedForm(frmBuscarCliente);
                    frmBuscarCliente.ShowDialog();
                }
            }
            else
            {
                AddOwnedForm(frmBuscarCliente);
                frmBuscarCliente.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void txtIdCliente_KeyUp(object sender, KeyEventArgs e)
        {
            frmBuscarCliente frmBuscarCliente = new frmBuscarCliente();

            if (e.KeyCode == Keys.F5)
            {
                AddOwnedForm(frmBuscarCliente);
                frmBuscarCliente.ShowDialog();
            }
            if (e.KeyCode == Keys.F1)
            {
                frmMenuCaja frmMenuCaja = new frmMenuCaja();
                frmMenuCaja.Size      = new Size(1240, 740);
                frmMenuCaja.BackColor = Color.Azure;
                frmMenuCaja.ShowDialog();
            }
        }