/// <summary> /// 承包方变化时候,及时获取其家庭信息以及地块信息 /// </summary> protected void OnCBFEntityChanged() { CBFDatabaseServices db = new CBFDatabaseServices(); CBFFamily = db.GetAllFamily(CBFEntity); CBDKXXDatabaseServices dk = new CBDKXXDatabaseServices(); CBFDK = dk.GetDkByCBF(CBFEntity); }
/// <summary> /// TreeViewItem单击触发Map查询功能 /// </summary> /// <param name="id"></param> private void TreeItemClickExecute(string id) { CBDKXXDatabaseServices dk = new CBDKXXDatabaseServices(); string dkbm = dk.FindDkByCBF(id); QueryTask queryTask = new QueryTask("http://localhost:6080/arcgis/rest/services//fckj/MapServer/0"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; queryTask.Failed += QueryTask_Failed; // 查询,返回地块信息 Query query = new Query(); query.ReturnGeometry = true; query.OutFields.AddRange(new string[] { "DKMC", "ZJRXM" }); // 使用承包方编码查找地块编码,锁定地块 query.Where = string.Format("DKBM='{0}'", dkbm); queryTask.ExecuteAsync(query); }