private void TxtPrecio4_Leave(object sender, EventArgs e) { TxtPrecio4.Text = Ambiente.FDinero(TxtPrecio4.Text); TxtU4.Text = Ambiente.GetMargen(TxtPrecioCompra.Text, TxtPrecio4.Text); TxtPrecioS4.Text = Ambiente.GetPrecioSalida(TxtPrecio4.Text, impuestos); BtnAgregar.Focus(); }
private void BtnAgregar_Click_1(object sender, EventArgs e) { label1.Hide(); DGVUsuarios.Hide(); BtnAgregar.Hide(); llamarForm(new AgregarUsuarios()); }
private void ValorControl_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { BtnAgregar.Focus(); BtnAgregar_Click(sender, e); } }
private void txtCantidad_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { e.Handled = true; BtnAgregar.PerformClick(); txtBuscarProducto.Focus(); } }
/// <summary> /// Evento que se ejecuta cuando se presiona una tecla en el Control de Importe /// </summary> private void DudImporte_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter || e.Key == Key.Tab) { BtnAgregar.Focus(); return; } string valorControl = DudImporte.Text ?? string.Empty; if (e.Key == Key.Decimal && valorControl.IndexOf('.') > 0) { e.Handled = true; } else if (e.Key >= Key.D0 && e.Key <= Key.D9 || e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9 || e.Key == Key.Decimal || e.Key == Key.OemPeriod) { e.Handled = false; } else { e.Handled = true; } }