浏览代码

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 7 年之前
父节点
当前提交
fcc8ccee7c

+ 12 - 0
UAS-出货标签管理(泽天)/App.config

@@ -59,6 +59,18 @@
       <setting name="OutboxCapacity" serializeAs="String">
         <value>0</value>
       </setting>
+      <setting name="DCCheck" serializeAs="String">
+        <value>0</value>
+      </setting>
+      <setting name="SPrinter" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="MPrinter" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="OPrinter" serializeAs="String">
+        <value />
+      </setting>
     </UAS_LabelMachine.Properties.Settings>
   </userSettings>
 </configuration>

+ 2 - 2
UAS-出货标签管理(泽天)/Login.Designer.cs

@@ -64,9 +64,9 @@
             this.label1.ForeColor = System.Drawing.SystemColors.Desktop;
             this.label1.Location = new System.Drawing.Point(342, 125);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(243, 28);
+            this.label1.Size = new System.Drawing.Size(231, 28);
             this.label1.TabIndex = 1;
-            this.label1.Text = "优软-出货标签管理系统1";
+            this.label1.Text = "优软-出货标签管理系统";
             // 
             // UserName
             // 

+ 16 - 0
UAS-出货标签管理(泽天)/Login.cs

@@ -3,6 +3,8 @@ using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.IO;
+using System.Net;
+using System.Net.Sockets;
 using System.Windows.Forms;
 using UAS_LabelMachine.Entity;
 using UAS_LabelMachine.PublicMethod;
@@ -88,6 +90,15 @@ namespace UAS_LabelMachine
                 Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
                 Properties.Settings.Default.IPAddress = IP.Text;
                 Properties.Settings.Default.Save();
+                IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
+                string IPAddress = "";
+                for (int i = 0; i < IpEntry.AddressList.Length; i++)
+                {
+                    if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
+                        IPAddress = IpEntry.AddressList[i].ToString();
+                }
+                string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+                RecordLogInfo(User.UserCode, User.UserName, version, "CS", IPAddress);
                 //弹出标签打印的主界面
                 UAS_出货标签打印 main = new UAS_出货标签打印(MasterCombox.Text);
                 main.StartPosition = FormStartPosition.CenterScreen;
@@ -127,5 +138,10 @@ namespace UAS_LabelMachine
         {
             Application.Exit();
         }
+
+        private void RecordLogInfo(string iUserCode, string iUserName, string iVersion, string iType, string iIP)
+        {
+            dh.ExecuteSql("insert into LogInfo(id,sip,usname,indate,uscode,versioncode,terminaltype) values (LogInfo_seq.nextval,'" + iIP + "','" + iUserName + "',sysdate,'" + iUserCode + "','" + iVersion + "','" + iType + "')", "insert");
+        }
     }
 }

+ 11 - 1
UAS-出货标签管理(泽天)/Properties/Resources.Designer.cs

