public async Task <IActionResult> Edit(int id, [Bind("Id,ServiceId,PaymentMethodId,Amount,KaedcUser,Datetime,MeterName,Meternumber,TransactionReference,Hash,PayersName,ApiUniqueReference,GatewayresponseCode,GatewayresponseMessage,Statuscode,StatusMessage,RecipientPhoneNumber,Token,PhcnUnique,PayerIp,AgentProfit,CoordinatorProfit,BrinqProfit,TopUpValue")] Transaction transaction) { if (id != transaction.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(transaction); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TransactionExists(transaction.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PaymentMethodId"] = new SelectList(_context.Paymentmethod, "Id", "Id", transaction.PaymentMethodId); ViewData["ServiceId"] = new SelectList(_context.Service, "Id", "Id", transaction.ServiceId); return(View(transaction)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Description,IsDeleted,IsActive,Wallet,WalletBalance,ServiceProviderPercentage,BrinqFullPercentage,CoordinatorPercentage,AgentPercentage,MinimumSaleAmount,MaxSaleAmount,Imageurl,Createdat,Createdby,Updatedat,Updatedby,ServiceCategoryId,ConvenienceFee")] Service service) { if (id != service.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(service); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ServiceExists(service.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(AllServices))); } return(View(service)); }