示例#1
0
 private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
 {
     objValidaciones.Numeros(e);
     if (e.KeyChar == Convert.ToChar(Keys.Enter))
     {
         recibo = Int32.Parse(textBox1.Text);
         if (recibo == total)
         {
             cambio = 0;
         }
         else if (recibo > total)
         {
             cambio = recibo - total;
         }
         else if (recibo < total)
         {
             cambio = total - recibo;
             lblCambio.BackColor = Color.Red;
         }
         lblCambio.Text = cambio.ToString();
     }
 }
示例#2
0
 private void txtExistencia_KeyPress(object sender, KeyPressEventArgs e)
 {
     va.Numeros(e);
 }