public int Update(int id, Customer customer) { _context.Update(customer); _context.SaveChanges(); return(id); }
public int Update(int id, Account account) { _context.Update(account); _context.SaveChanges(); return(id); }
public string Update(string id, Login login) { _context.Update(login); _context.SaveChanges(); return(id); }
public int Update(int id, BillPay billPay) { _context.Update(billPay); _context.SaveChanges(); return(id); }
public int Update(int id, Address address) { _context.Update(address); _context.SaveChanges(); return(id); }
public async Task <IActionResult> Edit(int id, [Bind("CustomerID,CustomerName,TFN,Address,City,State,PostCode,Phone,Status")] Customer customer) { if (id != customer.CustomerID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(customer); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomerExists(customer.CustomerID)) { return(NotFound()); } else { throw; } } // Set customer name session variable to updated value HttpContext.Session.SetString(nameof(Customer.CustomerName), customer.CustomerName); return(RedirectToAction(nameof(MyProfile))); } return(View(customer)); }
public int Update(int id, LoginAttempt loginAttempt) { _context.Update(loginAttempt); _context.SaveChanges(); return(id); }
public int Update(int id, Login login) { _context.Update(login); _context.SaveChanges(); return(id); }
public int Update(int id, Transaction transaction) { _context.Update(transaction); _context.SaveChanges(); return(id); }
public int Update(int id, Login user) { var newUser = _context.Logins.Find(user.UserID); if (newUser.IsLocked) { newUser.IsLocked = false; } else { newUser.IsLocked = true; } _context.Update(newUser); _context.SaveChanges(); return(id); }
public int Update(int id, BillPay item) { var newBillpay = _context.BillPays.Find(id); if (newBillpay.IsLocked) { newBillpay.IsLocked = false; } else { newBillpay.IsLocked = true; } _context.Update(newBillpay); _context.SaveChanges(); return(id); }