public ActionResult ResultStatusList(EventCustomerResultStatusListModelFilter filter = null) { try { long accountId = 0; //if (filter != null && _sessionContext.UserSession.CurrentOrganizationRole.CheckRole((long)Roles.NursePractitioner)) //{ // accountId = _sessionContext.UserSession.CurrentOrganizationRole.OrganizationId; // if (filter.EventId > 0) // { // var isValidEvent = _eventRepository.ValidateEventForAccount(filter.EventId, accountId); // if (!isValidEvent) // Response.RedirectUser("/Home/UnauthorizeAccess"); // } //} var model = filter != null?_testResultService.GetEventCustomerResultStatusList(filter, accountId) : null; if (model != null) { model.Filter = filter; model.RoleId = _sessionContext.UserSession.CurrentOrganizationRole.GetSystemRoleId; } return(View(model)); } catch (Exception ex) { _logger.Error("Error while loading Result Status List for " + (filter != null ? "[" + filter + "]" : "") + ". Message: " + ex.Message + " \n\t Stack Trace:" + ex.StackTrace); return(View()); } }