章政 6 жил өмнө
parent
commit
554ee8fc52

+ 18 - 4
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -28,7 +28,6 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UAS_出货标签打印));
             this.pi_inoutno_label = new System.Windows.Forms.Label();
@@ -38,7 +37,7 @@
             this.pib_id = new System.Windows.Forms.Label();
             this.pi_cardcode = new System.Windows.Forms.Label();
             this.Fresh = new System.Windows.Forms.LinkLabel();
-            this.RefreshDBConnect = new System.Windows.Forms.Timer(this.components);
+            this.RefreshDBConnect = new System.Windows.Forms.Timer();
             this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -65,7 +64,7 @@
             this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.MidSource = new System.Windows.Forms.BindingSource(this.components);
+            this.MidSource = new System.Windows.Forms.BindingSource();
             this.ChooseAll = new System.Windows.Forms.Button();
             this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.AttachInfo = new System.Windows.Forms.Button();
@@ -168,6 +167,7 @@
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
             this.Reset = new System.Windows.Forms.Button();
             this.GetPDdata = new System.Windows.Forms.Button();
+            this.OnlyOneRow = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
@@ -1441,6 +1441,7 @@
             // 
             // OutBoxLabel
             // 
+            this.OutBoxLabel.Controls.Add(this.OnlyOneRow);
             this.OutBoxLabel.Controls.Add(this.AllLabel);
             this.OutBoxLabel.Controls.Add(this.AddNewOutBox);
             this.OutBoxLabel.Controls.Add(this.LogingOut);
@@ -1465,7 +1466,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(8, 93);
+            this.AllLabel.Location = new System.Drawing.Point(7, 93);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(99, 21);
@@ -1603,6 +1604,18 @@
             this.GetPDdata.UseVisualStyleBackColor = true;
             this.GetPDdata.Click += new System.EventHandler(this.GetPDdata_Click);
             // 
+            // OnlyOneRow
+            // 
+            this.OnlyOneRow.AutoSize = true;
+            this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OnlyOneRow.Location = new System.Drawing.Point(107, 93);
+            this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OnlyOneRow.Name = "OnlyOneRow";
+            this.OnlyOneRow.Size = new System.Drawing.Size(63, 21);
+            this.OnlyOneRow.TabIndex = 94;
+            this.OnlyOneRow.Text = "仅单行";
+            this.OnlyOneRow.UseVisualStyleBackColor = true;
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1816,5 +1829,6 @@
         private System.Windows.Forms.Button AddNewOutBox;
         private System.Windows.Forms.Button GetPDdata;
         private System.Windows.Forms.CheckBox AllLabel;
+        private System.Windows.Forms.CheckBox OnlyOneRow;
     }
 }

+ 10 - 1
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -1056,7 +1056,16 @@ namespace UAS_LabelMachine
                     }
                 }
                 string pib_outboxcode2 = LabelInf.Rows[rowindex].Cells["pib_outboxcode2"].Value.ToString();
-                DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiooutinfo_view where 出货单号='" + pi_inoutno.Text + "' and 外箱号='" + pib_outboxcode2 + "'", "select");
+                string SQL = "";
+                if (OnlyOneRow.Checked)
+                {
+                    SQL = "select * from prodiooutinfo_view where 出货单号 = '" + pi_inoutno.Text + "' and 外箱号 = '" + pib_outboxcode2 + "' and rownum=1";
+                }
+                else
+                {
+                    SQL = "select * from prodiooutinfo_view where 出货单号 = '" + pi_inoutno.Text + "' and 外箱号 = '" + pib_outboxcode2 + "'";
+                }
+                DataTable dt = (DataTable)dh.ExecuteSql(SQL, "select");
                 OutReport.RegisterData(dt, "prodiooutinfo_view");
                 OutReport.GetDataSource("prodiooutinfo_view").Enabled = true;
                 OutReport.PrintSettings.ShowDialog = false;