예제 #1
0
        private void HandleOfficialsPage()
        {
            var reportCode = string.Empty;

            if (StateCache.IsValidStateOrFederalCode(GetQueryParm("Report"), false))
            {
                reportCode = GetQueryParm("Report")
                             .ToUpper();
            }
            else
            {
                var stateCode = UrlManager.FindStateCode();
                if (StateCache.IsValidStateCode(stateCode) ||
                    StateCache.IsValidFederalCode(stateCode, false))
                {
                    reportCode = stateCode;
                }
            }

            if (!string.IsNullOrEmpty(reportCode))
            {
                NormalizedUri = UrlManager.GetOfficialsPageUri(reportCode,
                                                               GetQueryParm("County"), GetQueryParm("Local"));
                _IsCanonicalUsa = !StateCache.IsValidStateCode(reportCode);
            }
            else
            {
                ErrorMessage = "The Report code could not be identified.";
            }
        }