Browse Source

去除多余业务逻辑

章政 7 years ago
parent
commit
b4738df80a
3 changed files with 126 additions and 385 deletions
  1. 16 0
      UAS_DeviceMonitor/Entity/Polling.cs
  2. 100 337
      UAS_DeviceMonitor/Main.Designer.cs
  3. 10 48
      UAS_DeviceMonitor/Main.cs

+ 16 - 0
UAS_DeviceMonitor/Entity/Polling.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using UAS_DeviceMonitor.DataOperate;
 
 namespace UAS_DeviceMonitor.Entity
 {
@@ -21,6 +22,8 @@ namespace UAS_DeviceMonitor.Entity
 
         private bool enable;
 
+        private DataHelper dh;
+
         public string DeviceCode
         {
             get
@@ -111,5 +114,18 @@ namespace UAS_DeviceMonitor.Entity
                 id = value;
             }
         }
+
+        public DataHelper Dh
+        {
+            get
+            {
+                return dh;
+            }
+
+            set
+            {
+                dh = value;
+            }
+        }
     }
 }

+ 100 - 337
UAS_DeviceMonitor/Main.Designer.cs

@@ -74,7 +74,7 @@ namespace UAS_DeviceMonitor
             this.dc_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dc_code = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dc_name = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.dc_command = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dc_value = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PageDeviceNetSetting = new DevExpress.XtraTab.XtraTabPage();
             this.ButtonDeleteNetConfig = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
             this.ButtonAddNetConfig = new UAS_DeviceMonitor.CustomerControl.Button.ButtonAddRow();
@@ -99,18 +99,8 @@ namespace UAS_DeviceMonitor
             this.GridPollingSetting = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.GridViewPollSetting = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.PollSettingCheckedColumn = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.dpc_enableCheckEdit = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
             this.dpc_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_decode = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.dpc_plcode = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.PollSettingItemSearchLookUpEdit = new DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit();
-            this.PollSettingItemSearchLookUpEditView = new DevExpress.XtraGrid.Views.Grid.GridView();
-            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.dpc_plname = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_interval = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_dccode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_function = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -119,22 +109,15 @@ namespace UAS_DeviceMonitor
             this.dpc_remark = new DevExpress.XtraGrid.Columns.GridColumn();
             this.POLLSETTINGSTATUSCOLUMN = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PollingSetItemLookUpEdit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
-            this.PagePolling = new DevExpress.XtraTab.XtraTabPage();
-            this.ButtonAddPolling = new UAS_DeviceMonitor.CustomerControl.Button.ButtonAddRow();
-            this.ButtonDeletePolling = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
-            this.ButtonSavePolling = new UAS_DeviceMonitor.CustomerControl.Button.ButtonSaveGrid();
-            this.GridPolling = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
-            this.GridViewPolling = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
-            this.PollingCheckedColumn = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.pl_id = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.pl_code = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.pl_name = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.pl_type = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.pl_dccode = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.pl_remark = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.PollSettingItemSearchLookUpEdit = new DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit();
+            this.PollSettingItemSearchLookUpEditView = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PageDeviceStatus = new DevExpress.XtraTab.XtraTabPage();
-            this.GridDeviceStatus = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
-            this.GridViewDeviceStatus = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
+            this.CheckedComboxDeviceStatus = new DevExpress.XtraEditors.CheckedComboBoxEdit();
             this.PageWorkCenterStatus = new DevExpress.XtraTab.XtraTabPage();
             this.GridWorkCenterStatus = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.GridViewWorkCenterStatus = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
@@ -155,16 +138,11 @@ namespace UAS_DeviceMonitor
             this.PagePollingSetting.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridPollingSetting)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewPollSetting)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dpc_enableCheckEdit)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PollingSetItemLookUpEdit)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PollSettingItemSearchLookUpEdit)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PollSettingItemSearchLookUpEditView)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.PollingSetItemLookUpEdit)).BeginInit();
-            this.PagePolling.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.GridViewPolling)).BeginInit();
             this.PageDeviceStatus.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.GridDeviceStatus)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceStatus)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckedComboxDeviceStatus.Properties)).BeginInit();
             this.PageWorkCenterStatus.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridWorkCenterStatus)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewWorkCenterStatus)).BeginInit();
@@ -274,7 +252,6 @@ namespace UAS_DeviceMonitor
             this.RibDeviceInf.ItemLinks.Add(this.ButtonCommandSet, true);
             this.RibDeviceInf.ItemLinks.Add(this.ButtonDeviceList);
             this.RibDeviceInf.ItemLinks.Add(this.ButtonDeviceNetSetting);
-            this.RibDeviceInf.ItemLinks.Add(this.ButtionPolling);
             this.RibDeviceInf.ItemLinks.Add(this.ButtonPollingSetting);
             this.RibDeviceInf.Name = "RibDeviceInf";
             this.RibDeviceInf.ShowCaptionButton = false;
@@ -307,7 +284,6 @@ namespace UAS_DeviceMonitor
             this.PageCommandSet,
             this.PageDeviceNetSetting,
             this.PagePollingSetting,
-            this.PagePolling,
             this.PageDeviceStatus,
             this.PageWorkCenterStatus});
             // 
