Esempio n. 1
0
        public IActionResult GetDistinctBankAgencies(int idUser)
        {
            var bankAgencies    = _accountStatementImportService.GetDistinctBankAgencies(idUser);
            var bankAgenciesDto = _mapper.Map <IEnumerable <BankAgencyForListDto> >(bankAgencies);

            return(Ok(bankAgenciesDto));
        }
Esempio n. 2
0
        public FilterAsiTable GetFilterAsiTable(FilterAsiTableSelected filter)
        {
            FilterAsiTable filterAsiTable = new FilterAsiTable();

            filterAsiTable.Selected = filter;

            var BankAgencies    = _accountStatementImportService.GetDistinctBankAgencies(filter.IdUser.Value);
            var BankAgenciesDto = _mapper.Map <List <BankAgencyDto> >(BankAgencies);

            filterAsiTable.BankAgencies = BankAgenciesDto;

            filterAsiTable.Selected.IdBankAgency = BankAgenciesDto.Count == 0 ? null : filter.IdBankAgency == null ? BankAgenciesDto[0].Id : filter.IdBankAgency;

            return(filterAsiTable);
        }