Beispiel #1
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Nom,Ville")] Banque banque)
        {
            if (id != banque.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(banque);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BanqueExists(banque.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(banque));
        }
Beispiel #2
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Numero,Type,IdPersonne,IdBanque")] Compte compte)
        {
            if (id != compte.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(compte);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CompteExists(compte.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(compte));
        }
Beispiel #3
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Date,Libelle,Debit,Montant")] Ecriture ecriture)
        {
            if (id != ecriture.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ecriture);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EcritureExists(ecriture.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(ecriture));
        }
Beispiel #4
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Nom,Prenom,DateDeNaissance,Mail")] Personne personne)
        {
            if (id != personne.Id)
            {
                return(NotFound());
            }

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