Example #1
0
        public async Task <IActionResult> FinalizarRodada(int id)
        {
            var sqlRodada = new SqlRodadaData(_context);
            await sqlRodada.UpdateRodadaAtual();

            sqlRodada.UpdateRodadaId(id);
            return(Redirect("/"));
        }
Example #2
0
        public async Task <IActionResult> RodadaAtual()
        {
            var sqlRodada = new SqlRodadaData(_context);

            if (Math.Abs(DateTime.Now.Second - Globals.UpdateSecond) > 15)
            {
                Globals.UpdateSecond = DateTime.Now.Second;
                sqlRodada.UpdateRodadaAtual().Wait();
                Globals.UpdateSecond = DateTime.Now.Second;
            }
            var info = sqlRodada.GetInfoRodadaAtual();

            return(View("rodadaatual", info));
        }