1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using SuperMap.Data;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using WeifenLuo.WinFormsUI.Docking;
- using WWPipeLine.MapBasic;
- using WWPipeLine.MapBasic.Conditions;
- namespace WWPipeLine.MapTools.Conditions.Locations
- {
- public partial class SearchOnSZJPT : ConditionPanel
- {
- private DatasetVector _dv;
- public SearchOnSZJPT()
- {
- this.ConditionPanelName = "按照水质监测点定位";
- this.SetSize(800, 450);
- InitializeComponent();
- }
- protected override void OnLoad(EventArgs e)
- {
- _dv = ComsStatic.Datasource.Datasets["JSSZJPT"] as DatasetVector;
- if (_dv == null)
- {
- Sunny.UI.UIMessageTip.ShowError("当前数据源中不包含相应的矢量数据集", 5000);
- this.ParentForm.Close();
- return;
- }
- if (!ComsStatic.HasField(_dv, "xh") || !ComsStatic.HasField(_dv, "cz") || !ComsStatic.HasField(_dv, "gg") || !ComsStatic.HasField(_dv, "dzms"))
- {
- Sunny.UI.UIMessageTip.ShowError("当前矢量数据集没有相应的信息", 5000);
- this.ParentForm.Close();
- return;
- }
- ComsStatic.BindDataTableOnCheckedListBox(_dv, clbXH, "xh");
- ComsStatic.BindDataTableOnCheckedListBox(_dv, clbCZ, "cz");
- ComsStatic.BindDataTableOnCheckedListBox(_dv, clbGG, "gg");
- ComsStatic.BindDataTableOnCheckedListBox(_dv, clbDZMS, "dzms");
- }
- public override object Do(DockPanel dockPanel = null)
- {
- Dictionary<string, CheckedListBox> dic = new Dictionary<string, CheckedListBox>();
- dic.Add("xh", clbXH); dic.Add("gg", clbGG); dic.Add("cz", clbCZ); dic.Add("dzms", clbDZMS);
- return ComsStatic.QueryDataTable(_dv, ComsStatic.getSqlCheckListBox(dic), ComsStatic.resultFields);
- }
- }
- }
|