Browse Source

添加查询计数

章政 8 years ago
parent
commit
f20a6c62ad

+ 55 - 1
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.Designer.cs

@@ -45,6 +45,10 @@
             this.ms_stepcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_nextstepcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Count_label = new System.Windows.Forms.Label();
+            this.Count = new System.Windows.Forms.Label();
+            this.ma_qty_label = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.SnInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -190,7 +194,7 @@
             this.SnInf.Margin = new System.Windows.Forms.Padding(4);
             this.SnInf.Name = "SnInf";
             this.SnInf.RowTemplate.Height = 23;
-            this.SnInf.Size = new System.Drawing.Size(1261, 624);
+            this.SnInf.Size = new System.Drawing.Size(1261, 590);
             this.SnInf.TabIndex = 203;
             // 
             // ms_sncode
@@ -233,11 +237,57 @@
             this.Column5.Name = "Column5";
             this.Column5.ReadOnly = true;
             // 
+            // Count_label
+            // 
+            this.Count_label.AutoSize = true;
+            this.Count_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Count_label.Location = new System.Drawing.Point(275, 664);
+            this.Count_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Count_label.Name = "Count_label";
+            this.Count_label.Size = new System.Drawing.Size(132, 27);
+            this.Count_label.TabIndex = 212;
+            this.Count_label.Text = "当前状态总计";
+            // 
+            // Count
+            // 
+            this.Count.AutoSize = true;
+            this.Count.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Count.Location = new System.Drawing.Point(415, 664);
+            this.Count.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Count.Name = "Count";
+            this.Count.Size = new System.Drawing.Size(0, 27);
+            this.Count.TabIndex = 213;
+            // 
+            // ma_qty_label
+            // 
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(4, 664);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.TabIndex = 214;
+            this.ma_qty_label.Text = "工单数量";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(104, 664);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 27);
+            this.ma_qty.TabIndex = 215;
+            // 
             // Query_OnlineTraceBack
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1261, 694);
+            this.Controls.Add(this.ma_qty);
+            this.Controls.Add(this.ma_qty_label);
+            this.Controls.Add(this.Count);
+            this.Controls.Add(this.Count_label);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ms_nextstepcode);
             this.Controls.Add(this.ms_nextstepcode_label);
@@ -278,5 +328,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_nextstepcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
         private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label Count_label;
+        private System.Windows.Forms.Label Count;
+        private System.Windows.Forms.Label ma_qty_label;
+        private System.Windows.Forms.Label ma_qty;
     }
 }

+ 3 - 0
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -105,6 +105,8 @@ namespace UAS_MES.Query
                 sql.Append(" order by ms_sncode ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(SnInf, dt);
+                Count.Text = SnInf.Rows.Count.ToString();
+                ma_qty.Text = dh.getFieldDataByCondition("make", "ma_qty", "ma_code='" + ma_code.Text + "'").ToString();
             }
             else
             {
@@ -112,6 +114,7 @@ namespace UAS_MES.Query
                 BaseUtil.CleanDataGridView(SnInf);
                 ma_code.Text = "";
             }
+
         }
 
         private void ms_status_SelectedIndexChanged(object sender, EventArgs e)