Browse Source

设备主档资料界面添加筛选功能

章政 7 years ago
parent
commit
1efb853246
3 changed files with 280 additions and 30 deletions
  1. 201 22
      UAS_DeviceMonitor/Main.Designer.cs
  2. 78 7
      UAS_DeviceMonitor/Main.cs
  3. 1 1
      UAS_DeviceMonitor/Main.resx

+ 201 - 22
UAS_DeviceMonitor/Main.Designer.cs

@@ -49,7 +49,15 @@ namespace UAS_DeviceMonitor
             this.RibDeviceCommand = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
             this.MainTabControl = new DevExpress.XtraTab.XtraTabControl();
             this.PageDeviceList = new DevExpress.XtraTab.XtraTabPage();
-            this.ToolPageControlDeviceList = new UAS_DeviceMonitor.CustomerControl.PagingControl.PageControl();
+            this.ComBoxDeviceListMan = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.em_code = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.em_name = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.ComBoxDeviceListMan_label = new DevExpress.XtraEditors.LabelControl();
+            this.ComboxDeviceListWC = new DevExpress.XtraEditors.ComboBoxEdit();
+            this.ComboxDeviceListLC = new DevExpress.XtraEditors.ComboBoxEdit();
+            this.ComboxDeviceListLC_label = new DevExpress.XtraEditors.LabelControl();
+            this.ComboxDeviceListWC_label = new DevExpress.XtraEditors.LabelControl();
             this.GridDeviceList = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.GridViewDeviceList = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.de_id = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -58,9 +66,11 @@ namespace UAS_DeviceMonitor
             this.de_runstatus = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_indate = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_spec = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_inman = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_vendcode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_vendname = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_address = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_linecode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_wccode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PageCommandSet = new DevExpress.XtraTab.XtraTabPage();
             this.ButtonDeleteCommand = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
@@ -75,10 +85,12 @@ 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_type = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dc_value = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dc_sendcoding = new DevExpress.XtraGrid.Columns.GridColumn();
             this.CommandSetRepositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
             this.dc_receivecoding = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.db_name = 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();
@@ -116,6 +128,7 @@ namespace UAS_DeviceMonitor
             this.dpc_function = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_enable = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_status = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dpc_man = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_remark = new DevExpress.XtraGrid.Columns.GridColumn();
             this.POLLSETTINGSTATUSCOLUMN = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PollingSetItemLookUpEdit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
@@ -148,6 +161,10 @@ namespace UAS_DeviceMonitor
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
             this.PageDeviceList.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.ComBoxDeviceListMan.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComboxDeviceListWC.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComboxDeviceListLC.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridDeviceList)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceList)).BeginInit();
             this.PageCommandSet.SuspendLayout();
@@ -221,7 +238,7 @@ namespace UAS_DeviceMonitor
             // 
             // ButtonCommandSet
             // 
-            this.ButtonCommandSet.Caption = "通信规则定义";
+            this.ButtonCommandSet.Caption = "设备指令设置";
             this.ButtonCommandSet.Glyph = ((System.Drawing.Image)(resources.GetObject("ButtonCommandSet.Glyph")));
             this.ButtonCommandSet.Id = 9;
             this.ButtonCommandSet.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("ButtonCommandSet.LargeGlyph")));
@@ -319,21 +336,119 @@ namespace UAS_DeviceMonitor
             // 
             // PageDeviceList
             // 
-            this.PageDeviceList.Controls.Add(this.ToolPageControlDeviceList);
+            this.PageDeviceList.Controls.Add(this.ComBoxDeviceListMan);
+            this.PageDeviceList.Controls.Add(this.ComBoxDeviceListMan_label);
+            this.PageDeviceList.Controls.Add(this.ComboxDeviceListWC);
+            this.PageDeviceList.Controls.Add(this.ComboxDeviceListLC);
+            this.PageDeviceList.Controls.Add(this.ComboxDeviceListLC_label);
+            this.PageDeviceList.Controls.Add(this.ComboxDeviceListWC_label);
             this.PageDeviceList.Controls.Add(this.GridDeviceList);
             this.PageDeviceList.Name = "PageDeviceList";
             this.PageDeviceList.PageVisible = false;
             this.PageDeviceList.Size = new System.Drawing.Size(1027, 577);
             this.PageDeviceList.Text = "xtraTabPage1";
