${iServer2_GetEntityEventArgs_Title}

${iServer2_GetEntityEventArgs_Description}

Inheritance: SuperMap.Web.Service.ServiceEventArgs
 private void request_Completed(object sender, RequestEventArgs e)
 {
     JsonObject jsonObject = (JsonObject)JsonObject.Parse(e.Result);
     Entity result = Entity.FromJson(jsonObject);
     LastResult = result;
     GetEntityEventArgs args = new GetEntityEventArgs(result, e.Result, e.UserState);
     OnProcessCompleted(args);
 }
        //获取选中地物属性
        private void getEntityService_ProcessCompleted(object sender, GetEntityEventArgs e)
        {
            //隐藏DataGrid
            dgVegetable.Visibility = Visibility.Collapsed;

            //将得到的地物当前属性与DataGrid绑定
            listVegetable = new List<VegetableData>();
            listVegetable.Add(new VegetableData()
            {
                SmID = e.Result.FieldValues[0],
                SmUserID = e.Result.FieldValues[1],
                SmArea = e.Result.FieldValues[2],
                SmPerimeter = e.Result.FieldValues[3],
                ClassID = e.Result.FieldValues[4]
            });
            dgVegetable.ItemsSource = listVegetable;

            //显示DataGrid,由于SmID、SmArea(面积)、SmPerimeter(周长)不能修改故设置这三项为只读
            dgVegetable.Visibility = Visibility.Visible;
            dgVegetable.Columns[0].IsReadOnly = true;
            dgVegetable.Columns[2].IsReadOnly = true;
            dgVegetable.Columns[3].IsReadOnly = true;

            //获取选中地物的几何信息、属性表字段和地物ID号,为更新地物做准备
            entityID = e.Result.ID;
            getEntityFieldNames = e.Result.FieldNames;
            shape = e.Result.Shape;

            //编辑地物形状
            SuperMap.Web.Actions.Edit editEntity = new SuperMap.Web.Actions.Edit(MyMap, drawLayer);
            MyMap.Action = editEntity;
            editEntity.GeometryEdit += new EventHandler<SuperMap.Web.Actions.Edit.GeometryEditEventArgs>(editEntity_GeometryEdit);
        }
 private void OnProcessCompleted(GetEntityEventArgs args)
 {
     if (ProcessCompleted != null)
     {
         Application.Current.RootVisual.Dispatcher.BeginInvoke(ProcessCompleted, new object[] { this, args });
     }
 }