@@ -191,7 +191,7 @@ namespace UAS_LabelMachine.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon matte_white_square_icon_business_tool_hammer_96px_571061_easyicon_net {
             get {
@@ -220,6 +220,16 @@ namespace UAS_LabelMachine.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Status {
+            get {
+                object obj = ResourceManager.GetObject("Status", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 3 - 0
UAS-出货标签管理(泽天)/Properties/Resources.resx

@@ -181,4 +181,7 @@
   <data name="write_15_893687707641px_1181413_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\write_15.893687707641px_1181413_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="Status" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Status.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 12 - 0
UAS-出货标签管理(泽天)/Properties/Settings.settings

@@ -23,5 +23,17 @@
     <Setting Name="OutboxCapacity" Type="System.Decimal" Scope="User">
       <Value Profile="(Default)">0</Value>
     </Setting>
+    <Setting Name="DCCheck" Type="System.Decimal" Scope="User">
+      <Value Profile="(Default)">0</Value>
+    </Setting>
+    <Setting Name="SPrinter" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="MPrinter" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="OPrinter" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
   </Settings>
 </SettingsFile>

+ 48 - 0
UAS-出货标签管理(泽天)/Properties/Settings1.Designer.cs

@@ -106,5 +106,53 @@ namespace UAS_LabelMachine.Properties {
                 this["OutboxCapacity"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]
+        public decimal DCCheck {
+            get {
+                return ((decimal)(this["DCCheck"]));
+            }
+            set {
+                this["DCCheck"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string SPrinter {
+            get {
+                return ((string)(this["SPrinter"]));
+            }
+            set {
+                this["SPrinter"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string MPrinter {
+            get {
+                return ((string)(this["MPrinter"]));
+            }
+            set {
+                this["MPrinter"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string OPrinter {
+            get {
+                return ((string)(this["OPrinter"]));
+            }
+            set {
+                this["OPrinter"] = value;
+            }
+        }
     }
 }

+ 14 - 0
UAS-出货标签管理(泽天)/PublicMethod/BaseUtil.cs

@@ -227,6 +227,20 @@ namespace UAS_LabelMachine
             }
         }
 
+        public static DataTable filterDataTable(DataTable dt, String condition)
+        {
+            if (dt == null)
+                return new DataTable();
+            //获取筛选条件中的列名,值
+            DataRow[] dataRows = dt.Select(condition);
+            DataTable ndt = dt.Clone();
+            for (int i = 0; i < dataRows.Length; i++)
+            {
+                ndt.Rows.Add(dataRows[i].ItemArray);
+            }
+            return ndt;
+        }
+
         /// <summary>
         /// 获取标签的路径
         /// </summary>

+ 6 - 0
UAS-出货标签管理(泽天)/PublicMethod/LogManager.cs

@@ -1,5 +1,6 @@
 using System;
 using System.IO;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine.PublicMethod
 {
@@ -11,5 +12,10 @@ namespace UAS_LabelMachine.PublicMethod
             sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
             sw.Close();
         }
+
+        public static void DoCommandLog(string iInoutNO, string iUserCode, string iOperater, string iResult)
+        {
+            SystemInf.dh.ExecuteSql("insert into CS$PRODOUTLOG (cp_id,cp_inoutno,cp_man,cp_operate,cp_result,cp_date) values(CS$PRODOUTLOG_SEQ.nextval,'" + iInoutNO + "','" + iUserCode + "','" + iOperater + "','" + iResult + "',sysdate)", "insert");
+        }
     }
 }

二进制
UAS-出货标签管理(泽天)/Resources/Status.png


+ 1 - 0
UAS-出货标签管理(泽天)/UAS-出货标签管理(泽天).csproj

@@ -745,6 +745,7 @@
       <Generator>WCF Proxy Generator</Generator>
       <LastGenOutput>Reference.cs</LastGenOutput>
     </None>
+    <None Include="Resources\Status.png" />
     <Content Include="tool\Analysis.dll" />
     <Content Include="tool\DataHelper.dll" />
     <Content Include="tool\NPOI.dll" />

文件差异内容过多而无法显示
+ 362 - 424
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs


文件差异内容过多而无法显示
+ 410 - 437
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs


+ 18 - 0
UAS-出货标签管理(泽天)/UAS_出货标签管理.resx

@@ -126,9 +126,24 @@
   <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>294, 17</value>
   </metadata>
+  <metadata name="pd_pdno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pjd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="CollectedNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="UnCollectedNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_outqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pr_unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -147,6 +162,9 @@
   <metadata name="pib_custbarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pib_custmidboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pib_custoutboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 2 - 0
UAS-出货标签管理(泽天)/附件内容打印.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
 
 namespace UAS_LabelMachine
 {
@@ -49,6 +50,7 @@ namespace UAS_LabelMachine
                 }
                 dh.ExecuteSql(SQL, "insert");
             }
+            LogManager.DoCommandLog(custcode, User.UserCode, "保存附加参数", "成功");
             MessageBox.Show("保存成功");
             Close();
         }

+ 38 - 115
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -95,12 +95,7 @@
             this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.AttachInfo = new System.Windows.Forms.Button();
             this.pi_date = new System.Windows.Forms.Label();
-            this.label19 = new System.Windows.Forms.Label();
-            this.GridPrcode = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
-            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
-            this.SetPrintStatus_label = new System.Windows.Forms.Label();
-            this.SetPrintStatus = new System.Windows.Forms.Button();
             this.ExportData = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
             this.MidBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -190,7 +185,6 @@
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             this.CollectionProcess.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
@@ -495,7 +489,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(276, 587);
+            this.label3.Location = new System.Drawing.Point(5, 587);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 29;
@@ -789,43 +783,8 @@
             this.pi_date.TabIndex = 86;
             this.pi_date.Visible = false;
             // 
-            // label19
-            // 
-            this.label19.AutoSize = true;
-            this.label19.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label19.Location = new System.Drawing.Point(4, 584);
-            this.label19.Name = "label19";
-            this.label19.Size = new System.Drawing.Size(74, 21);
-            this.label19.TabIndex = 87;
-            this.label19.Text = "物料资料";
-            // 
-            // GridPrcode
-            // 
-            this.GridPrcode.AllowUserToAddRows = false;
-            this.GridPrcode.BackgroundColor = System.Drawing.SystemColors.Control;
-            this.GridPrcode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.GridPrcode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.pd_prodcode});
-            this.GridPrcode.GridColor = System.Drawing.SystemColors.Control;
-            this.GridPrcode.Location = new System.Drawing.Point(9, 610);
-            this.GridPrcode.Name = "GridPrcode";
-            this.GridPrcode.ReadOnly = true;
-            this.GridPrcode.RowTemplate.Height = 23;
-            this.GridPrcode.Size = new System.Drawing.Size(263, 97);
-            this.GridPrcode.TabIndex = 88;
-            this.GridPrcode.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridPrcode_CellClick);
-            // 
-            // pd_prodcode
-            // 
-            this.pd_prodcode.DataPropertyName = "pib_prodcode";
-            this.pd_prodcode.HeaderText = "物料编号";
-            this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.ReadOnly = true;
-            // 
             // groupBoxWithBorder1
             // 
-            this.groupBoxWithBorder1.Controls.Add(this.SetPrintStatus_label);
-            this.groupBoxWithBorder1.Controls.Add(this.SetPrintStatus);
             this.groupBoxWithBorder1.Controls.Add(this.ExportData);
             this.groupBoxWithBorder1.Controls.Add(this.label18);
             this.groupBoxWithBorder1.Controls.Add(this.MidBoxEnd);
@@ -844,35 +803,11 @@
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = " 打印参数设置";
             // 
-            // SetPrintStatus_label
-            // 
-            this.SetPrintStatus_label.AutoSize = true;
-            this.SetPrintStatus_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.SetPrintStatus_label.ForeColor = System.Drawing.Color.Green;
-            this.SetPrintStatus_label.Location = new System.Drawing.Point(11, 202);
-            this.SetPrintStatus_label.Name = "SetPrintStatus_label";
-            this.SetPrintStatus_label.Size = new System.Drawing.Size(58, 21);
-            this.SetPrintStatus_label.TabIndex = 76;
-            this.SetPrintStatus_label.Text = "可打印";
-            // 
-            // SetPrintStatus
-            // 
-            this.SetPrintStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.SetPrintStatus.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SetPrintStatus.Location = new System.Drawing.Point(78, 200);
-            this.SetPrintStatus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.SetPrintStatus.Name = "SetPrintStatus";
-            this.SetPrintStatus.Size = new System.Drawing.Size(68, 26);
-            this.SetPrintStatus.TabIndex = 92;
-            this.SetPrintStatus.Text = "打印状态";
-            this.SetPrintStatus.UseVisualStyleBackColor = true;
-            this.SetPrintStatus.Click += new System.EventHandler(this.SetPrintStatus_Click);
-            // 
             // ExportData
             // 
             this.ExportData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ExportData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ExportData.Location = new System.Drawing.Point(78, 165);
+            this.ExportData.Location = new System.Drawing.Point(69, 164);
             this.ExportData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ExportData.Name = "ExportData";
             this.ExportData.Size = new System.Drawing.Size(68, 26);
@@ -885,7 +820,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(69, 128);
+            this.label18.Location = new System.Drawing.Point(68, 127);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(13, 17);
             this.label18.TabIndex = 90;
@@ -919,7 +854,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(68, 55);
+            this.label16.Location = new System.Drawing.Point(67, 54);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(13, 17);
             this.label16.TabIndex = 87;
@@ -953,7 +888,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(12, 94);
+            this.label12.Location = new System.Drawing.Point(11, 93);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(56, 17);
             this.label12.TabIndex = 77;
@@ -963,7 +898,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(12, 21);
+            this.label7.Location = new System.Drawing.Point(11, 20);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(56, 17);
             this.label7.TabIndex = 76;
@@ -1016,7 +951,7 @@
             // 
             this.Capacity.AutoSize = true;
             this.Capacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Capacity.Location = new System.Drawing.Point(60, 64);
+            this.Capacity.Location = new System.Drawing.Point(59, 63);
             this.Capacity.Name = "Capacity";
             this.Capacity.Size = new System.Drawing.Size(0, 17);
             this.Capacity.TabIndex = 75;
@@ -1025,7 +960,7 @@
             // 
             this.Process_midboxcode.AutoSize = true;
             this.Process_midboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_midboxcode.Location = new System.Drawing.Point(60, 109);
+            this.Process_midboxcode.Location = new System.Drawing.Point(59, 108);
             this.Process_midboxcode.Name = "Process_midboxcode";
             this.Process_midboxcode.Size = new System.Drawing.Size(15, 17);
             this.Process_midboxcode.TabIndex = 74;
@@ -1035,7 +970,7 @@
             // 
             this.Process_outboxcode.AutoSize = true;
             this.Process_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_outboxcode.Location = new System.Drawing.Point(60, 85);
+            this.Process_outboxcode.Location = new System.Drawing.Point(59, 84);
             this.Process_outboxcode.Name = "Process_outboxcode";
             this.Process_outboxcode.Size = new System.Drawing.Size(15, 17);
             this.Process_outboxcode.TabIndex = 73;
@@ -1046,7 +981,7 @@
             this.TotalCount.AutoSize = true;
             this.TotalCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.TotalCount.ForeColor = System.Drawing.Color.Blue;
-            this.TotalCount.Location = new System.Drawing.Point(94, 16);
+            this.TotalCount.Location = new System.Drawing.Point(93, 15);
             this.TotalCount.Name = "TotalCount";
             this.TotalCount.Size = new System.Drawing.Size(15, 17);
             this.TotalCount.TabIndex = 72;
@@ -1056,7 +991,7 @@
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(81, 16);
+            this.label17.Location = new System.Drawing.Point(80, 15);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(13, 17);
             this.label17.TabIndex = 71;
@@ -1067,7 +1002,7 @@
             this.CollectedCount.AutoSize = true;
             this.CollectedCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectedCount.ForeColor = System.Drawing.Color.Red;
-            this.CollectedCount.Location = new System.Drawing.Point(63, 16);
+            this.CollectedCount.Location = new System.Drawing.Point(62, 15);
             this.CollectedCount.Name = "CollectedCount";
             this.CollectedCount.Size = new System.Drawing.Size(15, 17);
             this.CollectedCount.TabIndex = 70;
@@ -1077,7 +1012,7 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(10, 86);
+            this.label14.Location = new System.Drawing.Point(9, 85);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(32, 17);
             this.label14.TabIndex = 69;
@@ -1087,7 +1022,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(10, 109);
+            this.label11.Location = new System.Drawing.Point(9, 108);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(32, 17);
             this.label11.TabIndex = 68;
@@ -1097,7 +1032,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(10, 45);
+            this.label13.Location = new System.Drawing.Point(9, 44);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(44, 17);
             this.label13.TabIndex = 67;
@@ -1107,7 +1042,7 @@
             // 
             this.Installed.AutoSize = true;
             this.Installed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Installed.Location = new System.Drawing.Point(60, 45);
+            this.Installed.Location = new System.Drawing.Point(59, 44);
             this.Installed.Name = "Installed";
             this.Installed.Size = new System.Drawing.Size(0, 17);
             this.Installed.TabIndex = 66;
@@ -1116,7 +1051,7 @@
             // 
             this.Process.AutoSize = true;
             this.Process.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process.Location = new System.Drawing.Point(10, 16);
+            this.Process.Location = new System.Drawing.Point(9, 15);
             this.Process.Name = "Process";
             this.Process.Size = new System.Drawing.Size(44, 17);
             this.Process.TabIndex = 65;
@@ -1184,10 +1119,10 @@
             // MessageLog
             // 
             this.MessageLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MessageLog.Location = new System.Drawing.Point(278, 610);
+            this.MessageLog.Location = new System.Drawing.Point(4, 610);
             this.MessageLog.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MessageLog.Name = "MessageLog";
-            this.MessageLog.Size = new System.Drawing.Size(975, 97);
+            this.MessageLog.Size = new System.Drawing.Size(1249, 97);
             this.MessageLog.TabIndex = 28;
             this.MessageLog.Text = "";
             // 
@@ -1472,7 +1407,7 @@
             // 
             this.ViVoPlate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ViVoPlate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ViVoPlate.Location = new System.Drawing.Point(77, 165);
+            this.ViVoPlate.Location = new System.Drawing.Point(34, 164);
             this.ViVoPlate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ViVoPlate.Name = "ViVoPlate";
             this.ViVoPlate.Size = new System.Drawing.Size(68, 26);
@@ -1494,7 +1429,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(77, 200);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(34, 199);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1506,10 +1441,8 @@
             // SingleLabelAutoPrint
             // 
             this.SingleLabelAutoPrint.AutoSize = true;
-            this.SingleLabelAutoPrint.Checked = true;
-            this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(8, 107);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(10, 109);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1567,7 +1500,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(6, 165);
+            this.label5.Location = new System.Drawing.Point(5, 169);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -1577,7 +1510,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(6, 135);
+            this.label4.Location = new System.Drawing.Point(5, 137);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(32, 17);
             this.label4.TabIndex = 49;
@@ -1596,7 +1529,7 @@
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(102, 134);
+            this.label15.Location = new System.Drawing.Point(101, 138);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(20, 17);
             this.label15.TabIndex = 40;
@@ -1627,10 +1560,8 @@
             // MidLabelAutoPrint
             // 
             this.MidLabelAutoPrint.AutoSize = true;
-            this.MidLabelAutoPrint.Checked = true;
-            this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(9, 106);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(9, 109);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1680,7 +1611,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(113, 14);
+            this.LogingOut.Location = new System.Drawing.Point(112, 13);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(42, 21);
             this.LogingOut.TabIndex = 77;
@@ -1717,7 +1648,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(7, 179);
+            this.label10.Location = new System.Drawing.Point(6, 178);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -1740,7 +1671,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(87, 211);
+            this.label9.Location = new System.Drawing.Point(86, 210);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(32, 17);
             this.label9.TabIndex = 88;
@@ -1763,7 +1694,7 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(7, 211);
+            this.label8.Location = new System.Drawing.Point(6, 210);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(32, 17);
             this.label8.TabIndex = 83;
@@ -1773,7 +1704,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(7, 149);
+            this.label6.Location = new System.Drawing.Point(6, 148);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(32, 17);
             this.label6.TabIndex = 87;
@@ -1831,7 +1762,7 @@
             // 
             this.OutBoxLabelAutoPrint.AutoSize = true;
             this.OutBoxLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(10, 110);
+            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(9, 109);
             this.OutBoxLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabelAutoPrint.Name = "OutBoxLabelAutoPrint";
             this.OutBoxLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1857,8 +1788,6 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1257, 711);
-            this.Controls.Add(this.GridPrcode);
-            this.Controls.Add(this.label19);
             this.Controls.Add(this.pi_date);
             this.Controls.Add(this.AttachInfo);
             this.Controls.Add(this.groupBoxWithBorder1);
@@ -1911,21 +1840,20 @@
             this.SizeChanged += new System.EventHandler(this.贴标机条码打印_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
-            this.CollectionProcess.ResumeLayout(true);
+            this.CollectionProcess.ResumeLayout(false);
             this.CollectionProcess.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
-            this.SingleLabel.ResumeLayout(true);
+            this.SingleLabel.ResumeLayout(false);
             this.SingleLabel.PerformLayout();
-            this.MidLabel.ResumeLayout(true);
+            this.MidLabel.ResumeLayout(false);
             this.MidLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).EndInit();
-            this.OutBoxLabel.ResumeLayout(true);
+            this.OutBoxLabel.ResumeLayout(false);
             this.OutBoxLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -2084,10 +2012,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
-        private System.Windows.Forms.Label label19;
-        private CustomControl.DataGridViewWithSerialNum GridPrcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
-        private System.Windows.Forms.Button SetPrintStatus;
-        private System.Windows.Forms.Label SetPrintStatus_label;
     }
 }

+ 12 - 77
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -733,12 +733,8 @@ namespace UAS_LabelMachine
                 }
             }
             LogManager.DoLog(ParamLog.ToString());
