public async Task <IActionResult> Edit(string id, [Bind("CustomerID,LastAmount,Balance")] Deposit deposit) { if (id != deposit.CustomerID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(deposit); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DepositExists(deposit.CustomerID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(deposit)); }
public async Task <IActionResult> Edit(int id, [Bind("OrderID,CustomerCID,PriceAmount,TansportAmount,AdvanceBalance")] Order order) { if (id != order.OrderID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(order); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrderExists(order.OrderID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(order)); }
public async Task <IActionResult> Edit(int id, [Bind("ProductID,ProductName,Price,Rate")] Product product) { if (id != product.ProductID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(product); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductExists(product.ProductID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async void Update(Site site) { _context.Update(site); await _context.SaveChangesAsync(); }
public async void Update(Customer customer) { _context.Update(customer); await _context.SaveChangesAsync(); }