Beispiel #1
0
        private async Task <bool> FillPersonIdToState(ConcurrentDictionary <string, string> personIdToSateDic, List <Bill> bills, int[] rangeInfo)
        {
            foreach (Bill bill in bills.GetRange(rangeInfo[0], rangeInfo[1]))
            {
                Customer customer = await _customerApiService.GetCustomerAsync(bill.PersonId);

                string state = (customer == null ? STATE_FOR_NOT_REGISTERED_CUSTOMER : customer.State);
                personIdToSateDic.TryAdd(bill.PersonId, state);
            }

            return(true);
        }