-            //保存参数打印
-            if (EnablePrint)
-            {
-                SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
-                SingleDoc.PrintDocument();
-            }
+            SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
+            SingleDoc.PrintDocument();
             LabelInf.Rows[CurrentRowIndex].Cells["pib_ifprint"].Value = true;
         }
 
@@ -1152,7 +1148,7 @@ namespace UAS_LabelMachine
             if (OutBoxCombox.Text != "")
             {
                 OutBoxDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + OutBoxCombox.Text);
-                OutLabelParam = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + OutBoxCombox.SelectedValue.ToString().Split('#')[0], "select");
+                OutLabelParam = (DataTable)dh.ExecuteSql("select lp_name,lp_sql,lp_valuetype from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + OutBoxCombox.SelectedValue.ToString().Split('#')[0], "select");
                 OutLabelParam.Merge(Attach);
             }
             //缓存外箱参数
@@ -1206,7 +1202,6 @@ namespace UAS_LabelMachine
                         //if (int.Parse(outboxcode == "" ? "1" : outboxcode) > MaxOutBoxCode)
                         //    MaxOutBoxCode = int.Parse(outboxcode);
                     }
-                    LoadPrcodeData();
                     thread = new Thread(GetInOutInfAndLabelFile);
                     stw = new SetLoadingWindow(thread, "正在获取打印标签");
                     BaseUtil.SetFormCenter(stw);
