${iServerJava6R_FilterParameter_Tile}

${iServerJava6R_FilterParameter_Description}

        void Chongqing_Loaded()
        {
            GetFeaturesBySQLParameters param = new GetFeaturesBySQLParameters
            {
                DatasetNames = new List<String>() { "A_重庆5万:roalkL" },
                FromIndex = 0,
                ToIndex = 20000
            };

            FilterParameter filterParameters = new FilterParameter();
            filterParameters.Name = "roalkL@A_重庆5万";
            filterParameters.AttributeFilter = "SMID=10";

            param.FilterParameter = filterParameters;

            GetFeaturesBySQLService getFeaturesByGeometryServiceInSelectEditTool = new GetFeaturesBySQLService("http://localhost:8090/iserver/services/data-world/rest/data/featureResults");
            getFeaturesByGeometryServiceInSelectEditTool.ProcessAsync(param);
            getFeaturesByGeometryServiceInSelectEditTool.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(getFeaturesByGeometryServiceInSelectEditTool_ProcessCompleted);
            getFeaturesByGeometryServiceInSelectEditTool.Failed += new EventHandler<ServiceFailedEventArgs>(query_Failed);
        }
        internal static string ToJson(FilterParameter param)
        {
            if (param == null)
            {
                return null;
            }

            string json = "{";
            List<string> list = new List<string>();

            if (!string.IsNullOrEmpty(param.Name))
            {
                list.Add(string.Format("\"name\":\"{0}\"", param.Name));
            }
            else
            {
                list.Add("\"name\":null");
            }

            if (!string.IsNullOrEmpty(param.AttributeFilter))
            {
                list.Add(string.Format("\"attributeFilter\":\"{0}\"", param.AttributeFilter));
            }
            else
            {
                list.Add("\"attributeFilter\":null");
            }
            if (!string.IsNullOrEmpty(param.OrderBy))
            {
                list.Add(string.Format("\"orderBy\":\"{0}\"", param.OrderBy));
            }
            else
            {
                list.Add("\"orderBy\":null");
            }
            if (!string.IsNullOrEmpty(param.GroupBy))
            {
                list.Add(string.Format("\"groupBy\":\"{0}\"", param.GroupBy));
            }
            else
            {
                list.Add("\"groupBy\":null");
            }

            if (param.JoinItems != null && param.JoinItems.Count > 0)
            {
                List<string> temp = new List<string>();
                for (int i = 0; i < param.JoinItems.Count; i++)
                {
                    temp.Add(string.Format("{0}", JoinItem.ToJson(param.JoinItems[i])));
                }
                list.Add(string.Format("\"joinItems\":[{0}]", string.Join(",", temp.ToArray())));
            }
            else
            {
                list.Add("\"joinItems\":null");
            }

            if (param.LinkItems != null && param.LinkItems.Count > 0)
            {
                List<string> temp = new List<string>();
                for (int i = 0; i < param.LinkItems.Count; i++)
                {
                    temp.Add(string.Format("{0}", LinkItem.ToJson(param.LinkItems[i])));
                }
                list.Add(string.Format("\"linkItems\":[{0}]", string.Join(",", temp.ToArray())));
            }
            else
            {
                list.Add("\"linkItems\":null");
            }

            if (param.IDs != null && param.IDs.Count > 0)
            {
                List<string> temp = new List<string>();
                foreach (int id in param.IDs)
                {
                    temp.Add(id.ToString(System.Globalization.CultureInfo.InvariantCulture));
                }
                list.Add(string.Format("\"ids\":[{0}]", string.Join(",", temp.ToArray())));
            }

            if (param.Fields != null && param.Fields.Count > 0)
            {
                List<string> temp = new List<string>();
                for (int i = 0; i < param.Fields.Count; i++)
                {
                    temp.Add(string.Format("\"{0}\"", param.Fields[i]));
                }
                list.Add(string.Format("\"fields\":[{0}]", string.Join(",", temp.ToArray())));
            }

            json += string.Join(",", list.ToArray());
            json += "}";
            return json;
        }