public HttpResponseMessage SearchRequest() { searchViewModel = new SearchViewModel(); searchSerObj = new SearchService(); try { baseModel = CacheObjectWrapper.Exists("SearchFilters") ? baseModel = CacheObjectWrapper.Get <BaseModel>("SearchFilters") : searchSerObj.GetRequestFilterValues(); baseModel = searchSerObj.GetRequestFilterValues(); searchViewModel.Area = baseModel.Area; searchViewModel.CountryList = baseModel.CountryList; searchViewModel.LeadAI = baseModel.LeadAI; searchViewModel.RequestType = baseModel.RequestType; searchViewModel.Status = baseModel.Status; searchViewModel.SubStatus = baseModel.SubStatus; return(Request.CreateResponse(HttpStatusCode.OK, searchViewModel)); } catch (Exception ex) { NameValueCollection additionalInfo = new NameValueCollection(); additionalInfo.Add("PageName", "Search"); ExceptionManager.Publish(ex, additionalInfo); //Message = errMessages.GetString("Error in loading search realted filters"); errEntity.ErrorNumber = 420; errEntity.ErrorMess = "Error in SearchRequest method of Search controller"; searchViewModel.ErrorBE = errEntity; return(Request.CreateResponse(HttpStatusCode.OK, searchViewModel)); } }
public HttpResponseMessage GetLeadAI(string direct) { coreRangeViewModel = new CoreRangeViewModel(); try { coreRangeServ = new CoreRangeService(); coreRangeViewModel.LeadAIList = coreRangeServ.GetLeadUICode(); CacheObjectWrapper.Add("CoreRangeDirect", direct); return(Request.CreateResponse(HttpStatusCode.OK, coreRangeViewModel)); } catch (Exception ex) { NameValueCollection additionalInfo = new NameValueCollection(); additionalInfo.Add("PageName", "CoreRange"); ExceptionManager.Publish(ex, additionalInfo); Message = "Error in GetLeadAI method of Corerange controller"; errEntity.ErrorNumber = 420; errEntity.ErrorMess = Message; coreRangeViewModel.ErrorBE = errEntity; return(Request.CreateResponse(HttpStatusCode.OK, coreRangeViewModel)); } }