Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Placar,DataJogo,MinimoTemporada,MaximoTemporada,QuebraRecordeMaximo,QuebraRecordeMinimo,TemporadaId")] RegistroJogo registroJogo)
        {
            if (id != registroJogo.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(registroJogo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RegistroJogoExists(registroJogo.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(registroJogo));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,TemporadaDescricao")] Temporada temporada)
        {
            if (id != temporada.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(temporada);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TemporadaExists(temporada.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(temporada));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("JogoID,PontoTimeA,PontoTimeB,DataPartida,Resultado")] Ponto ponto)
        {
            if (id != ponto.JogoID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ponto);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PontoExists(ponto.JogoID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(ponto));
        }