Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,ShowName,Description")] AwardShow awardShow)
        {
            if (id != awardShow.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(awardShow);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AwardShowExists(awardShow.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(awardShow));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("Id,ShowName,Description")] AwardShow awardShow)
        {
            if (ModelState.IsValid)
            {
                _context.Add(awardShow);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(awardShow));
        }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PokemonId != 0)
            {
                hash ^= PokemonId.GetHashCode();
            }
            if (Level != 0)
            {
                hash ^= Level.GetHashCode();
            }
            if (AwardId != 0)
            {
                hash ^= AwardId.GetHashCode();
            }
            if (AwardType != 0)
            {
                hash ^= AwardType.GetHashCode();
            }
            if (Experience != 0)
            {
                hash ^= Experience.GetHashCode();
            }
            if (LevelIcon.Length != 0)
            {
                hash ^= LevelIcon.GetHashCode();
            }
            if (AwardShow.Length != 0)
            {
                hash ^= AwardShow.GetHashCode();
            }
            if (Desctription.Length != 0)
            {
                hash ^= Desctription.GetHashCode();
            }
            if (SlotIndex != 0)
            {
                hash ^= SlotIndex.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }