瀏覽代碼

重启计数器

章政 7 年之前
父節點
當前提交
c9946c0aec

+ 3 - 5
UAS-MES/CustomControl/TextBoxWithIcon/SourceStepCount.Designer.cs

@@ -39,9 +39,8 @@
             this.Count.Dock = System.Windows.Forms.DockStyle.Fill;
             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(0, 0);
-            this.Count.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.Count.Name = "Count";
-            this.Count.Size = new System.Drawing.Size(0, 21);
+            this.Count.Size = new System.Drawing.Size(0, 27);
             this.Count.TabIndex = 0;
             // 
             // CountRefresh
@@ -50,12 +49,11 @@
             // 
             // SourceStepCount
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.Count);
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Name = "SourceStepCount";
-            this.Size = new System.Drawing.Size(88, 22);
+            this.Size = new System.Drawing.Size(118, 28);
             this.Load += new System.EventHandler(this.SourceStepCount_Load);
             this.ResumeLayout(false);
             this.PerformLayout();

+ 9 - 9
UAS-MES/CustomControl/TextBoxWithIcon/SourceStepCount.cs

@@ -86,11 +86,11 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
         public void Start()
         {
-            //string SQL = "select count(distinct mp_sncode) from makeprocess where trunc(sysdate)=trunc(mp_indate) and ";
-            //SQL += "mp_sourcecode='" + Source1 + "' and mp_linecode='" + LineCode1 + "' and mp_stepcode='" + StepCode1 + "' and mp_inman='"+User.UserCode+"' ";
-            //DataTable dt = (DataTable)Dh.ExecuteSql(SQL, "select");
-            //Count.Text = "计数:" + dt.Rows[0][0].ToString();
-            //CountRefresh.Start();
+            string SQL = "select count(distinct mp_sncode) from makeprocess where trunc(sysdate)=trunc(mp_indate) and ";
+            SQL += "mp_sourcecode='" + Source1 + "' and mp_linecode='" + LineCode1 + "' and mp_stepcode='" + StepCode1 + "' and mp_inman='"+User.UserCode+"' ";
+            DataTable dt = (DataTable)Dh.ExecuteSql(SQL, "select");
+            Count.Text = "计数:" + dt.Rows[0][0].ToString();
+            CountRefresh.Start();
         }
 
         public void Close()
@@ -100,10 +100,10 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
         private void CountRefresh_Tick(object sender, EventArgs e)
         {
-            //string SQL = "select count(distinct mp_sncode) from makeprocess where trunc(sysdate)=trunc(mp_indate) and ";
-            //SQL += "mp_sourcecode='" + Source1 + "' and mp_linecode='" + LineCode1 + "' and mp_stepcode='" + StepCode1 + "'and mp_inman='" + User.UserCode + "' ";
-            //DataTable dt = (DataTable)Dh.ExecuteSql(SQL, "select");
-            //Count.Text = "计数:" + dt.Rows[0][0].ToString();
+            string SQL = "select count(distinct mp_sncode) from makeprocess where trunc(sysdate)=trunc(mp_indate) and ";
+            SQL += "mp_sourcecode='" + Source1 + "' and mp_linecode='" + LineCode1 + "' and mp_stepcode='" + StepCode1 + "'and mp_inman='" + User.UserCode + "' ";
+            DataTable dt = (DataTable)Dh.ExecuteSql(SQL, "select");
+            Count.Text = "计数:" + dt.Rows[0][0].ToString();
         }
     }
 }