|
@@ -79,7 +79,7 @@ namespace OTSIncAReportGrids
|
|
|
Hashtable table;
|
|
|
//测量结果
|
|
|
ResultFile result = null;
|
|
|
-
|
|
|
+ string str_SysType = "";//当前启动模式(夹杂物、清洁度)
|
|
|
frmReportConditionChoose m_condition;
|
|
|
FieldData fieldData;
|
|
|
DataTable particlesAll;
|
|
@@ -215,15 +215,23 @@ namespace OTSIncAReportGrids
|
|
|
//m_frm_userprogress = new Frm_UserProgress();
|
|
|
fieldData = new FieldData(result.FilePath);
|
|
|
Particledata = new ParticleData(result.FilePath);
|
|
|
- string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
|
|
|
- userLibrary = new UserLibraryData(str_libraryName);
|
|
|
- if(userLibrary!=null)
|
|
|
+ str_SysType = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString();
|
|
|
+ if (str_SysType== "0:IncA")
|
|
|
{
|
|
|
- userLibraryData = userLibrary.GetSubAttributeFromDatabase();
|
|
|
+ userLibraryData = null;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- userLibraryData = null;
|
|
|
+ string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
|
|
|
+ userLibrary = new UserLibraryData(str_libraryName);
|
|
|
+ if (userLibrary.GetSqlHelper() != null)
|
|
|
+ {
|
|
|
+ userLibraryData = userLibrary.GetSubAttributeFromDatabase();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ userLibraryData = null;
|
|
|
+ }
|
|
|
}
|
|
|
//初始化底层操作类
|
|
|
m_OTSIncAReportGridsFun = new OTSReportGridsFun(m_ReportApp, this);
|
|
@@ -377,12 +385,12 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
if (sel == 0)
|
|
|
{
|
|
|
- string str = "TypeId <> -1 and TypeId <> 9";
|
|
|
+ string str = "TypeId <> -1 and TypeId <> 9 and TypeId <> 0";
|
|
|
particlesAll = SreeenDataTable(particlesAll, str);
|
|
|
}
|
|
|
if (sel == 2)
|
|
|
{
|
|
|
- string str = "TypeId = " + "-1 or TypeId =" + "9";
|
|
|
+ string str = "TypeId = " + "-1 or TypeId =" + "9 or TypeId =" + "0";
|
|
|
particlesAll = SreeenDataTable(particlesAll, str);
|
|
|
}
|
|
|
btn_Sel.Enabled = true;
|
|
@@ -591,7 +599,6 @@ namespace OTSIncAReportGrids
|
|
|
|
|
|
dgV_ParticlesDevidePage.Rows.Clear();
|
|
|
dgV_ParticlesDevidePage.Columns.Clear();
|
|
|
- string startFun = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString();
|
|
|
//从报告xml文件中加载,显示计算列,显示元素信息
|
|
|
string str_DefaultComputedColName = "", str_ElementsColName = "";
|
|
|
DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXmlData(Application.StartupPath + m_ReportApp.m_OTSReportMgrParamFile, "XMLData");
|
|
@@ -677,7 +684,7 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
keyValues.Add("ORIENTATION", table["str33"].ToString());
|
|
|
}
|
|
|
- if (startFun == "1:CleannessA")
|
|
|
+ if (str_SysType == "1:CleannessA")
|
|
|
{
|
|
|
if (strs[i] == "Hardness")
|
|
|
{
|