+            this.PageDeviceList.VisibleChanged += new System.EventHandler(this.PageDeviceList_VisibleChanged);
             // 
-            // ToolPageControlDeviceList
+            // ComBoxDeviceListMan
             // 
-            this.ToolPageControlDeviceList.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.ToolPageControlDeviceList.Gridcontrol = null;
-            this.ToolPageControlDeviceList.Location = new System.Drawing.Point(0, 548);
-            this.ToolPageControlDeviceList.Name = "ToolPageControlDeviceList";
-            this.ToolPageControlDeviceList.Size = new System.Drawing.Size(1027, 29);
-            this.ToolPageControlDeviceList.TabIndex = 1;
+            this.ComBoxDeviceListMan.EditValue = "";
+            this.ComBoxDeviceListMan.Location = new System.Drawing.Point(360, 5);
+            this.ComBoxDeviceListMan.MenuManager = this.RibbonNav;
+            this.ComBoxDeviceListMan.Name = "ComBoxDeviceListMan";
+            this.ComBoxDeviceListMan.Properties.Appearance.Font = new System.Drawing.Font("微软雅黑", 8F);
+            this.ComBoxDeviceListMan.Properties.Appearance.Options.UseFont = true;
+            this.ComBoxDeviceListMan.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.ComBoxDeviceListMan.Properties.DisplayMember = "EM_NAME";
+            this.ComBoxDeviceListMan.Properties.NullText = "";
+            this.ComBoxDeviceListMan.Properties.ValueMember = "EM_CODE";
+            this.ComBoxDeviceListMan.Properties.View = this.searchLookUpEdit1View;
+            this.ComBoxDeviceListMan.Size = new System.Drawing.Size(100, 22);
+            this.ComBoxDeviceListMan.TabIndex = 12;
+            this.ComBoxDeviceListMan.Visible = false;
+            this.ComBoxDeviceListMan.EditValueChanged += new System.EventHandler(this.ComBoxDeviceListMan_EditValueChanged);
+            // 
+            // searchLookUpEdit1View
+            // 
+            this.searchLookUpEdit1View.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
+            this.em_code,
+            this.em_name});
+            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+            // 
+            // em_code
+            // 
+            this.em_code.Caption = "编号";
+            this.em_code.FieldName = "EM_CODE";
+            this.em_code.Name = "em_code";
+            this.em_code.Visible = true;
+            this.em_code.VisibleIndex = 0;
+            // 
+            // em_name
+            // 
+            this.em_name.Caption = "名称";
+            this.em_name.FieldName = "EM_NAME";
+            this.em_name.Name = "em_name";
+            this.em_name.Visible = true;
+            this.em_name.VisibleIndex = 1;
+            // 
+            // ComBoxDeviceListMan_label
+            // 
+            this.ComBoxDeviceListMan_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.ComBoxDeviceListMan_label.Location = new System.Drawing.Point(318, 8);
+            this.ComBoxDeviceListMan_label.Name = "ComBoxDeviceListMan_label";
+            this.ComBoxDeviceListMan_label.Size = new System.Drawing.Size(32, 16);
+            this.ComBoxDeviceListMan_label.TabIndex = 11;
+            this.ComBoxDeviceListMan_label.Text = "人员";
+            this.ComBoxDeviceListMan_label.Visible = false;
+            // 
+            // ComboxDeviceListWC
+            // 
+            this.ComboxDeviceListWC.Location = new System.Drawing.Point(49, 5);
+            this.ComboxDeviceListWC.MenuManager = this.RibbonNav;
+            this.ComboxDeviceListWC.Name = "ComboxDeviceListWC";
+            this.ComboxDeviceListWC.Properties.Appearance.Font = new System.Drawing.Font("黑体", 11F);
+            this.ComboxDeviceListWC.Properties.Appearance.Options.UseFont = true;
+            this.ComboxDeviceListWC.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.ComboxDeviceListWC.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
+            this.ComboxDeviceListWC.Size = new System.Drawing.Size(100, 22);
+            this.ComboxDeviceListWC.TabIndex = 6;
+            this.ComboxDeviceListWC.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceListWC_SelectedIndexChanged);
+            // 
+            // ComboxDeviceListLC
+            // 
+            this.ComboxDeviceListLC.Location = new System.Drawing.Point(201, 5);
+            this.ComboxDeviceListLC.MenuManager = this.RibbonNav;
+            this.ComboxDeviceListLC.Name = "ComboxDeviceListLC";
+            this.ComboxDeviceListLC.Properties.Appearance.Font = new System.Drawing.Font("黑体", 11F);
+            this.ComboxDeviceListLC.Properties.Appearance.Options.UseFont = true;
+            this.ComboxDeviceListLC.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.ComboxDeviceListLC.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
+            this.ComboxDeviceListLC.Size = new System.Drawing.Size(100, 22);
+            this.ComboxDeviceListLC.TabIndex = 7;
+            this.ComboxDeviceListLC.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceListLC_SelectedIndexChanged);
+            // 
+            // ComboxDeviceListLC_label
+            // 
+            this.ComboxDeviceListLC_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.ComboxDeviceListLC_label.Location = new System.Drawing.Point(161, 8);
+            this.ComboxDeviceListLC_label.Name = "ComboxDeviceListLC_label";
+            this.ComboxDeviceListLC_label.Size = new System.Drawing.Size(32, 16);
+            this.ComboxDeviceListLC_label.TabIndex = 9;
+            this.ComboxDeviceListLC_label.Text = "线别";
+            // 
+            // ComboxDeviceListWC_label
+            // 
+            this.ComboxDeviceListWC_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.ComboxDeviceListWC_label.Location = new System.Drawing.Point(10, 8);
+            this.ComboxDeviceListWC_label.Name = "ComboxDeviceListWC_label";
+            this.ComboxDeviceListWC_label.Size = new System.Drawing.Size(32, 16);
+            this.ComboxDeviceListWC_label.TabIndex = 8;
+            this.ComboxDeviceListWC_label.Text = "车间";
             // 
             // GridDeviceList
             // 