@@ -544,7 +520,7 @@ namespace UAS_DeviceMonitor
             this.dc_id,
             this.dc_code,
             this.dc_name,
-            this.dc_command});
+            this.dc_value});
             this.GridViewCommandSet.GridControl = this.GridCommandSetting;
             this.GridViewCommandSet.IndicatorWidth = 30;
             this.GridViewCommandSet.Name = "GridViewCommandSet";
@@ -590,14 +566,14 @@ namespace UAS_DeviceMonitor
             this.dc_name.VisibleIndex = 2;
             this.dc_name.Width = 123;
             // 
-            // dc_command
+            // dc_value
             // 
-            this.dc_command.Caption = "发送指令";
-            this.dc_command.FieldName = "DC_COMMAND";
-            this.dc_command.Name = "dc_command";
-            this.dc_command.Visible = true;
-            this.dc_command.VisibleIndex = 3;
-            this.dc_command.Width = 768;
+            this.dc_value.Caption = "发送指令";
+            this.dc_value.FieldName = "DC_VALUE";
+            this.dc_value.Name = "dc_value";
+            this.dc_value.Visible = true;
+            this.dc_value.VisibleIndex = 3;
+            this.dc_value.Width = 768;
             // 
             // PageDeviceNetSetting
             // 
@@ -653,8 +629,6 @@ namespace UAS_DeviceMonitor
             this.GridDeviceNetSetting.MainView = this.GridViewDeviceNetSetting;
             this.GridDeviceNetSetting.MenuManager = this.RibbonNav;
             this.GridDeviceNetSetting.Name = "GridDeviceNetSetting";
-            this.GridDeviceNetSetting.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
-            this.dpc_enableCheckEdit});
             this.GridDeviceNetSetting.RowCount = 0;
             this.GridDeviceNetSetting.Size = new System.Drawing.Size(1024, 540);
             this.GridDeviceNetSetting.TabIndex = 0;
@@ -682,7 +656,6 @@ namespace UAS_DeviceMonitor
             // NetSettingCheckedColumn
             // 
             this.NetSettingCheckedColumn.Caption = " ";
-            this.NetSettingCheckedColumn.ColumnEdit = this.dpc_enableCheckEdit;
             this.NetSettingCheckedColumn.FieldName = "CHECKEDCOLUMN";
             this.NetSettingCheckedColumn.Name = "NetSettingCheckedColumn";
             this.NetSettingCheckedColumn.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
@@ -765,7 +738,6 @@ namespace UAS_DeviceMonitor
             this.PagePollingSetting.PageVisible = false;
             this.PagePollingSetting.Size = new System.Drawing.Size(1027, 577);
             this.PagePollingSetting.Text = "xtraTabPage1";
-            this.PagePollingSetting.VisibleChanged += new System.EventHandler(this.PagePollingSetting_VisibleChanged);
             // 
             // ButtonDeleteCommandSet
             // 
@@ -832,7 +804,6 @@ namespace UAS_DeviceMonitor
             this.GridPollingSetting.MenuManager = this.RibbonNav;
             this.GridPollingSetting.Name = "GridPollingSetting";
             this.GridPollingSetting.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
-            this.dpc_enableCheckEdit,
             this.PollingSetItemLookUpEdit,
             this.PollSettingItemSearchLookUpEdit});
             this.GridPollingSetting.RowCount = 0;
@@ -848,8 +819,6 @@ namespace UAS_DeviceMonitor
             this.PollSettingCheckedColumn,
             this.dpc_id,
             this.dpc_decode,
-            this.dpc_plcode,
-            this.dpc_plname,
             this.dpc_interval,
             this.dpc_dccode,
             this.dpc_function,
@@ -867,7 +836,6 @@ namespace UAS_DeviceMonitor
             // PollSettingCheckedColumn
             // 
             this.PollSettingCheckedColumn.Caption = " ";
-            this.PollSettingCheckedColumn.ColumnEdit = this.dpc_enableCheckEdit;
             this.PollSettingCheckedColumn.FieldName = "CHECKEDCOLUMN";
             this.PollSettingCheckedColumn.Name = "PollSettingCheckedColumn";
             this.PollSettingCheckedColumn.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
@@ -876,14 +844,6 @@ namespace UAS_DeviceMonitor
             this.PollSettingCheckedColumn.Visible = true;
             this.PollSettingCheckedColumn.VisibleIndex = 0;
             // 
-            // dpc_enableCheckEdit
-            // 
-            this.dpc_enableCheckEdit.AutoHeight = false;
-            this.dpc_enableCheckEdit.Name = "dpc_enableCheckEdit";
-            this.dpc_enableCheckEdit.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
-            this.dpc_enableCheckEdit.ValueChecked = "-1";
-            this.dpc_enableCheckEdit.ValueUnchecked = "0";
-            // 
             // dpc_id
             // 
             this.dpc_id.Caption = "ID";
@@ -899,94 +859,13 @@ namespace UAS_DeviceMonitor
             this.dpc_decode.VisibleIndex = 1;
             this.dpc_decode.Width = 90;
             // 
-            // dpc_plcode
-            // 
-            this.dpc_plcode.Caption = "业务编号";
-            this.dpc_plcode.ColumnEdit = this.PollSettingItemSearchLookUpEdit;
-            this.dpc_plcode.FieldName = "DPC_PLCODE";
-            this.dpc_plcode.Name = "dpc_plcode";
-            this.dpc_plcode.Visible = true;
-            this.dpc_plcode.VisibleIndex = 2;
-            this.dpc_plcode.Width = 90;
-            // 
-            // PollSettingItemSearchLookUpEdit
-            // 
-            this.PollSettingItemSearchLookUpEdit.AutoHeight = false;
-            this.PollSettingItemSearchLookUpEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.PollSettingItemSearchLookUpEdit.Name = "PollSettingItemSearchLookUpEdit";
-            this.PollSettingItemSearchLookUpEdit.NullText = "";
-            this.PollSettingItemSearchLookUpEdit.View = this.PollSettingItemSearchLookUpEditView;
-            // 
-            // PollSettingItemSearchLookUpEditView
-            // 
-            this.PollSettingItemSearchLookUpEditView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
-            this.gridColumn1,
-            this.gridColumn2,
-            this.gridColumn3,
-            this.gridColumn4,
-            this.gridColumn5});
-            this.PollSettingItemSearchLookUpEditView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.PollSettingItemSearchLookUpEditView.Name = "PollSettingItemSearchLookUpEditView";
-            this.PollSettingItemSearchLookUpEditView.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.PollSettingItemSearchLookUpEditView.OptionsView.ShowGroupPanel = false;
-            // 
-            // gridColumn1
-            // 
-            this.gridColumn1.Caption = "业务编号";
-            this.gridColumn1.FieldName = "PL_CODE";
-            this.gridColumn1.Name = "gridColumn1";
-            this.gridColumn1.Visible = true;
-            this.gridColumn1.VisibleIndex = 0;
-            // 
-            // gridColumn2
-            // 
-            this.gridColumn2.Caption = "业务名称";
-            this.gridColumn2.FieldName = "PL_NAME";
-            this.gridColumn2.Name = "gridColumn2";
-            this.gridColumn2.Visible = true;
-            this.gridColumn2.VisibleIndex = 1;
-            // 
-            // gridColumn3
-            // 
-            this.gridColumn3.Caption = "业务类型";
-            this.gridColumn3.FieldName = "PL_TYPE";
-            this.gridColumn3.Name = "gridColumn3";
-            this.gridColumn3.Visible = true;
-            this.gridColumn3.VisibleIndex = 2;
-            // 
-            // gridColumn4
-            // 
-            this.gridColumn4.Caption = "指令编号";
-            this.gridColumn4.FieldName = "PL_DCCODE";
-            this.gridColumn4.Name = "gridColumn4";
-            this.gridColumn4.Visible = true;
-            this.gridColumn4.VisibleIndex = 3;
-            // 
-            // gridColumn5
-            // 
-            this.gridColumn5.Caption = "备注";
-            this.gridColumn5.FieldName = "PL_REMARK";
-            this.gridColumn5.Name = "gridColumn5";
-            this.gridColumn5.Visible = true;
-            this.gridColumn5.VisibleIndex = 4;
-            // 
-            // dpc_plname
-            // 
-            this.dpc_plname.Caption = "业务名称";
-            this.dpc_plname.FieldName = "DPC_PLNAME";
-            this.dpc_plname.Name = "dpc_plname";
-            this.dpc_plname.Visible = true;
-            this.dpc_plname.VisibleIndex = 3;
-            this.dpc_plname.Width = 90;
-            // 
             // dpc_interval
             // 
             this.dpc_interval.Caption = "轮询间隔";
             this.dpc_interval.FieldName = "DPC_INTERVAL";
             this.dpc_interval.Name = "dpc_interval";
             this.dpc_interval.Visible = true;
-            this.dpc_interval.VisibleIndex = 4;
+            this.dpc_interval.VisibleIndex = 2;
             this.dpc_interval.Width = 90;
             // 
             // dpc_dccode
@@ -995,7 +874,7 @@ namespace UAS_DeviceMonitor
             this.dpc_dccode.FieldName = "DPC_DCCODE";
             this.dpc_dccode.Name = "dpc_dccode";
             this.dpc_dccode.Visible = true;
-            this.dpc_dccode.VisibleIndex = 5;
+            this.dpc_dccode.VisibleIndex = 3;
             this.dpc_dccode.Width = 90;
             // 
             // dpc_function
@@ -1004,17 +883,16 @@ namespace UAS_DeviceMonitor
             this.dpc_function.FieldName = "DPC_FUNCTION";
             this.dpc_function.Name = "dpc_function";
             this.dpc_function.Visible = true;
-            this.dpc_function.VisibleIndex = 6;
+            this.dpc_function.VisibleIndex = 4;
             this.dpc_function.Width = 90;
             // 
             // dpc_enable
             // 
             this.dpc_enable.Caption = "是否启用";
-            this.dpc_enable.ColumnEdit = this.dpc_enableCheckEdit;
             this.dpc_enable.FieldName = "DPC_ENABLE";
             this.dpc_enable.Name = "dpc_enable";
             this.dpc_enable.Visible = true;
-            this.dpc_enable.VisibleIndex = 7;
+            this.dpc_enable.VisibleIndex = 5;
             this.dpc_enable.Width = 90;
             // 
             // dpc_status
@@ -1023,7 +901,7 @@ namespace UAS_DeviceMonitor
             this.dpc_status.FieldName = "DPC_STATUS";
             this.dpc_status.Name = "dpc_status";
             this.dpc_status.Visible = true;
-            this.dpc_status.VisibleIndex = 8;
+            this.dpc_status.VisibleIndex = 6;
             this.dpc_status.Width = 90;
             // 
             // dpc_remark
@@ -1032,7 +910,7 @@ namespace UAS_DeviceMonitor
             this.dpc_remark.FieldName = "DPC_REMARK";
             this.dpc_remark.Name = "dpc_remark";
             this.dpc_remark.Visible = true;
-            this.dpc_remark.VisibleIndex = 9;
+            this.dpc_remark.VisibleIndex = 7;
             this.dpc_remark.Width = 87;
             // 
             // POLLSETTINGSTATUSCOLUMN
@@ -1042,7 +920,7 @@ namespace UAS_DeviceMonitor
             this.POLLSETTINGSTATUSCOLUMN.Name = "POLLSETTINGSTATUSCOLUMN";
             this.POLLSETTINGSTATUSCOLUMN.OptionsColumn.ReadOnly = true;
             this.POLLSETTINGSTATUSCOLUMN.Visible = true;
-            this.POLLSETTINGSTATUSCOLUMN.VisibleIndex = 10;
+            this.POLLSETTINGSTATUSCOLUMN.VisibleIndex = 8;
             this.POLLSETTINGSTATUSCOLUMN.Width = 98;
             // 
             // PollingSetItemLookUpEdit
@@ -1055,178 +933,85 @@ namespace UAS_DeviceMonitor
             this.PollingSetItemLookUpEdit.ShowFooter = false;
             this.PollingSetItemLookUpEdit.ShowHeader = false;
             // 
-            // PagePolling
-            // 
-            this.PagePolling.Controls.Add(this.ButtonAddPolling);
-            this.PagePolling.Controls.Add(this.ButtonDeletePolling);
-            this.PagePolling.Controls.Add(this.ButtonSavePolling);
-            this.PagePolling.Controls.Add(this.GridPolling);
-            this.PagePolling.Name = "PagePolling";
-            this.PagePolling.PageVisible = false;
-            this.PagePolling.Size = new System.Drawing.Size(1027, 577);
-            this.PagePolling.Text = "xtraTabPage1";
-            // 
-            // ButtonAddPolling
-            // 
-            this.ButtonAddPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonAddPolling.Grid = null;
-            this.ButtonAddPolling.Location = new System.Drawing.Point(878, 551);
-            this.ButtonAddPolling.Name = "ButtonAddPolling";
-            this.ButtonAddPolling.Size = new System.Drawing.Size(64, 23);
-            this.ButtonAddPolling.TabIndex = 9;
-            this.ButtonAddPolling.Text = "新增";
-            // 
-            // ButtonDeletePolling
-            // 
-            this.ButtonDeletePolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonDeletePolling.Grid = null;
-            this.ButtonDeletePolling.Location = new System.Drawing.Point(807, 551);
-            this.ButtonDeletePolling.Name = "ButtonDeletePolling";
-            this.ButtonDeletePolling.Size = new System.Drawing.Size(64, 23);
-            this.ButtonDeletePolling.TabIndex = 8;
-            this.ButtonDeletePolling.Text = "删除";
-            // 
-            // ButtonSavePolling
-            // 
-            this.ButtonSavePolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonSavePolling.Grid = null;
-            this.ButtonSavePolling.HandlerOtherFirst = false;
-            this.ButtonSavePolling.Location = new System.Drawing.Point(949, 551);
-            this.ButtonSavePolling.Name = "ButtonSavePolling";
-            this.ButtonSavePolling.Size = new System.Drawing.Size(64, 23);
-            this.ButtonSavePolling.TabIndex = 7;
-            this.ButtonSavePolling.Text = "保存";
-            // 
-            // GridPolling
-            // 
-            this.GridPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.GridPolling.Condition = null;
-            this.GridPolling.GetDataSQL = null;
-            this.GridPolling.ID = null;
-            this.GridPolling.InsertSQL = null;
-            this.GridPolling.Location = new System.Drawing.Point(3, -3);
-            this.GridPolling.MainView = this.GridViewPolling;
-            this.GridPolling.MenuManager = this.RibbonNav;
-            this.GridPolling.Name = "GridPolling";
-            this.GridPolling.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
-            this.dpc_enableCheckEdit});
-            this.GridPolling.RowCount = 0;
-            this.GridPolling.Size = new System.Drawing.Size(1027, 549);
-            this.GridPolling.TabIndex = 0;
-            this.GridPolling.TableName = null;
-            this.GridPolling.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
-            this.GridViewPolling});
-            this.GridPolling.VisibleChanged += new System.EventHandler(this.GridPolling_VisibleChanged);
-            // 
-            // GridViewPolling
-            // 
-            this.GridViewPolling.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
-            this.PollingCheckedColumn,
-            this.pl_id,
-            this.pl_code,
-            this.pl_name,
-            this.pl_type,
-            this.pl_dccode,
-            this.pl_remark});
-            this.GridViewPolling.GridControl = this.GridPolling;
-            this.GridViewPolling.IndicatorWidth = 30;
-            this.GridViewPolling.Name = "GridViewPolling";
-            this.GridViewPolling.OptionsView.ShowGroupPanel = false;
-            // 
-            // PollingCheckedColumn
-            // 
-            this.PollingCheckedColumn.Caption = " ";
-            this.PollingCheckedColumn.ColumnEdit = this.dpc_enableCheckEdit;
-            this.PollingCheckedColumn.FieldName = "CHECKEDCOLUMN";
-            this.PollingCheckedColumn.Name = "PollingCheckedColumn";
-            this.PollingCheckedColumn.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
-            this.PollingCheckedColumn.Tag = "0";
-            this.PollingCheckedColumn.Visible = true;
-            this.PollingCheckedColumn.VisibleIndex = 0;
-            // 
-            // pl_id
-            // 
-            this.pl_id.Caption = "ID";
-            this.pl_id.FieldName = "PL_ID";
-            this.pl_id.Name = "pl_id";
-            // 
-            // pl_code
-            // 
-            this.pl_code.Caption = "业务编号";
-            this.pl_code.FieldName = "PL_CODE";
-            this.pl_code.Name = "pl_code";
-            this.pl_code.Visible = true;
-            this.pl_code.VisibleIndex = 1;
-            // 
-            // pl_name
-            // 
-            this.pl_name.Caption = "业务名称";
-            this.pl_name.FieldName = "PL_NAME";
-            this.pl_name.Name = "pl_name";
-            this.pl_name.Visible = true;
-            this.pl_name.VisibleIndex = 2;
-            // 
-            // pl_type
-            // 
-            this.pl_type.Caption = "业务类型";
-            this.pl_type.FieldName = "PL_TYPE";
-            this.pl_type.Name = "pl_type";
-            this.pl_type.Visible = true;
-            this.pl_type.VisibleIndex = 3;
-            // 
-            // pl_dccode
-            // 
-            this.pl_dccode.Caption = "指令编号";
-            this.pl_dccode.ColumnEdit = this.PollingSetItemLookUpEdit;
-            this.pl_dccode.FieldName = "PL_DCCODE";
-            this.pl_dccode.Name = "pl_dccode";
-            this.pl_dccode.Visible = true;
-            this.pl_dccode.VisibleIndex = 4;
-            // 
-            // pl_remark
-            // 
-            this.pl_remark.Caption = "备注";
-            this.pl_remark.FieldName = "PL_REMARK";
-            this.pl_remark.Name = "pl_remark";
-            this.pl_remark.Visible = true;
-            this.pl_remark.VisibleIndex = 5;
+            // PollSettingItemSearchLookUpEdit
+            // 
+            this.PollSettingItemSearchLookUpEdit.AutoHeight = false;
+            this.PollSettingItemSearchLookUpEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.PollSettingItemSearchLookUpEdit.Name = "PollSettingItemSearchLookUpEdit";
+            this.PollSettingItemSearchLookUpEdit.NullText = "";
+            this.PollSettingItemSearchLookUpEdit.View = this.PollSettingItemSearchLookUpEditView;
+            // 
+            // PollSettingItemSearchLookUpEditView
+            // 
+            this.PollSettingItemSearchLookUpEditView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
+            this.gridColumn1,
+            this.gridColumn2,
+            this.gridColumn3,
+            this.gridColumn4,
+            this.gridColumn5});
+            this.PollSettingItemSearchLookUpEditView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.PollSettingItemSearchLookUpEditView.Name = "PollSettingItemSearchLookUpEditView";
+            this.PollSettingItemSearchLookUpEditView.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.PollSettingItemSearchLookUpEditView.OptionsView.ShowGroupPanel = false;
+            // 
+            // gridColumn1
+            // 
+            this.gridColumn1.Caption = "业务编号";
+            this.gridColumn1.FieldName = "PL_CODE";
+            this.gridColumn1.Name = "gridColumn1";
+            this.gridColumn1.Visible = true;
+            this.gridColumn1.VisibleIndex = 0;
+            // 
+            // gridColumn2
+            // 
+            this.gridColumn2.Caption = "业务名称";
+            this.gridColumn2.FieldName = "PL_NAME";
+            this.gridColumn2.Name = "gridColumn2";
+            this.gridColumn2.Visible = true;
+            this.gridColumn2.VisibleIndex = 1;
+            // 
+            // gridColumn3
+            // 
+            this.gridColumn3.Caption = "业务类型";
+            this.gridColumn3.FieldName = "PL_TYPE";
+            this.gridColumn3.Name = "gridColumn3";
+            this.gridColumn3.Visible = true;
+            this.gridColumn3.VisibleIndex = 2;
+            // 
+            // gridColumn4
+            // 
+            this.gridColumn4.Caption = "指令编号";
+            this.gridColumn4.FieldName = "PL_DCCODE";
+            this.gridColumn4.Name = "gridColumn4";
+            this.gridColumn4.Visible = true;
+            this.gridColumn4.VisibleIndex = 3;
+            // 
+            // gridColumn5
+            // 
+            this.gridColumn5.Caption = "备注";
+            this.gridColumn5.FieldName = "PL_REMARK";
+            this.gridColumn5.Name = "gridColumn5";
+            this.gridColumn5.Visible = true;
+            this.gridColumn5.VisibleIndex = 4;
             // 
             // PageDeviceStatus
             // 
