private List <TransactionInfo> SearchDoNotCallTransaction(InquireDoNotCallRequest request) { _doNotCallFacade = new DoNotCallFacade(); var cardNo = request.CardNo; var searchFilter = new DoNotCallListSearchFilter { CardNo = cardNo, Telephone = request.PhoneNo, Email = request.Email, PageNo = 1, PageSize = request.DataLimit, ProductCode = request.ProductCode }; if (!string.IsNullOrWhiteSpace(cardNo)) { string code = request.SubscriptionTypeCode; int? subscriptionTypeId = _commonFacade.GetSubscriptTypeByCode(code)?.SubscriptTypeId; if (!subscriptionTypeId.HasValue) { throw new NullReferenceException($"Subscription Type Code: {code} not found."); } else { searchFilter.SubscriptionTypeId = subscriptionTypeId.Value; } } List <TransactionInfo> result = _doNotCallFacade.SearchExactDoNotCallTransaction(searchFilter); return(result); }
public DoNotCallViewModel() { DoNotCallList = new List <DoNotCallSearchResultViewModel>(); SearchFilter = new DoNotCallListSearchFilter(); }