Pārlūkot izejas kodu

添加参数索引字段

章政 7 gadi atpakaļ
vecāks
revīzija
1cfe777ccd
2 mainītis faili ar 23 papildinājumiem un 13 dzēšanām
  1. 20 10
      PLCDataReader/Main.Designer.cs
  2. 3 3
      PLCDataReader/Main.cs

+ 20 - 10
PLCDataReader/Main.Designer.cs

@@ -33,7 +33,6 @@ namespace UAS_PLCDataReader
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
             this.RibbonNav = new DevExpress.XtraBars.Ribbon.RibbonControl();
             this.ButtonDeviceList = new DevExpress.XtraBars.BarButtonItem();
@@ -167,9 +166,10 @@ namespace UAS_PLCDataReader
             this.PageWorkCenterStatus = new DevExpress.XtraTab.XtraTabPage();
             this.GridWorkCenterStatus = new UAS_PLCDataReader.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.GridViewWorkCenterStatus = new UAS_PLCDataReader.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
-            this.TimerDeviceStatus = new System.Windows.Forms.Timer(this.components);
-            this.CommonTipController = new DevExpress.Utils.ToolTipController(this.components);
-            this.TimerUpdateDevice = new System.Windows.Forms.Timer(this.components);
+            this.TimerDeviceStatus = new System.Windows.Forms.Timer();
+            this.CommonTipController = new DevExpress.Utils.ToolTipController();
+            this.TimerUpdateDevice = new System.Windows.Forms.Timer();
+            this.dc_dataindex = new DevExpress.XtraGrid.Columns.GridColumn();
             ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
@@ -784,6 +784,7 @@ namespace UAS_PLCDataReader
             this.dc_code,
             this.dc_name,
             this.dc_type,
+            this.dc_dataindex,
             this.dc_value,
             this.dc_sendcoding,
             this.dc_receivecoding,
@@ -851,7 +852,7 @@ namespace UAS_PLCDataReader
             this.dc_value.FieldName = "DC_VALUE";
             this.dc_value.Name = "dc_value";
             this.dc_value.Visible = true;
-            this.dc_value.VisibleIndex = 4;
+            this.dc_value.VisibleIndex = 5;
             this.dc_value.Width = 154;
             // 
             // dc_sendcoding
@@ -861,7 +862,7 @@ namespace UAS_PLCDataReader
             this.dc_sendcoding.FieldName = "DC_SENDCODING";
             this.dc_sendcoding.Name = "dc_sendcoding";
             this.dc_sendcoding.Visible = true;
-            this.dc_sendcoding.VisibleIndex = 5;
+            this.dc_sendcoding.VisibleIndex = 6;
             this.dc_sendcoding.Width = 138;
             // 
             // CommandSetRepositoryItemComboBox1
@@ -878,7 +879,7 @@ namespace UAS_PLCDataReader
             this.dc_receivecoding.FieldName = "DC_RECEIVECODING";
             this.dc_receivecoding.Name = "dc_receivecoding";
             this.dc_receivecoding.Visible = true;
-            this.dc_receivecoding.VisibleIndex = 6;
+            this.dc_receivecoding.VisibleIndex = 7;
             this.dc_receivecoding.Width = 139;
             // 
             // dc_man
@@ -888,7 +889,7 @@ namespace UAS_PLCDataReader
             this.dc_man.Name = "dc_man";
             this.dc_man.OptionsColumn.AllowEdit = false;
             this.dc_man.Visible = true;
-            this.dc_man.VisibleIndex = 8;
+            this.dc_man.VisibleIndex = 9;
             this.dc_man.Width = 151;
             // 
             // dc_date
@@ -900,7 +901,7 @@ namespace UAS_PLCDataReader
             this.dc_date.Name = "dc_date";
             this.dc_date.OptionsColumn.AllowEdit = false;
             this.dc_date.Visible = true;
-            this.dc_date.VisibleIndex = 9;
+            this.dc_date.VisibleIndex = 10;
             this.dc_date.Width = 118;
             // 
             // repositoryItemDateEdit1
@@ -918,7 +919,7 @@ namespace UAS_PLCDataReader
             this.db_name.FieldName = "DB_NAME";
             this.db_name.Name = "db_name";
             this.db_name.Visible = true;
-            this.db_name.VisibleIndex = 7;
+            this.db_name.VisibleIndex = 8;
             this.db_name.Width = 57;
             // 
             // PageDeviceNetSetting
@@ -1629,6 +1630,14 @@ namespace UAS_PLCDataReader
             this.TimerUpdateDevice.Interval = 20000;
             this.TimerUpdateDevice.Tick += new System.EventHandler(this.TimerUpdateDevice_Tick);
             // 
+            // dc_dataindex
+            // 
+            this.dc_dataindex.Caption = "数据索引";
+            this.dc_dataindex.FieldName = "DC_DATAINDEX";
+            this.dc_dataindex.Name = "dc_dataindex";
+            this.dc_dataindex.Visible = true;
+            this.dc_dataindex.VisibleIndex = 4;
+            // 
             // Main
             // 
             this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
@@ -1829,5 +1838,6 @@ namespace UAS_PLCDataReader
         private DevExpress.XtraEditors.Repository.RepositoryItemDateEdit repositoryItemDateEdit1;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_dename;
         private System.Windows.Forms.Timer TimerUpdateDevice;
+        private DevExpress.XtraGrid.Columns.GridColumn dc_dataindex;
     }
 }

+ 3 - 3
PLCDataReader/Main.cs

@@ -111,10 +111,10 @@ namespace UAS_PLCDataReader
             ButtonDeleteCommandSet.Grid = GridPollingSetting;
 
             //指令设置界面
-            GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_name,dc_type,dc_value,dc_sendcoding,dc_receivecoding,db_name,dc_man,dc_date from devicecommand left join devicebrand on db_code=dc_debrand".ToUpper();
+            GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_name,dc_type,dc_value,dc_dataindex,dc_sendcoding,dc_receivecoding,db_name,dc_man,dc_date 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,dc_man,dc_date) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate)";
+            GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date,dc_dataindex) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate,:dc_dataindex)";
             ButtonSaveCommand.Grid = GridCommandSetting;
             ButtonDeleteCommand.Grid = GridCommandSetting;
             ButtonNewCommand.Grid = GridCommandSetting;
@@ -316,7 +316,7 @@ namespace UAS_PLCDataReader
         /// <param name="e"></param>
         private void ButtonSaveCommand_Click(object sender, EventArgs e)
         {
-            GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate)";
+            GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date,dc_dataindex) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate,:dc_dataindex)";
             ButtonSaveCommand.DoSaveAfterHandler();
             sql.Clear();
             sql.Append("update devicecommand set dc_man='" + User.UserName + "',dc_date=sysdate where dc_id=:dc_id");