-            this.PageDeviceStatus.Controls.Add(this.GridDeviceStatus);
+            this.PageDeviceStatus.Controls.Add(this.CheckedComboxDeviceStatus);
             this.PageDeviceStatus.Name = "PageDeviceStatus";
             this.PageDeviceStatus.PageVisible = false;
             this.PageDeviceStatus.Size = new System.Drawing.Size(1027, 577);
             this.PageDeviceStatus.Text = "xtraTabPage1";
             // 
-            // GridDeviceStatus
+            // CheckedComboxDeviceStatus
             // 
-            this.GridDeviceStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.GridDeviceStatus.Condition = null;
-            this.GridDeviceStatus.GetDataSQL = null;
-            this.GridDeviceStatus.ID = null;
-            this.GridDeviceStatus.InsertSQL = null;
-            this.GridDeviceStatus.Location = new System.Drawing.Point(3, 0);
-            this.GridDeviceStatus.MainView = this.GridViewDeviceStatus;
-            this.GridDeviceStatus.MenuManager = this.RibbonNav;
-            this.GridDeviceStatus.Name = "GridDeviceStatus";
-            this.GridDeviceStatus.RowCount = 0;
-            this.GridDeviceStatus.Size = new System.Drawing.Size(1024, 577);
-            this.GridDeviceStatus.TabIndex = 0;
-            this.GridDeviceStatus.TableName = null;
-            this.GridDeviceStatus.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
-            this.GridViewDeviceStatus});
-            // 
-            // GridViewDeviceStatus
-            // 
-            this.GridViewDeviceStatus.GridControl = this.GridDeviceStatus;
-            this.GridViewDeviceStatus.IndicatorWidth = 30;
-            this.GridViewDeviceStatus.Name = "GridViewDeviceStatus";
-            this.GridViewDeviceStatus.OptionsView.ShowGroupPanel = false;
+            this.CheckedComboxDeviceStatus.Location = new System.Drawing.Point(86, 31);
+            this.CheckedComboxDeviceStatus.MenuManager = this.RibbonNav;
+            this.CheckedComboxDeviceStatus.Name = "CheckedComboxDeviceStatus";
+            this.CheckedComboxDeviceStatus.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.CheckedComboxDeviceStatus.Size = new System.Drawing.Size(124, 20);
+            this.CheckedComboxDeviceStatus.TabIndex = 0;
             // 
             // PageWorkCenterStatus
             // 
@@ -1296,16 +1081,11 @@ namespace UAS_DeviceMonitor
             this.PagePollingSetting.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.GridPollingSetting)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewPollSetting)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dpc_enableCheckEdit)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PollingSetItemLookUpEdit)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.PollSettingItemSearchLookUpEdit)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.PollSettingItemSearchLookUpEditView)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.PollingSetItemLookUpEdit)).EndInit();
-            this.PagePolling.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.GridViewPolling)).EndInit();
             this.PageDeviceStatus.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.GridDeviceStatus)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceStatus)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckedComboxDeviceStatus.Properties)).EndInit();
             this.PageWorkCenterStatus.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.GridWorkCenterStatus)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewWorkCenterStatus)).EndInit();
@@ -1332,7 +1112,6 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraBars.BarButtonItem ButtonPollingSetting;
         private DevExpress.XtraBars.BarButtonItem ButtionPolling;
         private DevExpress.XtraTab.XtraTabPage PagePollingSetting;
-        private DevExpress.XtraTab.XtraTabPage PagePolling;
         private DevExpress.XtraGrid.Columns.GridColumn de_id;
         private DevExpress.XtraGrid.Columns.GridColumn de_code;
         private DevExpress.XtraGrid.Columns.GridColumn de_name;
@@ -1348,39 +1127,25 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn dc_id;
         private DevExpress.XtraGrid.Columns.GridColumn dc_code;
         private DevExpress.XtraGrid.Columns.GridColumn dc_name;
-        private DevExpress.XtraGrid.Columns.GridColumn dc_command;
-        private AutoDataGridControl GridPolling;
+        private DevExpress.XtraGrid.Columns.GridColumn dc_value;
         private AutoDataGridControl GridPollingSetting;
-        private DevExpress.XtraGrid.Columns.GridColumn pl_id;
-        private DevExpress.XtraGrid.Columns.GridColumn pl_code;
-        private DevExpress.XtraGrid.Columns.GridColumn pl_name;
-        private DevExpress.XtraGrid.Columns.GridColumn pl_type;
-        private DevExpress.XtraGrid.Columns.GridColumn pl_dccode;
-        private DevExpress.XtraGrid.Columns.GridColumn pl_remark;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_id;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_decode;
-        private DevExpress.XtraGrid.Columns.GridColumn dpc_plcode;
-        private DevExpress.XtraGrid.Columns.GridColumn dpc_plname;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_interval;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_dccode;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_function;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_enable;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_status;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_remark;
-        private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit dpc_enableCheckEdit;
         private CustomerControl.Button.ButtonSaveGrid ButtonSaveCommand;
         private SimpleButton ButtonNewCommand;
         private GridViewWithSerialNum GridViewDeviceList;
         private GridViewWithSerialNum GridViewCommandSet;
