public async Task <IActionResult> Edit(int id, [Bind("ClientTradingProfileID,ClientTradingProfileName,ClientCurrencyNameOut,TradeDate,ClientAmountUncompleted,ClientAmountUncompletedUSD,Rate")] ReportAccountPayable reportAccountPayable) { if (id != reportAccountPayable.ClientTradingProfileID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reportAccountPayable); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReportAccountPayableExists(reportAccountPayable.ClientTradingProfileID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(reportAccountPayable)); }
public async Task <IActionResult> Create([Bind("ClientTradingProfileID,ClientTradingProfileName,ClientCurrencyNameOut,TradeDate,ClientAmountUncompleted,ClientAmountUncompletedUSD,Rate")] ReportAccountPayable reportAccountPayable) { if (ModelState.IsValid) { _context.Add(reportAccountPayable); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(reportAccountPayable)); }