|
@@ -112,7 +112,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
string sqlp = @"select TypeId,TypeName,TypeColor,count(1) as con,sum(Area) as Area,avg(" + con
|
|
|
+ ") as av,max(" + con
|
|
|
+ ") as max ";
|
|
|
- sqlp = sqlp + " from IncAData group by TypeId";
|
|
|
+ sqlp = sqlp + "from IncAData where typeid !=-1 and typeid !=4 group by TypeId";
|
|
|
|
|
|
DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
|
|
|
return DT;
|
|
@@ -129,10 +129,10 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
string sqlp = @"select TypeId,TypeName,TypeColor,count(1) as con,avg(" + con
|
|
|
+ ") as av,max(" + con
|
|
|
+ ") as max ,GroupName";
|
|
|
- sqlp = sqlp + " from IncAData ";
|
|
|
+ sqlp = sqlp + " from IncAData where typeid !=-1 and typeid !=4";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
- sqlp = sqlp + " where '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
+ sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
}
|
|
|
|
|
|
sqlp = sqlp + " group by TypeId ";
|
|
@@ -157,10 +157,10 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
{
|
|
|
|
|
|
string sqlp = @"select e.name,sum(e.percentage*p.area) as earea from ElementChemistry e
|
|
|
- inner join INcAData p on e.xrayid=p.xrayid and e.fieldid = p.fieldid";
|
|
|
+ inner join INcAData p on e.xrayid=p.xrayid and e.fieldid = p.fieldid from IncAData where typeid !=-1 and typeid !=4";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
- sqlp = sqlp + " where '" + fieldAndPartic + "' like ('%,'||p.fieldid||'-'||p.particleid||',%')";
|
|
|
+ sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||p.fieldid||'-'||p.particleid||',%')";
|
|
|
}
|
|
|
|
|
|
sqlp = sqlp + " group by e.name order by sum(e.percentage*p.area) desc";
|
|
@@ -187,6 +187,23 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public DataTable GetParticleAll(string fieldAndPartic)
|
|
|
+ {
|
|
|
+ string sqlp = @"select * from INcAData where typeid !=-1 and typeid !=4";
|
|
|
+ if (fieldAndPartic != "")
|
|
|
+ {
|
|
|
+ sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
+ }
|
|
|
+ DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
|
|
|
+ for (int i = 0; i < DT.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ DT.Rows[i]["Area"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return DT;
|
|
|
+ }
|
|
|
+
|
|
|
+ public DataTable GetParticleAllforparticlelist(string fieldAndPartic)
|
|
|
{
|
|
|
string sqlp = @"select * from INcAData";
|
|
|
if (fieldAndPartic != "")
|
|
@@ -229,11 +246,11 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// <returns></returns>
|
|
|
public DataTable GetParticleAllHaveXray(string fieldAndPartic)
|
|
|
{
|
|
|
- string incaSql = @"select * from IncAData";
|
|
|
+ string incaSql = @"select * from IncAData where typeid !=-1 and typeid !=4";
|
|
|
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
- incaSql = incaSql + " where '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
+ incaSql = incaSql + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
}
|
|
|
DataTable incaDT = dbHelper.ExecuteDataTable(incaSql, null);
|
|
|
|
|
@@ -310,10 +327,10 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// <returns></returns>
|
|
|
public DataTable GetAreaByAllIncA(string fieldAndPartic)
|
|
|
{
|
|
|
- string sqlp = @"select TypeId,TypeName,sum(area) as ar,count(1) as con ,GroupName from INcAData";
|
|
|
+ string sqlp = @"select TypeId,TypeName,sum(area) as ar,count(1) as con ,GroupName from INcAData where typeid !=-1 and typeid !=4";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
- sqlp = sqlp + " where '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
+ sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
}
|
|
|
sqlp = sqlp + " group by TypeId";
|
|
|
|
|
@@ -588,7 +605,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
|
|
|
public DataTable GetInfoForPartucleDevidePage_analyticalParticle(string condition)
|
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid !=9 and typeid !=-1 and typeid !=0" +
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid !=9 and typeid !=-1 and typeid !=4" +
|
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
@@ -598,7 +615,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
|
|
|
public DataTable GetInfoForPartucleDevidePage_otherParticle(string condition)
|
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and (typeid =9 or typeid =-1 or typeid =0) " +
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where typeid =9 or typeid =-1 or typeid =4 " +
|
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|