@@ -344,12 +459,12 @@ namespace UAS_DeviceMonitor
             this.GridDeviceList.GetDataSQL = null;
             this.GridDeviceList.ID = null;
             this.GridDeviceList.InsertSQL = null;
-            this.GridDeviceList.Location = new System.Drawing.Point(0, 0);
+            this.GridDeviceList.Location = new System.Drawing.Point(0, 31);
             this.GridDeviceList.MainView = this.GridViewDeviceList;
             this.GridDeviceList.MenuManager = this.RibbonNav;
             this.GridDeviceList.Name = "GridDeviceList";
             this.GridDeviceList.RowCount = 0;
-            this.GridDeviceList.Size = new System.Drawing.Size(1027, 545);
+            this.GridDeviceList.Size = new System.Drawing.Size(1027, 546);
             this.GridDeviceList.TabIndex = 0;
             this.GridDeviceList.TableName = null;
             this.GridDeviceList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -364,9 +479,11 @@ namespace UAS_DeviceMonitor
             this.de_runstatus,
             this.de_indate,
             this.de_spec,
+            this.de_inman,
             this.de_vendcode,
             this.de_vendname,
             this.de_address,
+            this.de_linecode,
             this.de_wccode});
             this.GridViewDeviceList.GridControl = this.GridDeviceList;
             this.GridViewDeviceList.IndicatorWidth = 30;
@@ -423,6 +540,14 @@ namespace UAS_DeviceMonitor
             this.de_spec.Visible = true;
             this.de_spec.VisibleIndex = 4;
             // 
+            // de_inman
+            // 
+            this.de_inman.Caption = "维护人员";
+            this.de_inman.FieldName = "DE_INMAN";
+            this.de_inman.Name = "de_inman";
+            this.de_inman.Visible = true;
+            this.de_inman.VisibleIndex = 6;
+            // 
             // de_vendcode
             // 
             this.de_vendcode.Caption = "供应商编号";
