예제 #1
0
        public static string BuildUrl(Country country, CommunityPageEnum page = CommunityPageEnum.Default)
        {
            string countryStr = country != null ? country.UrlName : "unknown";

            string url = "/" + countryStr;

            if (page == CommunityPageEnum.Players)
            {
                url += "/players";
            }
            else if (page == CommunityPageEnum.Venues)
            {
                url += "/venues";
            }

            if (IsInIFrame)
            {
                url += "?IsInIFrame=true";
            }
            return(url.ToLower());
        }
예제 #2
0
        public static string BuildUrl(MetroWebModel metro, CommunityPageEnum page = CommunityPageEnum.Default)
        {
            Country countryObj = Country.Get(metro.Country);
            string  countryStr = countryObj != null ? countryObj.UrlName : "unknown";

            string url = "/" + countryStr + "/" + HttpUtility.UrlEncode(metro.UrlName);

            if (page == CommunityPageEnum.Players)
            {
                url += "/players";
            }
            else if (page == CommunityPageEnum.Venues)
            {
                url += "/venues";
            }

            if (IsInIFrame)
            {
                url += "?IsInIFrame=true";
            }
            return(url.ToLower());
        }
예제 #3
0
        public static string BuildUrl(string country, CommunityPageEnum page = CommunityPageEnum.Default)
        {
            Country countryObj = Country.Get(country);

            return(BuildUrl(countryObj, page));
        }