private void BtnPulsarBotón_Click(object sender, EventArgs e)
        {
            int acumulador = 0;

            Inicio sorteo    = new Inicio();
            int    resultado = sorteo.Sortear();

            if (resultado == 4)
            {
                acumulador = Convert.ToInt32(txtRecibirCantDirectos.Text);
                acumulador = acumulador + 1;

                txtRecibirCantDirectos.Text = acumulador.ToString();

                sorteo.Solicitar_hisopado();
            }
            else if (resultado == 5)
            {
                Enviar_Datos();
            }
            else
            {
                acumulador = Convert.ToInt32(txtRecibirCantSalida.Text);
                acumulador = acumulador + 1;

                txtRecibirCantSalida.Text = acumulador.ToString();

                sorteo.Mostrar_salida();
            }
        }
Exemple #2
0
        private void BtnEnviar_Click(object sender, EventArgs e)
        {
            btnEnviar.Enabled = false;

            Inicio datos = new Inicio();

            int acumulador = 0;
            int contador   = 0;

            if (cmbDolor.Text == "SI")
            {
                contador++;
            }
            if (cmbAgotamiento.Text == "SI")
            {
                contador++;
            }
            if (cmbTos.Text == "SI")
            {
                contador++;
            }

            if (cmbFiebre.Text == "SI" || contador > 1)
            {
                acumulador            = Convert.ToInt32(txtEnviarSintoma.Text);
                acumulador            = acumulador + 1;
                txtEnviarSintoma.Text = acumulador.ToString();

                Enviar_Datos();

                datos.Solicitar_hisopado();
            }
            else
            {
                acumulador           = Convert.ToInt32(txtEnviarSalida.Text);
                acumulador           = acumulador + 1;
                txtEnviarSalida.Text = acumulador.ToString();

                Enviar_Datos();

                datos.Mostrar_salida();
            }
        }