${iServerJava6R_QueryBySQlService_Tile}

${iServerJava6R_QueryBySQlService_Description}

Inheritance: QueryService
        //点击查询按钮触发
        private void QueryBySQL_Click(object sender, RoutedEventArgs e)
        {
            //隐藏 FeatureDataGrid 控件
            MyDataGrid.Visibility = Visibility.Collapsed;

            //设置 SQL 查询参数,FilterParameters为必设属性
            QueryBySQLParameters param = new QueryBySQLParameters()
            {
                FilterParameters = new List<FilterParameter>() 
                {
                    new FilterParameter()
                    {
                        //Name 为必设属性
                        Name = "Countries@World", 
                        
                        //SQL 查询条件,从文本框中获取用户输入的查询条件
                        AttributeFilter = MyTextBox.Text 
                    }
                },

                //设置是返回查询结果资源(false)还是返回查询结果记录集(true)
                ReturnContent = notHighlight
            };

            //与服务器交互
            QueryBySQLService service = new QueryBySQLService(url);
            service.ProcessAsync(param);
            service.ProcessCompleted += new EventHandler<QueryEventArgs>(service_ProcessCompleted);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);

        }
        //离散点插值分析
        private void cretePointsAnalyst_Click(object sender, RoutedEventArgs e)
        {
            ClearLayers();
            MyProgressBar.Storyboard1.Begin();
            MyProgressBar.Visibility = Visibility.Visible;
            //设置 SQL 查询参数,FilterParameters为必设属性
            QueryBySQLParameters param = new QueryBySQLParameters()
            {
                FilterParameters = new List<FilterParameter>()
                {
                    new FilterParameter()
                    {
                        //Name 为必设属性
                        Name = "SamplesP@Interpolation",

                        //SQL 查询条件,从文本框中获取用户输入的查询条件
                        AttributeFilter = "SMID>0"
                    }
                },

                //设置是返回查询结果资源(false)还是返回查询结果记录集(true)
                ReturnContent = true
            };

            //与服务器交互
            QueryBySQLService sqlService = new QueryBySQLService(mapUrl);
            sqlService.Failed += new EventHandler<SuperMap.Web.Service.ServiceFailedEventArgs>(excuteErrors);
            sqlService.ProcessCompleted += new EventHandler<QueryEventArgs>(sqlService_ProcessCompleted);
            sqlService.ProcessAsync(param);
        }
        private void DouUiqueRenderSearch( )
        {
            List<FilterParameter> list = new List<FilterParameter>();

            list.Add(new FilterParameter
            {
                Name = "Countries@World" ,
                AttributeFilter = "SmID=39 OR SmID=45 OR SmID=54"
            });

            QueryBySQLParameters parameters = new QueryBySQLParameters
            {
                FilterParameters = list
            };

            QueryBySQLService service = new QueryBySQLService(this.url);
            service.ProcessAsync(parameters);
            service.ProcessCompleted += new EventHandler<QueryEventArgs>(this.service_ProcessCompleted);
            service.Failed += new EventHandler<SuperMap.Web.Service.ServiceFailedEventArgs>(service_Failed);
        }
        //进行SQL查询
        public void Query(string mapName, string layerName, string attributeFilter, string text)
        {
            tooltipText = text;
            QueryBySQLParameters param = new QueryBySQLParameters()
            {
                FilterParameters = new List<FilterParameter>()
                {
                    new FilterParameter()
                    {
                        Name = layerName,
                        AttributeFilter = attributeFilter,
                    }

                },
                ReturnContent = true,
            };

            QueryBySQLService service = new QueryBySQLService(url + mapName);
            service.ProcessAsync(param);
            service.ProcessCompleted += new EventHandler<SuperMap.Web.iServerJava6R.QueryEventArgs>(service_ProcessCompleted);
            service.Failed +=new EventHandler<SuperMap.Web.Service.ServiceFailedEventArgs>(service_Failed);
        }
        private void a2_Click(object sender, RoutedEventArgs e)
        {
            QueryBySQLParameters param1 = NewMethod1();

            QueryBySQLService service1 = new QueryBySQLService(url);
            service1.ProcessAsync(param1);
            service1.ProcessCompleted += new EventHandler<QueryEventArgs>(service1_ProcessCompleted);
            service1.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
        }
        private void a1_Click(object sender, RoutedEventArgs e)
        {
            QueryBySQLParameters param = SetParameters();

            QueryBySQLService service = new QueryBySQLService(url);
            service.ProcessAsync(param);
            service.ProcessCompleted += new EventHandler<QueryEventArgs>(service_ProcessCompleted);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
        }
 private void myQueryBySQL_Click(object sender, RoutedEventArgs e)
 {
     QueryParameters param = new QueryBySQLParameters()
     {
         FilterParameters = new List<FilterParameter>()
         {
             new FilterParameter()
             {
                Name = "World@world",
                AttributeFilter = "SmID=201",
             }
         },
         //ReturnContent = false
     };
     QueryBySQLService service = new QueryBySQLService(url);
     service.ProcessAsync(param);
     service.ProcessCompleted += new EventHandler<QueryEventArgs>(service_ProcessCompleted);
     service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
 }