public async Task <AgencyExceptedModel> GetAgencyExceptedById(string Id) { AgencyExceptedModel purchaseModel = await _iDMAppService.GetAgencyExceptedById(Id); if (string.IsNullOrEmpty(purchaseModel.PurchaseMethodString)) { return(purchaseModel); } purchaseModel.PurchaseMethods = purchaseModel.PurchaseMethodString.Split(',').ToList().Select(r => int.Parse(r)).ToList(); foreach (PurchaseMethodsModel tm in purchaseModel.TenderTypes) { foreach (int pm in purchaseModel.PurchaseMethods) { if (tm.PurchaseMethodId == pm) { tm.IsSelected = true; } } } return(purchaseModel); }