Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Title,url,Minister,HgrmDataID")] hgrmAudioMessage hgrmAudioMessage)
        {
            if (id != hgrmAudioMessage.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(hgrmAudioMessage);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!hgrmAudioMessageExists(hgrmAudioMessage.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            ViewData["HgrmDataID"] = new SelectList(_context.HgrmData, "ID", "ID", hgrmAudioMessage.HgrmDataID);
            return(View(hgrmAudioMessage));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,Title,url,Minister")] YwaviAudioMessages ywaviAudioMessages)
        {
            if (id != ywaviAudioMessages.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ywaviAudioMessages);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!YwaviAudioMessagesExists(ywaviAudioMessages.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(ywaviAudioMessages));
        }