private void FRM_Cbza_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyValue)//Seleccionar el la funcion de acuerdo ala tecla presionada. { case 27: FRM_ConsultarArticulos wndBuscarArt = new FRM_ConsultarArticulos(); wndBuscarArt.ShowDialog(this); if (wndBuscarArt.ArticuloId.Trim() != "") //Si el articulo id es diferente a vacion { txtCodigo.Text = wndBuscarArt.ArticuloId; //le pasamos el textbox codigo el id del articulo txtCodigo.Focus(); } break; case 112: //F1 if (Total > 0) //VALIDAMOS SI HAY COBRANZA ANTES DE MOSTRAR EL TOTAL { FRM_Total wndTotal = new FRM_Total(); wndTotal.Total = Total; //Lista de articulo para imprimir System.PuntoDeVentas.ArticulosParaImprimir = tblArticulosList; wndTotal.ShowDialog(this); if (wndTotal.IsCancelled == false) //si la transaccion no fue borrada { GuardarTrans(); //Guardamos la transaccion en la Bd. BorrarCuenta(); } } else { Funciones.Message("NO HAY ARTICULOS POR COBRAR!"); } break; case 113: //F2 FRM_AgregarArticulo wndAgregarArt = new FRM_AgregarArticulo(); wndAgregarArt.ShowDialog(this); break; case 114: //F3 FRM_CorteDeCaja wndCorteDeCaja = new FRM_CorteDeCaja(); wndCorteDeCaja.ShowDialog(this); break; case 115: //F4 this.Close(); break; case 116: //F5 txtCantidad.Focus(); break; case 117: //F6 txtCodigo.Focus(); break; case 118: //F7 if (Total > 0) { if (MessageBox.Show("Desea cancelar la transaccion?", "Cancelar Transaccion?", MessageBoxButtons.YesNo) == DialogResult.Yes) { BorrarCuenta(); Funciones.Message("TRANSACCION CANCELADA!"); } } break; case 119: FRM_VentaDelDia wndVentaDelDia = new FRM_VentaDelDia(); wndVentaDelDia.ShowDialog(this); break; } }
private void agregarArticuloToolStripMenuItem_Click(object sender, EventArgs e) { FRM_AgregarArticulo wndArticulos = new FRM_AgregarArticulo(); wndArticulos.ShowDialog(this); }