|
@@ -80,7 +80,7 @@ namespace OTSIncAReportGrids
|
|
|
Hashtable table;
|
|
|
//测量结果
|
|
|
ResultFile result = null;
|
|
|
- //二次测量参数页面
|
|
|
+ string str_SysType = "";//当前启动模式(夹杂物、清洁度)
|
|
|
frmReMeasure frmReMeasure = new frmReMeasure();
|
|
|
|
|
|
frmReportConditionChoose m_condition;
|
|
@@ -218,9 +218,16 @@ namespace OTSIncAReportGrids
|
|
|
//m_frm_userprogress = new Frm_UserProgress();
|
|
|
fieldData = new FieldData(result.FilePath);
|
|
|
Particledata = new ParticleData(result.FilePath);
|
|
|
+ str_SysType = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString();
|
|
|
+ if (str_SysType== "0:IncA")
|
|
|
+ {
|
|
|
+ userLibraryData = null;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
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)
|
|
|
+ if (userLibrary.GetSqlHelper() != null)
|
|
|
{
|
|
|
userLibraryData = userLibrary.GetSubAttributeFromDatabase();
|
|
|
}
|
|
@@ -228,6 +235,7 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
userLibraryData = null;
|
|
|
}
|
|
|
+ }
|
|
|
//初始化底层操作类
|
|
|
m_OTSIncAReportGridsFun = new OTSReportGridsFun(m_ReportApp, this);
|
|
|
return true;
|
|
@@ -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;
|
|
@@ -429,23 +437,23 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
return dtNew;
|
|
|
}
|
|
|
- /// <summary>
|
|
|
- /// DataRow转换为DataTable
|
|
|
- /// </summary>
|
|
|
- /// <param name="dt"></param>
|
|
|
- /// <param name="strWhere">筛选的条件</param>
|
|
|
- /// <returns></returns>
|
|
|
- public DataTable SreeenDataTable(DataTable dt, string strWhere)
|
|
|
- {
|
|
|
- if (dt.Rows.Count <= 0) return dt; //当数据为空时返回
|
|
|
- DataTable dtNew = dt.Clone(); //复制数据源的表结构
|
|
|
- DataRow[] dr = dt.Select(strWhere); //strWhere条件筛选出需要的数据!
|
|
|
- for (int i = 0; i < dr.Length; i++)
|
|
|
- {
|
|
|
- dtNew.Rows.Add(dr[i].ItemArray); // 将DataRow添加到DataTable中
|
|
|
- }
|
|
|
- return dtNew;
|
|
|
- }
|
|
|
+ ///// <summary>
|
|
|
+ ///// DataRow转换为DataTable
|
|
|
+ ///// </summary>
|
|
|
+ ///// <param name="dt"></param>
|
|
|
+ ///// <param name="strWhere">筛选的条件</param>
|
|
|
+ ///// <returns></returns>
|
|
|
+ //public DataTable SreeenDataTable(DataTable dt, string strWhere)
|
|
|
+ //{
|
|
|
+ // if (dt.Rows.Count <= 0) return dt; //当数据为空时返回
|
|
|
+ // DataTable dtNew = dt.Clone(); //复制数据源的表结构
|
|
|
+ // DataRow[] dr = dt.Select(strWhere); //strWhere条件筛选出需要的数据!
|
|
|
+ // for (int i = 0; i < dr.Length; i++)
|
|
|
+ // {
|
|
|
+ // dtNew.Rows.Add(dr[i].ItemArray); // 将DataRow添加到DataTable中
|
|
|
+ // }
|
|
|
+ // return dtNew;
|
|
|
+ //}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 传入单颗颗粒的particle类对象,返回从field中抠取出的bitmap对象,抠取单颗颗粒
|
|
@@ -609,7 +617,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");
|
|
@@ -695,7 +702,7 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
keyValues.Add("ORIENTATION", table["str33"].ToString());
|
|
|
}
|
|
|
- if (startFun == "1:CleannessA")
|
|
|
+ if (str_SysType == "1:CleannessA")
|
|
|
{
|
|
|
if (strs[i] == "Hardness")
|
|
|
{
|