public async Task <ActionResult> AcceptCalls() { var filter = new FilterModel { CompId = CurrentUser.CompanyId, IsExport = false }; if (CurrentUser.UserRole.Contains("Service Provider SC Admin")) { filter.ProviderId = CurrentUser.RefKey; } if (CurrentUser.UserTypeName.ToLower().Contains("center")) { filter.RefKey = CurrentUser.RefKey; } var calls = await _centerRepo.GetCallDetails(filter); calls.Employee = new EmployeeModel(); if (CurrentUser.UserTypeName.ToLower().Contains("center")) { calls.Employee.EmployeeList = new SelectList(await CommonModel.GetEmployeeList(CurrentUser.RefKey), "Name", "Text"); calls.IsAscOrAsp = true; } else if (CurrentUser.UserRole.Contains("Service Provider SC Admin")) { calls.Employee.EmployeeList = new SelectList(await CommonModel.GetEmployeeByProvider(CurrentUser.RefKey), "Name", "Text"); calls.IsAscOrAsp = true; } else { calls.Employee.EmployeeList = new SelectList(await CommonModel.GetEmployeeListByCompany(CurrentUser.CompanyId), "Name", "Text"); } return(View(calls)); }