|
|
@@ -153,7 +153,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 where typeid !=-1 and typeid !=4 and fieldid !=-1 group by TypeId";
|
|
|
+ sqlp = sqlp + "from IncAData where typeid !=-1 and typeid !=4 and SubParticles is not 'IsSubParticle' group by TypeId";
|
|
|
|
|
|
DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
|
|
|
return DT;
|
|
|
@@ -164,7 +164,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
string sqlp = @"select TypeId,TypeName,GroupId ,TypeColor,count(1) as con,avg(" + con
|
|
|
+ ") as av,max(" + con
|
|
|
+ ") as max ,GroupName";
|
|
|
- sqlp = sqlp + " from IncAData where typeid !=-1 and fieldid!=-1 and typeid !=4 and ParticleId !=-1";
|
|
|
+ sqlp = sqlp + " from IncAData where typeid !=-1 and typeid !=4 and ParticleId !=-1 and SubParticles is not 'IsSubParticle'";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
@@ -257,7 +257,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// <returns></returns>
|
|
|
public DataTable GetParticleAll(string fieldAndPartic)
|
|
|
{
|
|
|
- string sqlp = @"select * from INcAData where typeid !=-1 and typeid !=4";
|
|
|
+ string sqlp = @"select * from INcAData where typeid !=-1 and typeid !=4 and SubParticles is not 'IsSubParticle'";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
@@ -452,7 +452,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// <returns></returns>
|
|
|
public DataTable GetAreaByAllIncA(string fieldAndPartic)
|
|
|
{
|
|
|
- string sqlp = @"select TypeId,TypeName,GroupId,sum(area) as ar,count(1) as con ,GroupName from INcAData where typeid !=-1 and typeid !=4 and ParticleId > -1";
|
|
|
+ string sqlp = @"select TypeId,TypeName,GroupId,sum(area) as ar,count(1) as con ,GroupName from INcAData where typeid !=-1 and typeid !=4 and ParticleId > -1 and SubParticles is not 'IsSubParticle' ";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
|
|
|
@@ -484,7 +484,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
public DataTable GetAreaByIncA(string TypeId, string fieldAndPartic)
|
|
|
{
|
|
|
string sqlp = @"select e.name,sum(e.percentage*p.area) as pc,p.TypeId from ElementChemistry e
|
|
|
- inner join INcAData p on e.xrayid=p.xrayid and e.fieldid = p.fieldid where p.TypeId=" + TypeId + " ";
|
|
|
+ inner join INcAData p on e.xrayid=p.xrayid and e.fieldid = p.fieldid where p.TypeId=" + TypeId + " and SubParticles is not 'IsSubParticle' ";
|
|
|
if (fieldAndPartic != "")
|
|
|
{
|
|
|
sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||p.fieldid||'-'||p.particleid||',%')";
|
|
|
@@ -497,7 +497,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
public DataTable GetAreaByIncA_All()
|
|
|
{
|
|
|
string sqlp = @"select e.name,sum(e.percentage*p.area) as pc,p.TypeId from ElementChemistry e
|
|
|
- inner join INcAData p on e.xrayid=p.xrayid and e.fieldid = p.fieldid group by e.name ";
|
|
|
+ inner join INcAData p on e.xrayid=p.xrayid and e.fieldid = p.fieldid group by e.name where SubParticles is not 'IsSubParticle' ";
|
|
|
DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
|
|
|
return DT;
|
|
|
}
|
|
|
@@ -805,9 +805,6 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public DataTable GetInfoForPartucleDevidePage_allParticles(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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and SubParticles is not 'IsSubParticle' " +
|
|
|
@@ -827,7 +824,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
|
|
|
public DataTable GetInfoForPartucleDevidePage_NotIdentifyParticle(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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =9 " +
|
|
|
+ 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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =9 and SubParticles is not 'IsSubParticle' " +
|
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
@@ -835,25 +832,22 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
}
|
|
|
public DataTable GetInfoForPartucleDevidePage_InvalidParticle(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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =-1 " +
|
|
|
+ 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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =-1 and SubParticles is not 'IsSubParticle' " +
|
|
|
condition;
|
|
|
- DataTable DT = new DataTable();
|
|
|
- DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
+ DataTable DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
return DT;
|
|
|
}
|
|
|
public DataTable GetInfoForPartucleDevidePage_LowCountsParticle(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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 typeid =4 " +
|
|
|
+ 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,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 typeid =4 and SubParticles is not 'IsSubParticle' " +
|
|
|
condition;
|
|
|
- DataTable DT = new DataTable();
|
|
|
- DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
+ DataTable DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
return DT;
|
|
|
}
|
|
|
public DataTable GetClassificationOfAllParticles(string condition)
|
|
|
{
|
|
|
- string sqliteString1 = "select distinct TypeName from INcAData "+ condition;
|
|
|
- DataTable DT = new DataTable();
|
|
|
- DT = dbHelper.ExecuteQuery(sqliteString1);
|
|
|
+ string sqliteString1 = "select distinct TypeName from INcAData " + condition;
|
|
|
+ DataTable DT = dbHelper.ExecuteQuery(sqliteString1);
|
|
|
return DT;
|
|
|
}
|
|
|
public DataTable GetXRayData()
|