public async Task <IActionResult> Edit(int id, [Bind("Id,Transaction_Id,Notification_Rule,Message")] Notification notification) { if (id != notification.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(notification); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NotificationExists(notification.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(notification)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Account_Type,Nickname,Interest_rate,Balance")] Account account) { if (id != account.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(account); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AccountExists(account.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(account)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Account_Id,TimeStamp,Type,Description,Amount,Balance_After")] Financial_Transaction financial_Transaction) { if (id != financial_Transaction.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(financial_Transaction); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Financial_TransactionExists(financial_Transaction.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(financial_Transaction)); }
public async Task <IActionResult> Edit(string id, [Bind("Id,First_Name,Last_Name,Date_Of_Birth,Address,City,State,Zip")] Customer_Info customer_Info) { if (id != customer_Info.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(customer_Info); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Customer_InfoExists(customer_Info.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(customer_Info)); }
public async Task <IActionResult> Edit(string id, [Bind("Id,UserName,NormalizedUserName,Email,NormalizedEmail,EmailConfirmed,PasswordHash,SecurityStamp,ConcurrencyStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEnd,LockoutEnabled,AccessFailedCount")] AspNetUsers aspNetUsers) { if (id != aspNetUsers.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(aspNetUsers); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AspNetUsersExists(aspNetUsers.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(aspNetUsers)); }