Beispiel #1
0
        public async Task <ActionResult <InfoAccount> > PostInfoAccount(InfoAccount infoAccount)
        {
            _context.InfoAccount.Add(infoAccount);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetInfoAccount", new { id = infoAccount.InfoAccountId }, infoAccount));
        }
Beispiel #2
0
        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());
        }
Beispiel #3
0
 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);
     }
 }