Ejemplo n.º 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));
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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);
     }
 }