Subo Cambio 555

This commit is contained in:
Michael Robles
2024-02-03 05:55:59 -07:00
parent e71b7042aa
commit 080e4640be
15 changed files with 107 additions and 4 deletions
+18
View File
@@ -26,6 +26,8 @@ namespace compabetov2
InitializeComponent();
llenarPanel();
this.loginPrincipal = loginPrincipal;
txtTelefono.KeyPress += new KeyPressEventHandler(txtTelefono_KeyPress);
}
private void InitializePanelEnvio()
@@ -417,5 +419,21 @@ namespace compabetov2
Estadiscticas verstats = new Estadiscticas();
verstats.Show();
}
private void txtTelefono_TextChanged(object sender, EventArgs e)
{
}
private void txtTelefono_KeyPress(object sender, KeyPressEventArgs e)
{
// Verificar si la tecla presionada no es un número o la tecla de retroceso
if (!char.IsDigit(e.KeyChar) && e.KeyChar != 8)
{
e.Handled = true; // Ignorar la tecla presionada
// Mostrar un mensaje indicando que solo se permiten números
MessageBox.Show("Por favor, ingrese solo números en el teléfono.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}