public ActionResult GetServiceRequestByUserId(int userId, string statusCode) { Logger.Info(_logMsg.Clear().SetPrefixMsg("User Monitoring get ServiceRequest by User ID").ToInputLogString()); IEnumerable <ServiceRequestEntity> result = new List <ServiceRequestEntity>(); try { var users = new List <int>(); users.Add(userId); _userMonitoringFacade = new UserMonitoringFacade(); var searchRequest = new ServiceRequestSearchFilter { OwnerUserId = userId, DelegateUserId = userId, StatusCode = statusCode }; result = _userMonitoringFacade.GetServiceRequestList(searchRequest); return(Json(new { IsSuccess = true, data = result, Error = string.Empty })); return(Json(new { IsSuccess = true, data = result, Error = string.Empty })); } catch (Exception ex) { Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto complete Search SubArea (on Mapping)").ToFailLogString()); return(Error(new HandleErrorInfo(ex, this.ControllerContext.RouteData.Values["controller"].ToString(), this.ControllerContext.RouteData.Values["action"].ToString()))); } }
public IEnumerable <ServiceRequestEntity> GetServiceRequestList(ServiceRequestSearchFilter searchFilter) { _serviceRequestDataAccess = new ServiceRequestDataAccess(_context); return(_serviceRequestDataAccess.GetServiceRequestById(searchFilter)); }