@@ -437,7 +562,7 @@ namespace UAS_DeviceMonitor
             this.de_vendname.FieldName = "DE_VENDNAME";
             this.de_vendname.Name = "de_vendname";
             this.de_vendname.Visible = true;
-            this.de_vendname.VisibleIndex = 6;
+            this.de_vendname.VisibleIndex = 7;
             // 
             // de_address
             // 
@@ -445,7 +570,15 @@ namespace UAS_DeviceMonitor
             this.de_address.FieldName = "DE_ADDRESS";
             this.de_address.Name = "de_address";
             this.de_address.Visible = true;
-            this.de_address.VisibleIndex = 7;
+            this.de_address.VisibleIndex = 8;
+            // 
+            // de_linecode
+            // 
+            this.de_linecode.Caption = "线别";
+            this.de_linecode.FieldName = "DE_LINECODE";
+            this.de_linecode.Name = "de_linecode";
+            this.de_linecode.Visible = true;
+            this.de_linecode.VisibleIndex = 9;
             // 
             // de_wccode
             // 
@@ -453,7 +586,7 @@ namespace UAS_DeviceMonitor
             this.de_wccode.FieldName = "DE_WCCODE";
             this.de_wccode.Name = "de_wccode";
             this.de_wccode.Visible = true;
-            this.de_wccode.VisibleIndex = 8;
+            this.de_wccode.VisibleIndex = 10;
             // 
             // PageCommandSet
             // 
@@ -554,9 +687,11 @@ namespace UAS_DeviceMonitor
             this.dc_id,
             this.dc_code,
             this.dc_name,
+            this.dc_type,
             this.dc_value,
             this.dc_sendcoding,
-            this.dc_receivecoding});
+            this.dc_receivecoding,
+            this.db_name});
             this.GridViewCommandSet.GridControl = this.GridCommandSetting;
             this.GridViewCommandSet.IndicatorWidth = 30;
             this.GridViewCommandSet.Name = "GridViewCommandSet";
@@ -603,13 +738,21 @@ namespace UAS_DeviceMonitor
             this.dc_name.VisibleIndex = 2;
             this.dc_name.Width = 99;
             // 
+            // dc_type
+            // 
+            this.dc_type.Caption = "指令类型";
+            this.dc_type.FieldName = "DC_TYPE";
+            this.dc_type.Name = "dc_type";
+            this.dc_type.Visible = true;
+            this.dc_type.VisibleIndex = 3;
+            // 
             // dc_value
             // 
             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.VisibleIndex = 4;
             this.dc_value.Width = 291;
             // 
             // dc_sendcoding
@@ -619,7 +762,7 @@ namespace UAS_DeviceMonitor
             this.dc_sendcoding.FieldName = "DC_SENDCODING";
             this.dc_sendcoding.Name = "dc_sendcoding";
             this.dc_sendcoding.Visible = true;
-            this.dc_sendcoding.VisibleIndex = 4;
+            this.dc_sendcoding.VisibleIndex = 5;
             this.dc_sendcoding.Width = 219;
             // 
             // CommandSetRepositoryItemComboBox1
@@ -636,9 +779,17 @@ namespace UAS_DeviceMonitor
             this.dc_receivecoding.FieldName = "DC_RECEIVECODING";
             this.dc_receivecoding.Name = "dc_receivecoding";
             this.dc_receivecoding.Visible = true;
-            this.dc_receivecoding.VisibleIndex = 5;
+            this.dc_receivecoding.VisibleIndex = 6;
             this.dc_receivecoding.Width = 231;
             // 
+            // db_name
+            // 
+            this.db_name.Caption = "品牌";
+            this.db_name.FieldName = "DB_NAME";
+            this.db_name.Name = "db_name";
+            this.db_name.Visible = true;
+            this.db_name.VisibleIndex = 7;
+            // 
             // PageDeviceNetSetting
             // 
             this.PageDeviceNetSetting.Controls.Add(this.ButtonDeleteNetConfig);