-        private GridViewWithSerialNum GridViewPolling;
         private GridViewWithSerialNum GridViewPollSetting;
         private LabelControl Brand_label;
         private ComboBoxEdit Brand;
         private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit CheckEditCommandSet;
         private CustomerControl.Button.ButtonDeleteRow ButtonDeleteCommand;
-        private CustomerControl.Button.ButtonDeleteRow ButtonDeletePolling;
-        private CustomerControl.Button.ButtonSaveGrid ButtonSavePolling;
-        private CustomerControl.Button.ButtonAddRow ButtonAddPolling;
         private SimpleButton ButtonPausePolling;
         private SimpleButton ButtonStartPolling;
         private CustomerControl.Button.ButtonDeleteRow ButtonDeleteCommandSet;
@@ -1390,7 +1155,6 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn POLLSETTINGSTATUSCOLUMN;
         private DevExpress.XtraGrid.Columns.GridColumn PollSettingCheckedColumn;
         private DevExpress.XtraGrid.Columns.GridColumn CommandSetCheckedColumn;
-        private DevExpress.XtraGrid.Columns.GridColumn PollingCheckedColumn;
         private DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit PollSettingItemSearchLookUpEdit;
         private DevExpress.XtraGrid.Views.Grid.GridView PollSettingItemSearchLookUpEditView;
         private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
@@ -1404,8 +1168,6 @@ namespace UAS_DeviceMonitor
         private GridViewWithSerialNum GridViewDeviceNetSetting;
         private DevExpress.XtraTab.XtraTabPage PageDeviceStatus;
         private DevExpress.XtraTab.XtraTabPage PageWorkCenterStatus;
-        private AutoDataGridControl GridDeviceStatus;
-        private GridViewWithSerialNum GridViewDeviceStatus;
         private AutoDataGridControl GridWorkCenterStatus;
         private GridViewWithSerialNum GridViewWorkCenterStatus;
         private DevExpress.XtraGrid.Columns.GridColumn dnc_id;
@@ -1420,5 +1182,6 @@ namespace UAS_DeviceMonitor
         private CustomerControl.Button.ButtonAddRow ButtonAddNetConfig;
         private CustomerControl.Button.ButtonSaveGrid ButtonSaveNetConfig;
         private DevExpress.XtraGrid.Columns.GridColumn NetSettingCheckedColumn;
+        private CheckedComboBoxEdit CheckedComboxDeviceStatus;
     }
 }

+ 10 - 48
UAS_DeviceMonitor/Main.cs

@@ -24,7 +24,6 @@ namespace UAS_DeviceMonitor
             dh = new DataHelper();
             SystemInf.dh = dh;
             InitializeComponent();
-            dpc_enableCheckEdit.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
             CheckEditCommandSet.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
             PollSettingItemSearchLookUpEdit.ParseEditValue += PollSettingItemSearchLookUpEdit_ParseEditValue;
             GridViewPollSetting.RowCellStyle += GridViewPollSetting_RowCellStyle;
@@ -40,29 +39,21 @@ namespace UAS_DeviceMonitor
             //设备列表
             GridDeviceList.GetDataSQL = "select de_id,de_code,de_name,de_spec,de_indate,de_runstatus,de_address,de_wccode,de_vendcode,de_vendname from device".ToUpper();
             ToolPageControlDeviceList.Gridcontrol = GridDeviceList;
-            //轮询业务
-            GridPolling.GetDataSQL = "select 0 CHECKEDCOLUMN,pl_id,pl_code,pl_name,pl_type,pl_dccode,pl_remark from polling".ToUpper();
-            GridPolling.ID = "pl_id";
-            GridPolling.TableName = "polling";
-            GridPolling.InsertSQL = "insert into polling(pl_id,pl_code,pl_name,pl_type,pl_dccode,pl_remark) values(polling_seq.nextval,:pl_code,:pl_name,:pl_type,:pl_dccode,:pl_remark)";
-            ButtonDeletePolling.Grid = GridPolling;
-            ButtonSavePolling.Grid = GridPolling;
-            ButtonAddPolling.Grid = GridPolling;
             //轮询配置界面
-            GridPollingSetting.GetDataSQL = "SELECT '' POLLSETTINGSTATUSCOLUMN,0 CHECKEDCOLUMN,DPC_ID,DPC_DECODE ,DPC_PLCODE ,DPC_PLNAME ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK FROM DEVICEPOLLINGCONFIG";
+            GridPollingSetting.GetDataSQL = "SELECT '' POLLSETTINGSTATUSCOLUMN,0 CHECKEDCOLUMN,DPC_ID,DPC_DECODE,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK FROM DEVICEPOLLINGCONFIG";
             GridPollingSetting.ID = "DPC_ID";
             GridPollingSetting.TableName = "DEVICEPOLLINGCONFIG";