@@ -1355,12 +1350,9 @@ namespace UAS_LabelMachine
                                 ParamLog.AppendLine("pib_id:" + LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",SingleDoc打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
                             }
                             LogManager.DoLog(ParamLog.ToString());
-                            //保存参数打印
-                            if (EnablePrint)
-                            {
-                                SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
-                                SingleDoc.PrintDocument();
-                            }
+
+                            SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
+                            SingleDoc.PrintDocument();
                             if (MidLabelAutoPrint.Checked)
                             {
                                 //判断当前行的盒号和下一行不相等或者已经是最后一行了
@@ -1855,12 +1847,8 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            //保存参数打印
-            if (EnablePrint)
-            {
-                MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
-                MidDoc.PrintDocument();
-            }
+            MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
+            MidDoc.PrintDocument();
         }
 
         private void MidBoxCodePrint(string la_id, int rowindex, int[] midindex)
@@ -1940,12 +1928,8 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            //保存参数打印
-            if (EnablePrint)
-            {
-                MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
-                MidDoc.PrintDocument();
-            }
+            MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
+            MidDoc.PrintDocument();
         }
 
         /// <summary>
@@ -2035,12 +2019,8 @@ namespace UAS_LabelMachine
                         }
                     }
                 }
-                //保存参数打印
-                if (EnablePrint)
-                {
-                    OutBoxDoc.Printer.SwitchTo(OutBoxPrinter.Text);
-                    OutBoxDoc.PrintDocument();
-                }
+                OutBoxDoc.Printer.SwitchTo(OutBoxPrinter.Text);
+                OutBoxDoc.PrintDocument();
                 LogManager.DoLog("执行打印外箱,pib_id:" + LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString());
             }
             catch (Exception ex) { MessageBox.Show(ex.Message); }
