浏览代码

优化颗粒列表删除

cxs 1 年之前
父节点
当前提交
25f44fac57

+ 1 - 1
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -843,7 +843,7 @@
 	  <Control name="sscaptionname22" text="排列方式" />
 	  <Control name="sscaptionname23" text="全部颗粒" />
 	  <Control name="sscaptionname25" text="测量结果概况" />
-	  <Control name="sscaptionname26" text="样品测量信息" />
+	  <Control name="sscaptionname26" text="全部颗粒信息" />
 	  <Control name="sscaptionname27" text="颗粒成分子分类" />
 	  <Control name="sscaptionname29" text="颗粒尺寸分布" />
 	  <Control name="sscaptionname30" text="平均元素成分" />

+ 14 - 3
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -2159,8 +2159,6 @@ namespace OTSIncAReportGrids
                                             particlesAll.Rows.RemoveAt(i);
                                         }
                                     }
-
-
                                 }
                                 else
                                 {
@@ -2172,7 +2170,20 @@ namespace OTSIncAReportGrids
 
                     }
                 }
-                DisplayData();
+                RecordCount = recordCount - dgV_ParticlesDevidePage.SelectedRows.Count;
+                lblTotalCount.Text = RecordCount.ToString();
+                foreach (DataGridViewRow Row in dgV_ParticlesDevidePage.SelectedRows)
+                {
+                    dgV_ParticlesDevidePage.Rows.Remove(Row);
+                }
+                if(dgV_ParticlesDevidePage.Rows.Count==0)
+                {
+                    DisplayData();
+                }
+                for(int j=0;j< dgV_ParticlesDevidePage.Rows.Count;j++)
+                {
+                    dgV_ParticlesDevidePage.Rows[j].Cells[0].Value = (pageSize * (PageIndex - 1) + j + 1).ToString();
+                }
             }
         }