-            GridPollingSetting.InsertSQL = "insert into DEVICEPOLLINGCONFIG(DPC_ID,DPC_DECODE ,DPC_PLCODE ,DPC_PLNAME ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK) values(DEVICEPOLLINGCONFIG_seq.nextval,:DPC_DECODE ,:DPC_PLCODE ,:DPC_PLNAME ,:DPC_INTERVAL ,:DPC_DCCODE ,:DPC_FUNCTION , :DPC_ENABLE,:DPC_STATUS ,:DPC_REMARK)";
+            GridPollingSetting.InsertSQL = "insert into DEVICEPOLLINGCONFIG(DPC_ID,DPC_DECODE ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK) values(DEVICEPOLLINGCONFIG_seq.nextval,:DPC_DECODE ,:DPC_INTERVAL ,:DPC_DCCODE ,:DPC_FUNCTION , :DPC_ENABLE,:DPC_STATUS ,:DPC_REMARK)";
 
             ButtonSaveCommandSet.Grid = GridPollingSetting;
             ButtonNewCommandSet.Grid = GridPollingSetting;
             ButtonDeleteCommandSet.Grid = GridPollingSetting;
 
             //指令设置界面
-            GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_name,dc_command from devicecommand".ToUpper();
+            GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_name,dc_value from devicecommand".ToUpper();
             GridCommandSetting.TableName = "devicecommand";
             GridCommandSetting.ID = "dc_id";
-            GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_command) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_command)";
+            GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value)";
             ButtonSaveCommand.Grid = GridCommandSetting;
             ButtonDeleteCommand.Grid = GridCommandSetting;
 
@@ -175,13 +166,13 @@ namespace UAS_DeviceMonitor
             {
                 DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from devicebrand", "select");
                 BaseUtil.FillComBoxEditWidthDataTable(Brand, "db_name", "db_code", dt);
-                GridCommandSetting.Condition = " where dc_brand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
+                GridCommandSetting.Condition = " where dc_debrand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
             }
         }
 
         private void Brand_SelectedIndexChanged(object sender, EventArgs e)
         {
-            GridCommandSetting.Condition = " where dc_brand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
+            GridCommandSetting.Condition = " where dc_debrand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
             GridCommandSetting.RefreshData();
         }
 
@@ -215,7 +206,7 @@ namespace UAS_DeviceMonitor
                 pl.DeviceCode = GridViewPollSetting.GetRowCellValue(i, "DPC_DECODE").ToString();
                 pl.Interval = int.Parse(GridViewPollSetting.GetRowCellValue(i, "DPC_INTERVAL").ToString());
                 pl.Enable = GridViewPollSetting.GetRowCellValue(i, "DPC_ENABLE").ToString() != "0";
-                pl.Code = GridViewPollSetting.GetRowCellValue(i, "DPC_PLCODE").ToString();
+                pl.Dh = new DataHelper();
                 if (pl.Enable)
                 {
                     pt.AddTask(RunTask, pl);
@@ -271,8 +262,9 @@ namespace UAS_DeviceMonitor
             PollingTimer timer = (PollingTimer)sender;
             Polling pl = (Polling)timer.Polling;
             string Decode = pl.DeviceCode;
-            string IP = dh.getFieldDataByCondition("DEVICENETCONFIG", "dnc_ip", "dnc_decode='"+ Decode + "'").ToString();
-            Console.WriteLine(IP);
+            DataHelper dh = pl.Dh;
+            DataTable dt = (DataTable)dh.ExecuteSql("select dnc_ip from DEVICENETCONFIG where dnc_decode='" + Decode + "'", "select");
+            Console.WriteLine(dt.Rows.Count);
         }
 
         /// <summary>
@@ -313,41 +305,11 @@ namespace UAS_DeviceMonitor
                     pl.DeviceCode = GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_DECODE").ToString();
                     pl.Interval = int.Parse(GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_INTERVAL").ToString());
                     pl.Enable = GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_ENABLE").ToString() != "0";
-                    pl.Code = GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_PLCODE").ToString();
                     if (pl.Enable)
                         pt.AddTask(RunTask, pl);
                     PollSettingPaintRowIndex.Add(e.RowHandle);
                 }
             }
-            //选择业务方案时带出指令编号
-            if (e.Column.FieldName == "DPC_PLCODE")
-            {
-                string pqf01 = e.Value.ToString();
-                DataTable dt = (DataTable)PollSettingItemSearchLookUpEdit.DataSource;
-                DataRow[] rows = dt.Select(string.Format("PL_CODE='{0}'", pqf01));
-                if (rows != null && rows.Length > 0)
-                {
-                    DataRow row = rows[0];
-                    GridViewPollSetting.SetRowCellValue(e.RowHandle, "DPC_DCCODE", row["PL_DCCODE"].ToString());
-                    GridViewPollSetting.SetRowCellValue(e.RowHandle, "DPC_PLNAME", row["PL_NAME"].ToString());
-                }
-            }
-        }
-
-        /// <summary>
-        /// 设置GridView多选放大镜
-        /// </summary>
-        /// <param name="sender"></param> 
-        /// <param name="e"></param>
-        private void PagePollingSetting_VisibleChanged(object sender, EventArgs e)
-        {
-            if (PagePollingSetting.PageVisible)
-            {
-                DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("SELECT PL_CODE,PL_NAME,PL_TYPE,PL_DCCODE,PL_REMARK FROM POLLING", "select");
-                PollSettingItemSearchLookUpEdit.DataSource = dt;
-                PollSettingItemSearchLookUpEdit.DisplayMember = "PL_CODE";
-                PollSettingItemSearchLookUpEdit.ValueMember = "PL_CODE";
-            }
         }
         #endregion
     }