示例#1
0
 private static string ReplaceWithLocationData(this string input, ISearchCriteria data)
 {
     if (input.IsNullOrEmpty())
     {
         return(string.Empty);
     }
     return(input.Replace("{STATE}", LocationBc.Instance.GetStateName(data.StateCode())).Replace("{STATE_CODE}", data.StateCode()).Replace("{CITY}", data.City()));
 }
        internal static string GetLookupLocation(ISearchCriteria criteria)
        {
            string result = string.Empty;

            switch (criteria.Depth)
            {
            case SearchDepth.State:
                result = $"{criteria.StateCode()}";
                break;

            case SearchDepth.City:
                result = $"{criteria.City()}, {criteria.StateCode()}";
                break;

            case SearchDepth.Zip:
                result = $"{criteria.Zip()}, {criteria.StateCode()}";
                break;
            }
            return(result);
        }
示例#3
0
 public static string SearchUrl(ISearchCriteria criteria, SearchType searchtype)
 {
     return(searchtype.FluentUrl().State(criteria.StateCode()).Zip(criteria.Zip())
            .City(criteria.City())
            .Url());
 }