public async Task <ActionResult <InfoAccount> > PostInfoAccount(InfoAccount infoAccount) { _context.InfoAccount.Add(infoAccount); await _context.SaveChangesAsync(); return(CreatedAtAction("GetInfoAccount", new { id = infoAccount.InfoAccountId }, infoAccount)); }
public async Task <IActionResult> PutInfoAccount(int id, InfoAccount infoAccount) { if (id != infoAccount.InfoAccountId) { return(BadRequest()); } _context.Entry(infoAccount).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InfoAccountExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
private void InfoClient_OnInfoAccount(InfoAccount account) { if (account.status == RowStatus.ACTIVE && account.type == AccountType.ACC_NORMAL) { accounts[account.code] = account; //firms.Add(account.firm); AvailableAccounts.Add(account.code); } }