@@ -2729,50 +2709,5 @@ namespace UAS_LabelMachine
         {
             dh.ExecuteSql("select count(1) from employee", "select");
         }
-
-        private void LoadPrcodeData()
-        {
-            GridPrcode.DataSource = (DataTable)dh.ExecuteSql("select distinct pib_prodcode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by pib_prodcode", "select");
-        }
-
-        private void GridPrcode_CellClick(object sender, DataGridViewCellEventArgs e)
-        {
-            //用户在重新勾选后重置采集项目的索引
-            if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
-            {
-                CurrentItemIndex = 0;
-                DataGridViewSelectedRowCollection col = LabelInf.SelectedRows;
-                for (int i = 0; i < col.Count; i++)
-                {
-                    col[i].Selected = false;
-                }
-                for (int i = 0; i < LabelInf.RowCount; i++)
-                {
-                    if (GridPrcode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
-                    {
-                        CurrentRowIndex = i;
-                        LabelInf.Rows[i].Selected=true;
-                        break;
-                    }
-                }
-            }
-        }
-
-        private bool EnablePrint = true;
-
-        private void SetPrintStatus_Click(object sender, EventArgs e)
-        {
-            EnablePrint = !EnablePrint;
-            if (EnablePrint)
-            {
-                SetPrintStatus_label.ForeColor = Color.Green;
-                SetPrintStatus_label.Text = "可打印";
-            }
-            else
-            {
-                SetPrintStatus_label.ForeColor = Color.Red;
-                SetPrintStatus_label.Text = "暂停打印";
-            }
-        }
     }
 }

