示例#1
0
        // GET: api/WebApiClient/5
        public IHttpActionResult GetOneProject(int id)
        {
            Client C = CS.GetById(id);

            if (C == null)
            {
                return(NotFound());
            }

            return(Ok(C));
        }
示例#2
0
        public async Task <IActionResult> GetMovements(Guid accountNumber)
        {
            AccountMovementResponseDto dto = new AccountMovementResponseDto();

            var bankAccount = await bankAccountServices.GetBankAccountByAccountNumber(accountNumber);

            if (bankAccount == null)
            {
                return(NotFound());
            }
            var client = await clientServices.GetById(bankAccount.ClientId);

            var result = await accountMovementServices.GetMovements(accountNumber);

            var totalAmount = await accountMovementServices.GetTotalAmount(accountNumber);

            dto.FullName        = client.FullName;
            dto.Product         = bankAccount.Product;
            dto.Balance         = totalAmount;
            dto.accountMovement = mapper.Map <IEnumerable <AccountMovementDto> >(result);

            var response = new ApiResponse <AccountMovementResponseDto>(dto);

            return(Ok(response));
        }
示例#3
0
 public async Task <Client> Get()
 {
     return(await _clientServices.GetById(1));
 }
示例#4
0
        public ClientViewModel Get(Guid key)
        {
            var resultService = _clientServices.GetById(key);

            return(_mapper.Map <ClientViewModel>(resultService));
        }
示例#5
0
        public ActionResult <Client> GetById(int id)
        {
            var client = _clientService.GetById(id);

            return(Ok(client));
        }