Esempio n. 1
0
        public HttpResponseMessage GetFavouritePlaces()
        {
            if (IsTokenAuthenticated())
            {
                List <FavouritePlaceVM> _favouritePlaceVMs = _businessBLL.GetFavouritePlaces(_userId);

                if (_favouritePlaceVMs != null)
                {
                    JSONSuccessResult(_favouritePlaceVMs);
                }
                else
                {
                    _strJSONContent.Append("{\"message\":\"No Business record(s) exists.\"}");
                }
                return(Common.ResponseOutput(_strJSONContent));
            }
            else
            {
                return(Common.ResponseOutput(_strJSONContent));
            }
        }
        public HttpResponseMessage GetFavouritePlaces()
        {
            if (!IsTokenAuthenticated())
            {
                return(ResponseOutput());
            }
            else
            {
                List <FavouritePlaceVM> _favouritePlaceVMs = _businessBLL.GetFavouritePlaces(_userId);

                if (_favouritePlaceVMs != null)
                {
                    String _JSONData = new JavaScriptSerializer().Serialize(_favouritePlaceVMs);
                    _strJSONContent = Business_BLL.GenerateReturnJSONData(_JSONData, "");
                }
                else
                {
                    _strJSONContent.Append("{\"message\":\"No Business record(s) exists.\"}");
                }
                return(ResponseOutput());
            }
        }