public IActionResult GetSearchedFilters(SaveSearchesRequestData _objReqData)
 {
     try
     {
         string response = string.Empty;
         //SaveSearchesRequestData _objReqData = new SaveSearchesRequestData();
         // string jsonData = JsonConvert.SerializeObject(data);
         // _objReqData = JsonConvert.DeserializeObject<SaveSearchesRequestData>(jsonData);
         if (_objReqData != null)
         {
             response = _sObj.GetSavedSearches(_objReqData);
         }
         return(Ok(new { responseText = response }));
         //return Ok();
     }
     catch (Exception ex) {
         return(BadRequest(ex.Message.ToString()));
     }
 }
Esempio n. 2
0
        public string GetSavedSearches(string DBConnectionString, SaveSearchesRequestData objSavedSearchData)
        {
            string response = string.Empty;

            try
            {
                DataSet _objDsSearch = new DataSet();
                _objDsSearch = DBTask.ExecuteDataset(DBConnectionString, "dh_cl_get_search", objSavedSearchData.SportId, objSavedSearchData.UserId == 0 ? null : objSavedSearchData.UserId, objSavedSearchData.SearchTypeId);
                if (_objDsSearch.Tables != null && _objDsSearch.Tables.Count > 0)
                {
                    response = JSONHelper.FromDataTable(_objDsSearch.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                response = ex.ToString();
            }
            return(response);
        }