@@ -902,6 +1053,7 @@ namespace UAS_DeviceMonitor
             this.dpc_function,
             this.dpc_enable,
             this.dpc_status,
+            this.dpc_man,
             this.dpc_remark,
             this.POLLSETTINGSTATUSCOLUMN});
             this.GridViewPollSetting.GridControl = this.GridPollingSetting;
@@ -909,6 +1061,7 @@ namespace UAS_DeviceMonitor
             this.GridViewPollSetting.Name = "GridViewPollSetting";
             this.GridViewPollSetting.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
             this.GridViewPollSetting.OptionsView.ShowGroupPanel = false;
+            this.GridViewPollSetting.CellValueChanged += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.GridViewPollSetting_CellValueChanged);
             this.GridViewPollSetting.CellValueChanging += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.GridViewPollSetting_CellValueChanging);
             // 
             // PollSettingCheckedColumn
@@ -1030,13 +1183,21 @@ namespace UAS_DeviceMonitor
             this.dpc_status.VisibleIndex = 6;
             this.dpc_status.Width = 90;
             // 
+            // dpc_man
+            // 
+            this.dpc_man.Caption = "维护人";
+            this.dpc_man.FieldName = "DPC_MAN";
+            this.dpc_man.Name = "dpc_man";
+            this.dpc_man.Visible = true;
+            this.dpc_man.VisibleIndex = 7;
+            // 
             // dpc_remark
             // 
             this.dpc_remark.Caption = "备注";
             this.dpc_remark.FieldName = "DPC_REMARK";
             this.dpc_remark.Name = "dpc_remark";
             this.dpc_remark.Visible = true;
-            this.dpc_remark.VisibleIndex = 7;
+            this.dpc_remark.VisibleIndex = 8;
             this.dpc_remark.Width = 87;
             // 
             // POLLSETTINGSTATUSCOLUMN
@@ -1046,7 +1207,7 @@ namespace UAS_DeviceMonitor
             this.POLLSETTINGSTATUSCOLUMN.Name = "POLLSETTINGSTATUSCOLUMN";
             this.POLLSETTINGSTATUSCOLUMN.OptionsColumn.ReadOnly = true;
             this.POLLSETTINGSTATUSCOLUMN.Visible = true;
-            this.POLLSETTINGSTATUSCOLUMN.VisibleIndex = 8;
+            this.POLLSETTINGSTATUSCOLUMN.VisibleIndex = 9;
             this.POLLSETTINGSTATUSCOLUMN.Width = 98;
             // 
             // PollingSetItemLookUpEdit
@@ -1343,6 +1504,11 @@ namespace UAS_DeviceMonitor
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).EndInit();
             this.MainTabControl.ResumeLayout(false);
             this.PageDeviceList.ResumeLayout(false);
+            this.PageDeviceList.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.ComBoxDeviceListMan.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComboxDeviceListWC.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComboxDeviceListLC.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridDeviceList)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceList)).EndInit();
             this.PageCommandSet.ResumeLayout(false);
@@ -1407,7 +1573,6 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn de_vendname;
         private DevExpress.XtraGrid.Columns.GridColumn de_address;
         private DevExpress.XtraGrid.Columns.GridColumn de_wccode;
-        private CustomerControl.PagingControl.PageControl ToolPageControlDeviceList;
         private AutoDataGridControl GridCommandSetting;
         private DevExpress.XtraGrid.Columns.GridColumn dc_id;
         private DevExpress.XtraGrid.Columns.GridColumn dc_code;
@@ -1489,5 +1654,19 @@ namespace UAS_DeviceMonitor
         private CheckEdit CheckEditDeviceStatusEnable;
         private ComboBoxEdit ComboxDeviceStatusLC;
         private ComboBoxEdit ComboxDeviceStatusWC;
