コード例 #1
0
 public JsonBuilderAreaMapping(AreaMappingParameters parameters)
 {
     _parameters = parameters;
     Parameters = _parameters;
 }
コード例 #2
0
        public Dictionary<string, IEnumerable<string>> GetParentToChildAreaMapping(int profile_id,
            int child_area_type_id, int parent_area_type_id, string nearest_neighbour_code = null,
            string retrieve_ignored_areas = null)
        {
            try
            {
                NameValueCollection nameValues = new NameValueCollection();
                nameValues.Add(ParameterNames.AreaTypeId, child_area_type_id.ToString());
                nameValues.Add(ParameterNames.ParentAreaTypeId, parent_area_type_id.ToString());
                nameValues.Add(ParameterNames.ProfileId, profile_id.ToString());
                nameValues.Add(ParameterNames.NearestNeighbourCode, nearest_neighbour_code ?? string.Empty);
                nameValues.Add(ParameterNames.RetrieveIgnoredAreas, retrieve_ignored_areas ?? string.Empty);

                var parameters = new AreaMappingParameters(nameValues);
                return new JsonBuilderAreaMapping(parameters).GetParentAreaToChildAreaDictionary();
            }
            catch (Exception ex)
            {
                Log(ex);
                throw;
            }
        }
コード例 #3
0
 public JsonBuilderAreaMapping(HttpContextBase context)
     : base(context)
 {
     _parameters = new AreaMappingParameters(context.Request.Params);
     Parameters = _parameters;
 }