Browse Source

元素成分、颗粒尺寸分布、平均元素成分 选择颗粒功能添加
平均元素成分 未识别元素个数添加

CXS 3 years ago
parent
commit
743848d7d1

+ 17 - 4
OTSIncAReportApp/1-UI/Control_Grids/ElementCompositionAvgGrid.cs

@@ -59,8 +59,9 @@ namespace OTSIncAReportGrids
             List<string> NameList = new List<string>() { table["partcletype0"].ToString(), table["partcletype1"].ToString(), table["partcletype2"].ToString(), table["partcletype4"].ToString(), table["partcletype6"].ToString(), table["partcletype7"].ToString(), table["partcletype8"].ToString(), table["partcletype9"].ToString() };
 
             //int idx = m_ReportApp.m_DataMgrFun.GetPropIndexByPropItemName(m_ReportApp.SourceGridData.ConditionItemList, OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
-            int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropIndexByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             string filedAndParticl = "";
+            DataTable dt;
             if (sel == 1)
             {
                 List<OTSIncAReportApp.DataOperation.Model.Particle> selectParticles = m_ReportApp.GetSelectedParticles();
@@ -72,8 +73,20 @@ namespace OTSIncAReportGrids
                 {
                     filedAndParticl = filedAndParticl + ",";
                 }
+                if (selectParticles.Count == 0)
+                {
+                    dt = new DataTable();
+                }
+                else
+                {
+                    dt = particledata.GetAreaByAllIncA(filedAndParticl);
+                }
+            }
+            else
+            {
+                dt = particledata.GetAreaByAllIncA(filedAndParticl);
             }
-            DataTable dt = particledata.GetAreaByAllIncA(filedAndParticl);
+             
 
             for (int i = 0; i < dt.Rows.Count; i++)
             {
@@ -141,8 +154,8 @@ namespace OTSIncAReportGrids
                 Gview_gz.Rows[add_rowindex].Cells[2].Style.BackColor = Color.Azure;
                 //Gview_gz.Rows[add_rowindex].Cells[3].Value = Math.Round(small, 2);
                 Gview_gz.Rows[add_rowindex].Cells[3].Style.BackColor = Color.Azure;
-                Gview_gz.Rows[add_rowindex].Cells[4].Value = dt.Rows[i]["con"];
-                Gview_gz.Rows[add_rowindex].Cells[4].Style.BackColor = Color.Azure;
+                Gview_gz.Rows[add_rowindex].Cells[3].Value = dt.Rows[i]["con"];
+                //Gview_gz.Rows[add_rowindex].Cells[4].Style.BackColor = Color.Azure;
                 DataTable dtp = particledata.GetAreaByIncA(dt.Rows[i]["TypeId"].ToString(), filedAndParticl);
                 for (int j = 4; j < Gview_gz.Columns.Count; j++)
                 {

+ 2 - 2
OTSIncAReportApp/1-UI/Control_Grids/ElementContentGrid.cs

@@ -52,8 +52,8 @@ namespace OTSIncAReportGrids
                 gridView.Columns[i].DefaultCellStyle.NullValue = null;
             }
 
-            //int idx = m_ReportApp.m_DataMgrFun.GetPropIndexByPropItemName(m_ReportApp.SourceGridData.ConditionItemList, OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
-            int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropIndexByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropIndexByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             string filedAndParticle = "";
             if (sel == 1)
             {

+ 0 - 6
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -256,12 +256,6 @@ namespace OTSIncAReportGrids
             }
                 
             DataTable elementchemistry = Particledata.GetElementChemistry();
-
-            if(particlesAll==null)
-            {
-                return;
-            }
-
             for (int i = 0; i < particlesAll.Rows.Count; i++)
             {
                 string str = "XRayId = " + particlesAll.Rows[i]["particleId"].ToString() + " and fieldid = " + particlesAll.Rows[i]["fieldid"].ToString();

+ 16 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesSizeGrid.cs

@@ -87,8 +87,9 @@ namespace OTSIncAReportGrids
 
             //int idx = m_ReportApp.m_DataMgrFun.GetPropIndexByPropItemName(m_ReportApp.SourceGridData.ConditionItemList, OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
             //int sel = m_ReportApp.SourceGridData.ConditionItemList[idx].comboDownList.IndexOf(m_ReportApp.SourceGridData.ConditionItemList[idx].itemVal.ToString());
-           int sel= source.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+            int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             string filedAndParticl = "";
+            DataTable dt;
             if (sel == 1)
             {
                 List<OTSIncAReportApp.DataOperation.Model.Particle> selectParticles = m_ReportApp.GetSelectedParticles();
@@ -100,10 +101,23 @@ namespace OTSIncAReportGrids
                 {
                     filedAndParticl = filedAndParticl + ",";
                 }
+                if(selectParticles.Count == 0)
+                {
+                    dt = new DataTable();
+                }
+                else
+                {
+                    dt = particledata.GetParticleListForParticlSize("area", filedAndParticl);
+                }
+            }
+            else
+            {
+                dt = particledata.GetParticleListForParticlSize("area", filedAndParticl);
             }
             gridView.MergeColumnNames.Add(filename);
             gridView.AddSpanHeader(1, gridView.Columns.Count - 1, filename);
-            DataTable dt = particledata.GetParticleListForParticlSize("area", filedAndParticl);
+
+            
 
             for (int i = 0; i < dt.Rows.Count; i++)
             {