+        private LabelControl ComBoxDeviceListMan_label;
+        private ComboBoxEdit ComboxDeviceListWC;
+        private ComboBoxEdit ComboxDeviceListLC;
+        private LabelControl ComboxDeviceListLC_label;
+        private LabelControl ComboxDeviceListWC_label;
+        private SearchLookUpEdit ComBoxDeviceListMan;
+        private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
+        private DevExpress.XtraGrid.Columns.GridColumn em_code;
+        private DevExpress.XtraGrid.Columns.GridColumn em_name;
+        private DevExpress.XtraGrid.Columns.GridColumn de_inman;
+        private DevExpress.XtraGrid.Columns.GridColumn de_linecode;
+        private DevExpress.XtraGrid.Columns.GridColumn dc_type;
+        private DevExpress.XtraGrid.Columns.GridColumn db_name;
+        private DevExpress.XtraGrid.Columns.GridColumn dpc_man;
     }
 }

+ 78 - 7
UAS_DeviceMonitor/Main.cs

@@ -24,7 +24,9 @@ namespace UAS_DeviceMonitor
         StringBuilder sql = new StringBuilder();
         //用于设备状态查询界面SQL查看
         StringBuilder DeviceStatusQuerySQL = new StringBuilder();
-        DataHelper dh=SystemInf.dh;
+        //用于设备主档资料查询界面SQL查看
+        StringBuilder DeviceListQuerySQL = new StringBuilder();
+        DataHelper dh = SystemInf.dh;
         ModeBusTCPServer mbt = new ModeBusTCPServer();
         List<string> SQL = new List<string>();
 
@@ -76,8 +78,8 @@ namespace UAS_DeviceMonitor
         private void Main_Load(object sender, EventArgs e)
         {
             //设备列表
-            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 order by de_code".ToUpper();
-            ToolPageControlDeviceList.Gridcontrol = GridDeviceList;
+            GridDeviceList.GetDataSQL = "select de_id,de_code,de_name,de_spec,de_indate,de_runstatus,de_address,de_inman,de_linecode,de_wccode,de_vendcode,de_vendname from device order by de_code".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";
@@ -87,17 +89,16 @@ namespace UAS_DeviceMonitor
             //ButtonSavePolling.Grid = GridPolling;
             //ButtonAddPolling.Grid = GridPolling;
             //轮询配置界面
-            GridPollingSetting.GetDataSQL = "SELECT '' POLLSETTINGSTATUSCOLUMN,0 CHECKEDCOLUMN,DPC_ID,DPC_DECODE ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , nvl(DPC_ENABLE,0)DPC_ENABLE,DPC_STATUS ,DPC_REMARK FROM DEVICEPOLLINGCONFIG ORDER BY DPC_ID";
+            GridPollingSetting.GetDataSQL = "SELECT '' POLLSETTINGSTATUSCOLUMN,0 CHECKEDCOLUMN,DPC_MAN,DPC_ID,DPC_DECODE ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , nvl(DPC_ENABLE,0)DPC_ENABLE,DPC_STATUS ,DPC_REMARK FROM DEVICEPOLLINGCONFIG ORDER BY DPC_ID";
             GridPollingSetting.ID = "DPC_ID";
             GridPollingSetting.TableName = "DEVICEPOLLINGCONFIG";
             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_value,dc_sendcoding,dc_receivecoding from devicecommand ".ToUpper();
+            GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_name,dc_type,dc_value,dc_sendcoding,dc_receivecoding,db_name from devicecommand left join devicebrand on db_code=dc_debrand".ToUpper();
             GridCommandSetting.TableName = "devicecommand";
             GridCommandSetting.ID = "dc_id";
             GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding)";
@@ -136,6 +137,62 @@ namespace UAS_DeviceMonitor
             ddi.StartPosition = FormStartPosition.CenterScreen;
             ddi.ShowDialog();
         }