+ 0 - 3
UAS-出货标签管理/UAS_出货标签管理.resx

@@ -150,9 +150,6 @@
   <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>294, 17</value>
   </metadata>
-  <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="pib_madein.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 10 - 10
UAS_DeviceMonitor/Main.cs

@@ -16,11 +16,13 @@ namespace UAS_DeviceMonitor
     {
 
         StringBuilder sql = new StringBuilder();
+        DataHelper dh;
 
         #region 初始化代码
         public Main()
         {
-            SystemInf.dh = new DataHelper();
+            dh = new DataHelper();
+            SystemInf.dh = dh;
             InitializeComponent();
             dpc_enableCheckEdit.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
             CheckEditCommandSet.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
@@ -188,13 +190,10 @@ namespace UAS_DeviceMonitor
         #region PagePolling业务代码
         private void GridPolling_VisibleChanged(object sender, EventArgs e)
         {
-            if (PagePollingSetting.PageVisible)
-            {
-                DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select dc_name,dc_code from devicecommand ", "select");
-                PollingSetItemLookUpEdit.DataSource = dt;
-                PollingSetItemLookUpEdit.DisplayMember = "DC_NAME";
-                PollingSetItemLookUpEdit.ValueMember = "DC_CODE";
-            }
+            DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select dc_name,dc_code from devicecommand ", "select");
+            PollingSetItemLookUpEdit.DataSource = dt;
+            PollingSetItemLookUpEdit.DisplayMember = "DC_NAME";
+            PollingSetItemLookUpEdit.ValueMember = "DC_CODE";
         }
         #endregion
 
@@ -272,7 +271,8 @@ namespace UAS_DeviceMonitor
             PollingTimer timer = (PollingTimer)sender;
             Polling pl = (Polling)timer.Polling;
             string Decode = pl.DeviceCode;
-            Console.WriteLine(Decode);
+            string IP = dh.getFieldDataByCondition("DEVICENETCONFIG", "dnc_ip", "dnc_decode='"+ Decode + "'").ToString();
+            Console.WriteLine(IP);
         }
 
         /// <summary>
@@ -328,8 +328,8 @@ namespace UAS_DeviceMonitor
                 if (rows != null && rows.Length > 0)
                 {
                     DataRow row = rows[0];
-                    Console.WriteLine(row["PL_DCCODE"].ToString());
                     GridViewPollSetting.SetRowCellValue(e.RowHandle, "DPC_DCCODE", row["PL_DCCODE"].ToString());
+                    GridViewPollSetting.SetRowCellValue(e.RowHandle, "DPC_PLNAME", row["PL_NAME"].ToString());
                 }
             }
         }

部分文件因为文件数量过多而无法显示