/// <summary> /// Get Assigned Payers of a client /// </summary> /// <param name="clientCode"></param> /// <returns></returns> public ClientPayerViewModelList GetClientPayers(string clientCode) { ClientPayerViewModelList clientPayerViewModelList = new ClientPayerViewModelList(); try { List <ClientPayerViewModel> clientPayers = new List <ClientPayerViewModel>(); List <BusinessModel.BusinessModels.ClientPayer> clientPayersDTO = _payerRepository.GetClientPayers(clientCode); if (clientPayersDTO != null && clientPayersDTO.Count > 0) { clientPayers = BusinessMapper.ConstructViewModelFromClientPayerDTO(clientPayersDTO); clientPayerViewModelList.ListOfClientPayerViewModel = clientPayers; clientPayerViewModelList.Success = true; } } catch (Exception ex) { _logger.Log(ex, LogLevel.Error, ex.Message); clientPayerViewModelList.Success = false; clientPayerViewModelList.IsExceptionOccured = true; clientPayerViewModelList.ErrorMessages.Add(BusinessConstants.ERROR_GET_DETAILS); } return(clientPayerViewModelList); }