+
+        private void PageDeviceList_VisibleChanged(object sender, EventArgs e)
+        {
+            if (PageDeviceList.PageVisible)
+            {
+                DataTable dt;
+                //填充人员资料,工作中心,线别下拉框
+                ComBoxDeviceListMan.Properties.DataSource = (DataTable)dh.ExecuteSql("select em_code,em_name from employee ", "select");
+                dt = (DataTable)dh.ExecuteSql("select wc_code,wc_name from workcenter", "select");
+                BaseUtil.FillComBoxEditWidthDataTable(ComboxDeviceListWC, "wc_name", "wc_code", dt, true);
+            }
+        }
+
+        private void ComboxDeviceListWC_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            DeviceListQuerySQL.Clear();
+            string WC = BaseUtil.GetComboxEditValue(ComboxDeviceListWC);
+            DeviceListQuerySQL.Append("select de_id,de_code,de_name,de_spec,de_indate,de_runstatus,de_address,de_wccode,de_inman,de_linecode");
+            DeviceListQuerySQL.Append("de_vendcode,de_vendname from device where de_wccode='" + WC + "' order by de_code");
+            sql.Clear();
+            if (WC == "全部")
+                sql.Append("select li_code,li_name from line");
+            else
+                sql.Append("select li_code,li_name from line where li_wccode='" + WC + "'");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            BaseUtil.FillComBoxEditWidthDataTable(ComboxDeviceListLC, "li_code", "li_name", dt, true);
+            RefreshDeviceData();
+        }
+
+        private void ComboxDeviceListLC_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            DeviceListQuerySQL.Clear();
+            string WC = BaseUtil.GetComboxEditValue(ComboxDeviceListWC);
+            string LC = BaseUtil.GetComboxEditValue(ComboxDeviceListLC);
+            DeviceListQuerySQL.Append("select de_id,de_code,de_name,de_spec,de_indate,de_runstatus,de_address,de_wccode, ");
+            DeviceListQuerySQL.Append("de_vendcode,de_vendname,de_inman,de_linecode from device ");
+            if (WC != "全部" && LC != "全部")
+                DeviceListQuerySQL.Append(" where de_wccode='" + WC + "' and de_linecode='" + LC + "' ");
+            if (WC == "全部" && LC != "全部")
+                DeviceListQuerySQL.Append(" where de_linecode='" + LC + "' ");
+            if (WC != "全部" && LC == "全部")
+                DeviceListQuerySQL.Append(" where de_wccode='" + WC + "' ");
+            DeviceListQuerySQL.Append("order by de_code");
+            RefreshDeviceData();
+        }
+
+        private void ComBoxDeviceListMan_EditValueChanged(object sender, EventArgs e)
+        {
+
+        }
+
+        private void RefreshDeviceData()
+        {
+            GridDeviceList.GetDataSQL = DeviceListQuerySQL.ToString();
+            GridDeviceList.RefreshData();
+        }
         #endregion
 
         #region 界面通用事件
@@ -395,10 +452,18 @@ namespace UAS_DeviceMonitor
         private void GridViewPollSetting_CellValueChanging(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
         {
             GridViewPollSetting.SetRowCellValue(e.RowHandle, e.Column, e.Value);
+        }
+
+        private void GridViewPollSetting_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
+        {
+
             if (e.Column.Name.ToUpper() == "DPC_ENABLE")
             {
                 if (GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_ENABLE").ToString() == "0")
                 {
+                    //DialogResult cancel = XtraMessageBox.Show("确认禁用该轮询?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+                    //if (cancel.ToString() == "Yes")
+                    //{
                     int id = int.Parse(GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_ID").ToString());
                     if (Ptime.ContainsKey(id))
                     {
@@ -406,8 +471,14 @@ namespace UAS_DeviceMonitor
                         Ptime.Remove(id);
                         PollSettingPaintRowIndex.Remove(e.RowHandle);
                     }
+                    //}
+                    //else
+                    //{
+                    //    Cancel = false;
+                    //    GridViewPollSetting.SetRowCellValue(e.RowHandle, e.Column, -1);
+                    //}
                 }
-                else
+                else 
                 {
                     Polling pl = new Polling();
                     pl.Id = int.Parse(GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_ID").ToString());

+ 1 - 1
UAS_DeviceMonitor/Main.resx

@@ -474,7 +474,7 @@
     <value>17, 17</value>
   </metadata>
   <metadata name="CommonTipController.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>362, 17</value>
+    <value>164, 18</value>
   </metadata>
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>