public JsonBuilderAreaMapping(AreaMappingParameters parameters) { _parameters = parameters; Parameters = _parameters; }
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; } }
public JsonBuilderAreaMapping(HttpContextBase context) : base(context) { _parameters = new AreaMappingParameters(context.Request.Params); Parameters = _parameters; }