Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] SunRisesHyderabad sunRisesHyderabad)
        {
            if (id != sunRisesHyderabad.Player)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(sunRisesHyderabad);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SunRisesHyderabadExists(sunRisesHyderabad.Player))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(sunRisesHyderabad));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] KolkataKnightRider kolkataKnightRider)
        {
            if (id != kolkataKnightRider.Player)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(kolkataKnightRider);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KolkataKnightRiderExists(kolkataKnightRider.Player))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(kolkataKnightRider));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,Matches,Catches")] TopFielder topFielder)
        {
            if (id != topFielder.Player)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(topFielder);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TopFielderExists(topFielder.Player))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(topFielder));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("MatchId,Team1,Team2,Result")] Match match)
        {
            if (id != match.MatchId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(match);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MatchExists(match.MatchId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(match));
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> Edit(string id, [Bind("TeamId,Teams,Matches,Won,Lost,Tied,Points,Nrr,Nrrposition")] PointsTable pointsTable)
        {
            if (id != pointsTable.Teams)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(pointsTable);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PointsTableExists(pointsTable.Teams))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(pointsTable));
        }
Ejemplo n.º 6
0
        public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] ChennaiSuperKing chennaiSuperKing)
        {
            if (id != chennaiSuperKing.Player)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(chennaiSuperKing);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ChennaiSuperKingExists(chennaiSuperKing.Player))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(chennaiSuperKing));
        }
Ejemplo n.º 7
0
        public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] RoyalChallengersBanglore royalChallengersBanglore)
        {
            if (id != royalChallengersBanglore.Player)
            {
                return(NotFound());
            }

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