Просмотр исходного кода

添加particleid和filedid查询

cxs 2 лет назад
Родитель
Сommit
a592dee68a

+ 46 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.Designer.cs

@@ -73,6 +73,10 @@
             this.ImportSTDDb = new System.Windows.Forms.ToolStripMenuItem();
             this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
             this.dgV_ParticlesDevidePage = new System.Windows.Forms.DataGridView();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tB_ParticleId = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.tB_FieldId = new System.Windows.Forms.TextBox();
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
             this.contextMenuStrip1.SuspendLayout();
@@ -82,6 +86,10 @@
             // 
             // panel2
             // 
+            this.panel2.Controls.Add(this.tB_FieldId);
+            this.panel2.Controls.Add(this.label7);
+            this.panel2.Controls.Add(this.tB_ParticleId);
+            this.panel2.Controls.Add(this.label3);
             this.panel2.Controls.Add(this.label_Condition);
             this.panel2.Controls.Add(this.tbx_Type);
             this.panel2.Controls.Add(this.btn_ReMeasure);
@@ -122,7 +130,7 @@
             // 
             // btn_ReMeasure
             // 
-            this.btn_ReMeasure.Location = new System.Drawing.Point(595, 9);
+            this.btn_ReMeasure.Location = new System.Drawing.Point(900, 10);
             this.btn_ReMeasure.Name = "btn_ReMeasure";
             this.btn_ReMeasure.Size = new System.Drawing.Size(80, 23);
             this.btn_ReMeasure.TabIndex = 33;
@@ -133,7 +141,7 @@
             // 
             // btn_Sel
             // 
-            this.btn_Sel.Location = new System.Drawing.Point(535, 9);
+            this.btn_Sel.Location = new System.Drawing.Point(840, 10);
             this.btn_Sel.Name = "btn_Sel";
             this.btn_Sel.Size = new System.Drawing.Size(54, 23);
             this.btn_Sel.TabIndex = 33;
@@ -522,6 +530,38 @@
             this.dgV_ParticlesDevidePage.TabIndex = 5;
             this.dgV_ParticlesDevidePage.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgV_ParticlesDevidePage_MouseDown);
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(540, 14);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(65, 12);
+            this.label3.TabIndex = 36;
+            this.label3.Text = "ParticleId";
+            // 
+            // tB_ParticleId
+            // 
+            this.tB_ParticleId.Location = new System.Drawing.Point(611, 10);
+            this.tB_ParticleId.Name = "tB_ParticleId";
+            this.tB_ParticleId.Size = new System.Drawing.Size(76, 21);
+            this.tB_ParticleId.TabIndex = 37;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(697, 15);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(47, 12);
+            this.label7.TabIndex = 38;
+            this.label7.Text = "FieldId";
+            // 
+            // tB_FieldId
+            // 
+            this.tB_FieldId.Location = new System.Drawing.Point(750, 11);
+            this.tB_FieldId.Name = "tB_FieldId";
+            this.tB_FieldId.Size = new System.Drawing.Size(68, 21);
+            this.tB_FieldId.TabIndex = 39;
+            // 
             // ParticlesGridDevidePage
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -586,5 +626,9 @@
         private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemDelete_Particle;
         private System.Windows.Forms.Button btn_ReMeasure;
         private System.Windows.Forms.ToolStripMenuItem ImportSTDDb;
+        private System.Windows.Forms.TextBox tB_FieldId;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.TextBox tB_ParticleId;
+        private System.Windows.Forms.Label label3;
     }
 }

+ 30 - 1
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -663,7 +663,8 @@ namespace OTSIncAReportGrids
             keyValues.Add("rowid", table["str4"].ToString());
             keyValues.Add("TypeName", table["str6"].ToString());
             keyValues.Add("ParticleImage", table["str5"].ToString());
-            keyValues.Add("FieldID", "FieldID");
+            keyValues.Add("FieldId", "FieldId");
+            keyValues.Add("ParticleId", "ParticleId");
             for (int i = 0; i < strs.Count(); i++)
             {
                 if (strs[i] == "FiledCoordinate")
@@ -1484,6 +1485,34 @@ namespace OTSIncAReportGrids
                 }
             }
 
+            if (!string.IsNullOrWhiteSpace(tB_FieldId.Text))
+            {
+                int inum = 0;
+                if (int.TryParse(tB_FieldId.Text, out inum))
+                {
+                    condition += " and FieldId =" + tB_FieldId.Text;
+                }
+                else
+                {
+                    MessageBox.Show(table["str10"].ToString());
+                    return;
+                }
+            }
+
+            if (!string.IsNullOrWhiteSpace(tB_ParticleId.Text))
+            {
+                int inum = 0;
+                if (int.TryParse(tB_ParticleId.Text, out inum))
+                {
+                    condition += " and ParticleId =" + tB_ParticleId.Text;
+                }
+                else
+                {
+                    MessageBox.Show(table["str10"].ToString());
+                    return;
+                }
+            }
+
             if (!string.IsNullOrWhiteSpace(tbx_DmaxMin.Text) && !string.IsNullOrWhiteSpace(tbx_DmaxMax.Text))
             {
                 if (!CompareInput(tbx_DmaxMin.Text, tbx_DmaxMax.Text))

+ 1 - 0
OTSInclusionsTraceability/DataOperation.cs

@@ -120,6 +120,7 @@ namespace OTSInclusionsTraceability
             }
             else
             {
+                doc = new XmlDocument();
                 XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "utf-8", "yes");
                 doc.AppendChild(dec);
                 XmlElement root = doc.CreateElement("XMLData");//加入根节点 

+ 2 - 1
OTSInclusionsTraceability/OTSInclusionsTraceability.cs

@@ -346,7 +346,8 @@ namespace OTSInclusionsTraceability
             keyValues.Add("TypeName", table["str6"].ToString());
             keyValues.Add("ParticleImage", table["str5"].ToString());
             //keyValues.Add("SourceType", table["str34"].ToString());
-            keyValues.Add("FieldID", "FieldID");
+            keyValues.Add("FieldId", "FieldId");
+            keyValues.Add("ParticleId", "ParticleId");
             for (int i = 0; i < strs.Count(); i++)
             {
                 if (strs[i] == "FiledCoordinate")