public async Task <IActionResult> Edit(int id, [Bind("Id,Email,Wallet")] EmailwalletTable emailwalletTable)
        {
            if (id != emailwalletTable.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(emailwalletTable);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmailwalletTableExists(emailwalletTable.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(emailwalletTable));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Email")] Subscribers subscribers)
        {
            if (id != subscribers.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(subscribers);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SubscribersExists(subscribers.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(subscribers));
        }
Exemple #3
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Email,Wallet,Usertype,Amount,DonateTime")] Donations donations)
        {
            if (id != donations.Id)
            {
                return(NotFound());
            }

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