|
@@ -53,7 +53,6 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
|
|
|
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)
|
|
|
{
|
|
@@ -66,25 +65,30 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
filedAndParticle = filedAndParticle + ",";
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (filedAndParticle != "")
|
|
|
- {
|
|
|
- DataTable dt = particledata.GetElementForArea(filedAndParticle);
|
|
|
- double totalArea = 0;
|
|
|
- foreach (DataRow item in dt.Rows)
|
|
|
+
|
|
|
+ if (filedAndParticle != "")
|
|
|
{
|
|
|
- totalArea += Convert.ToDouble(item["earea"]);
|
|
|
+ DataTable dt = particledata.GetElementForArea(filedAndParticle);
|
|
|
+ double totalArea = 0;
|
|
|
+ foreach (DataRow item in dt.Rows)
|
|
|
+ {
|
|
|
+ totalArea += Convert.ToDouble(item["earea"]);
|
|
|
+ }
|
|
|
+ for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ int add_rowindex = gridView.Rows.Add();
|
|
|
+ gridView.Rows[i].Cells[0].Value = (i + 1).ToString();
|
|
|
+ gridView.Rows[i].Cells[1].Value = dt.Rows[i]["name"];
|
|
|
+ double d = Convert.ToDouble(dt.Rows[i]["earea"]) / totalArea;
|
|
|
+ gridView.Rows[i].Cells[2].Value = Math.Round(d, 6) * 100;
|
|
|
+ gridView.Rows[i].Cells[1].Style.BackColor = Color.Azure;
|
|
|
+ gridView.Rows[i].Cells[2].Style.BackColor = Color.Azure;
|
|
|
+ }
|
|
|
}
|
|
|
- for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
+ else
|
|
|
{
|
|
|
- int add_rowindex = gridView.Rows.Add();
|
|
|
- gridView.Rows[i].Cells[0].Value = (i + 1).ToString();
|
|
|
- gridView.Rows[i].Cells[1].Value = dt.Rows[i]["name"];
|
|
|
- double d = Convert.ToDouble(dt.Rows[i]["earea"]) / totalArea;
|
|
|
- gridView.Rows[i].Cells[2].Value = Math.Round(d, 6) * 100;
|
|
|
- gridView.Rows[i].Cells[1].Style.BackColor = Color.Azure;
|
|
|
- gridView.Rows[i].Cells[2].Style.BackColor = Color.Azure;
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
else
|