public async Task <IActionResult> Edit(int id, [Bind("ID,Nome")] ConhecaANina conhecaANina)
        {
            if (id != conhecaANina.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(conhecaANina);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ConhecaANinaExists(conhecaANina.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(conhecaANina));
        }
예제 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Catergoria,Item,Valor,Status")] Orcamento orcamento)
        {
            if (id != orcamento.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(orcamento);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!OrcamentoExists(orcamento.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(orcamento));
        }
예제 #3
0
        public async Task<IActionResult> Edit(int id, [Bind("ID,Data,Nome,Valor")] UltDoa ultDoa)
        {
            if (id != ultDoa.ID)
            {
                return NotFound();
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ultDoa);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UltDoaExists(ultDoa.ID))
                    {
                        return NotFound();
                    }
                    else
                    {
                        throw;
                    }
                }
                return RedirectToAction(nameof(Index));
            }
            return View(ultDoa);
        }
예제 #4
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,A")] doacao doacao)
        {
            if (id != doacao.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(doacao);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!doacaoExists(doacao.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(doacao));
        }
예제 #5
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Nome,Email,Telefone,Mensagem")] Feedback feedback)
        {
            if (id != feedback.ID)
            {
                return(NotFound());
            }

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