/// <summary> /// 查询已包装的数据 ——主要用于导出 /// </summary> /// <param name="BatchNo">包装批号 当为多芯查询时 为ClientSN编码</param> /// <returns>已包装数据</returns> public DataSet Get_PackData(string BatchNo, Maticsoft.Model.E_InspectMethod _InspectMethod) { if (_InspectMethod == Model.E_InspectMethod.TFK十二芯检测x2) { string strSql = " SELECT tb_Pack_3D.ClientSN, tb_Pack_3D.SN, tb_Pack_3D.Name, tb_Pack_3D.Type, tb_Pack_3D.Result, "; strSql += " tb_Pack_3D.Curvature, tb_Pack_3D.Curvature_Result, tb_Pack_3D.Spherical, tb_Pack_3D.Spherical_Result, "; strSql += "tb_Pack_3D.Apex_Offset, tb_Pack_3D.Apex_Offset_Result, tb_Pack_3D.Tilt_Angle, tb_Pack_3D.Tilt_Angle_Result,"; strSql += " tb_Pack_3D.Test_Date, tb_Pack_3D.Test_Time, tb_Pack_3D.PackDate ,tb_PrintRecord.LabellMode "; strSql += " FROM tb_Pack_3D LEFT OUTER JOIN tb_PrintRecord ON tb_Pack_3D.ClientSN = tb_PrintRecord.SN "; strSql += " Where tb_PrintRecord.BatchNo='" + BatchNo + "'"; return(dbs.Query(strSql)); } else if (_InspectMethod == Model.E_InspectMethod.配组_四十八芯 || _InspectMethod == Model.E_InspectMethod.配组_九十六芯 || _InspectMethod == Model.E_InspectMethod.配组_二十四芯) { string strSql = "SELECT ClientSN, CONVERT(int, Name) AS Name, Type, Result, Curvature, Curvature_Result,"; strSql += " Spherical, Spherical_Result, Apex_Offset, Apex_Offset_Result, Tilt_Angle,Tilt_Angle_Result, Test_Date, Test_Time "; strSql += " FROM tb_Pack_3D WHERE (ClientSN = '" + BatchNo + "') ORDER BY ClientSN, Name"; return(dbs.Query(strSql)); } else //if (_InspectMethod == Model.E_InspectMethod.配组_八芯) { string strSql = " SELECT tb_Pack_Exfo.SN, IL_A, Refl_A FROM tb_Pack_Exfo LEFT OUTER JOIN "; strSql += " tb_SerialNumber ON tb_Pack_Exfo.SN = tb_SerialNumber.SN "; strSql += " WHERE (tb_SerialNumber.BatchNO = '" + BatchNo + "') AND (tb_SerialNumber.State = 'Yet_Pack') "; // strSql += " Where BatchNo='" + BatchNo + "'"; return(dbs.Query(strSql)); } }
/// <summary> /// 保存条码 /// </summary> /// <param name="_startSN"></param> /// <param name="_endSN"></param> private void addSerialNumber(long _startSN, int _orderCount) { string temInfo=""; //条码 Maticsoft.Model.SerialNumber _serialNumber = new Maticsoft.Model.SerialNumber() { OrderID = txb_OrderID.Text.ToString() }; //检测方法 Maticsoft.Model.E_InspectMethod temInspectMethod =(Maticsoft.Model.E_InspectMethod)Enum.Parse(typeof(Maticsoft.Model.E_InspectMethod), cmb_InspectMethod.SelectedItem.ToString(), false); _M_SerialNumber.InspectMethod = temInspectMethod; //显示结果 if (temInspectMethod == Maticsoft.Model.E_InspectMethod.配组_八芯_SAMHALL || temInspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯_SAMHALL || temInspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯_SAMHALL || temInspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯_SAMHALL) { int temCount = 0; foreach (Maticsoft.Model.SerialNumber Tem in _GLL_Lst_SerialNumber) { _M_SerialNumber.Add(Tem); temCount++; } _GLL_Lst_SerialNumber.Clear(); temInfo = "操作完成!成功添加:" + temCount + "条\r\n失败:0条"; } else { int temOrderCount = int.Parse(txb_Order_Count.Text.ToString()); temInfo = _M_SerialNumber.Add(_serialNumber, _startSN,temOrderCount); } My_MessageBox.My_MessageBox_Message(temInfo); }
/************************** Method **************************/ //根据工单类型决定显示和隐藏相应的控件 private void showOption(Maticsoft.Model.E_InspectMethod _Imethod) { txb_ClientSN.Visibility = System.Windows.Visibility.Visible; if (_Imethod == Maticsoft.Model.E_InspectMethod.一码一签) { lab_Note_ClientSN.Visibility = System.Windows.Visibility.Hidden; lab_Note_NotPigtailNum.Visibility = System.Windows.Visibility.Hidden; txb_ClientNum.Visibility = System.Windows.Visibility.Hidden; txb_ClientSN.Visibility = System.Windows.Visibility.Hidden; } else if (_Imethod == Maticsoft.Model.E_InspectMethod.双并检测 || _Imethod == Maticsoft.Model.E_InspectMethod.四芯检测 || _Imethod == Maticsoft.Model.E_InspectMethod.八芯检测 || _Imethod == Maticsoft.Model.E_InspectMethod.十二芯检测 || _Imethod == Maticsoft.Model.E_InspectMethod.FFOS_四芯 || _Imethod == Maticsoft.Model.E_InspectMethod.FFOS_八芯 || _Imethod == Maticsoft.Model.E_InspectMethod.FFOS_十六芯 || _Imethod == Maticsoft.Model.E_InspectMethod.FFOS_二十四芯 || _Imethod == Maticsoft.Model.E_InspectMethod.FFOS_三十二芯 || _Imethod == Maticsoft.Model.E_InspectMethod.TFK十二芯检测x2 || _Imethod == Maticsoft.Model.E_InspectMethod.TFK一芯检测x2 || _Imethod == Maticsoft.Model.E_InspectMethod.TFK二十四芯检测x2 || _Imethod == Maticsoft.Model.E_InspectMethod.两码两签 || _Imethod == Maticsoft.Model.E_InspectMethod.MPO检测) { lab_Note_ClientSN.Visibility = System.Windows.Visibility.Hidden; txb_ClientSN.Visibility = System.Windows.Visibility.Hidden; txb_ClientNum.Visibility = System.Windows.Visibility.Hidden; lab_Note_NotPigtailNum.Visibility = System.Windows.Visibility.Hidden; } txb_ClientSN.IsEnabled = false; //客户编码输入栏 不可编辑 //根据工单检测类型决定是否隐藏 结果显示控件 txb_Result_Fill_3D.Visibility = System.Windows.Visibility.Hidden; txb_Result_Fill_Exfo.Visibility = System.Windows.Visibility.Hidden; if (_WorkOrder.InspectType == Maticsoft.Model.E_InspectType.检测3D) { txb_Result_Fill_3D.Visibility = System.Windows.Visibility.Visible; } else if (_WorkOrder.InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { txb_Result_Fill_Exfo.Visibility = System.Windows.Visibility.Visible; } else if (_WorkOrder.InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { txb_Result_Fill_Exfo.Visibility = System.Windows.Visibility.Visible; txb_Result_Fill_3D.Visibility = System.Windows.Visibility.Visible; } }
/// <summary> /// 查询已包装的数据 ——主要用于导出 /// </summary> /// <param name="BatchNo">包装批号 当为多芯查询时 为ClientSN编码</param> /// <returns>已包装数据</returns> public DataSet Get_PackData(string BatchNo, Maticsoft.Model.E_InspectMethod _InspectMethod) { if (_InspectMethod == Model.E_InspectMethod.TFK十二芯检测x2) { /* * string strSql = " SELECT tb_Pack_3D.ClientSN + '-' + LEFT(tb_Pack_3D.Name, 2) AS SN, "; * strSql += " SUBSTRING(tb_Pack_3D.Name, 4, 2) AS Name, tb_Pack_3D.Type, tb_Pack_3D.Result, "; * strSql += " tb_Pack_3D.Curvature, tb_Pack_3D.Curvature_Result, tb_Pack_3D.Spherical, "; * strSql += " tb_Pack_3D.Spherical_Result, tb_Pack_3D.Apex_Offset, "; * strSql += " tb_Pack_3D.Apex_Offset_Result, tb_Pack_3D.Tilt_Angle, "; * strSql += " tb_Pack_3D.Tilt_Angle_Result, tb_Pack_3D.Test_Date, tb_Pack_3D.Test_Time, "; * strSql += " tb_PrintRecord.LabellMode "; * strSql += " FROM tb_Pack_3D LEFT OUTER JOIN "; * strSql += " tb_PrintRecord ON tb_Pack_3D.ClientSN = tb_PrintRecord.SN "; * strSql += " Where tb_PrintRecord.BatchNo='" + BatchNo + "'"; * strSql += " ORDER BY SN, CONVERT(int, SUBSTRING(tb_Pack_3D.Name, 4, 2)) "; */ string strSql = " SELECT ClientSN + '-' + LEFT(Name, 2) AS SN1, SUBSTRING(Name, 4, 2) AS Name, Type, "; strSql += " Result, Curvature, Curvature_Result, Spherical, Spherical_Result, Apex_Offset, "; strSql += " Apex_Offset_Result, Tilt_Angle, Tilt_Angle_Result, Test_Date, Test_Time "; strSql += " FROM tb_Pack_3D "; strSql += " Where BatchNo='" + BatchNo + "'"; strSql += " ORDER BY SN1, CONVERT(int, SUBSTRING(Name, 4, 2)) "; return(dbs.Query(strSql)); } else if (_InspectMethod == Model.E_InspectMethod.配组_四十八芯 || _InspectMethod == Model.E_InspectMethod.配组_九十六芯 || _InspectMethod == Model.E_InspectMethod.配组_二十四芯 ) { string strSql = "SELECT ClientSN, CONVERT(int, Name) AS Name, Type, Result, Curvature, Curvature_Result,"; strSql += " Spherical, Spherical_Result, Apex_Offset, Apex_Offset_Result, Tilt_Angle,Tilt_Angle_Result, Test_Date, Test_Time "; strSql += " FROM tb_Pack_3D WHERE (ClientSN = '" + BatchNo + "') ORDER BY ClientSN, Name"; return(dbs.Query(strSql)); } else if (_InspectMethod == Model.E_InspectMethod.配组_八芯_SAMHALL || _InspectMethod == Model.E_InspectMethod.配组_九十六芯_SAMHALL || _InspectMethod == Model.E_InspectMethod.配组_二十四芯_SAMHALL || _InspectMethod == Model.E_InspectMethod.配组_四十八芯_SAMHALL) { string strSql = " SELECT ClientSN, SN, Type, Result, Curvature, Curvature_Result, Spherical, Spherical_Result, Apex_Offset, "; strSql += " Apex_Offset_Result , Tilt_Angle, Tilt_Angle_Result, Test_Date, Test_Time FROM tb_Pack_3D"; strSql += " Where BatchNo='" + BatchNo + "'"; return(dbs.Query(strSql)); } else //if (_InspectMethod == Model.E_InspectMethod.配组_八芯) { string strSql = " SELECT ClientSN, Name, tb_Pack_3D.Type, Result, Curvature, Curvature_Result, Spherical, Spherical_Result, Apex_Offset, "; strSql += " Apex_Offset_Result , Tilt_Angle, Tilt_Angle_Result, Test_Date, Test_Time FROM tb_Pack_3D LEFT OUTER JOIN "; strSql += " tb_SerialNumber ON tb_Pack_3D.SN = tb_SerialNumber.SN "; strSql += " WHERE (tb_SerialNumber.BatchNO = '" + BatchNo + "') AND (tb_SerialNumber.State = 'Yet_Pack')"; DataSet temds = dbs.Query(strSql); if (temds.Tables[0].Rows.Count > 0) { return(temds); } else { string strSql2 = " SELECT ClientSN, Name, tb_Pack_3D.Type, Result, Curvature, Curvature_Result, Spherical, Spherical_Result, Apex_Offset, "; strSql2 += " Apex_Offset_Result , Tilt_Angle, Tilt_Angle_Result, Test_Date, Test_Time FROM tb_Pack_3D LEFT OUTER JOIN "; strSql2 += " tb_SerialNumber ON tb_Pack_3D.ClientSN = tb_SerialNumber.SN "; strSql2 += " WHERE (tb_SerialNumber.BatchNO = '" + BatchNo + "') AND (tb_SerialNumber.State = 'Yet_Pack')"; return(dbs.Query(strSql2)); } } }
//---------------------------------------------------------------------------------------------------------- // * 本方法生成Pigtail检测的标准数组 此数组可作为查询条件供查询语句组合使用 // * // * 使用此标准数组的 条码类型 必须为 Demo:2130000001-1 // * 标准数组与 Demo中的 01 编号进行比较 // * // * 如果与多芯配组的条码类型进行比较 需要测试数据对自身进行处理 Demo:2130100001-01-1 // * 提取 最后面的 Pigtail编号 // * //---------------------------------------------------------------------------------------------------------- /// <summary> /// 返回检测Pigtail标准数组——Pigtail /// </summary> /// <returns></returns> public ArrayList Pigtail_Standard_pigtailNum(Maticsoft.Model.E_InspectMethod _inspectMethod) //返回包装线号 标准数组 { //配组线材类型 检测 1-8 if (_inspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯 || _inspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯 || _inspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯 || _inspectMethod == Maticsoft.Model.E_InspectMethod.八芯检测 ) { return(PigtailList(8)); } //其它类型需要个性定制接头标准数组 else { switch (_inspectMethod) { case Maticsoft.Model.E_InspectMethod.双并检测: { ArrayList Tem = new ArrayList(); //初始化数组 Tem.Add("A1"); Tem.Add("A2"); Tem.Add("B1"); Tem.Add("B2"); return(Tem); } //此类型为 24个接头 处理方式应该与 配组的处理方式相同 //此线材类型的条码存出来的最终条码 接头A Demo:2013000001-01-1 接头B Demo:2013000001-02-1 case Maticsoft.Model.E_InspectMethod.TFK十二芯检测x2: { ArrayList Tem = new ArrayList(); //初始化数组 //01端 Tem.Add("01-1"); Tem.Add("01-2"); Tem.Add("01-3"); Tem.Add("01-4"); Tem.Add("01-5"); Tem.Add("01-6"); Tem.Add("01-7"); Tem.Add("01-8"); Tem.Add("01-9"); Tem.Add("01-10"); Tem.Add("01-11"); Tem.Add("01-12"); //02端 Tem.Add("02-1"); Tem.Add("02-2"); Tem.Add("02-3"); Tem.Add("02-4"); Tem.Add("02-5"); Tem.Add("02-6"); Tem.Add("02-7"); Tem.Add("02-8"); Tem.Add("02-9"); Tem.Add("02-10"); Tem.Add("02-11"); Tem.Add("02-12"); return(Tem); } //此类型为 24个接头 处理方式应该与 配组的处理方式相同 //此线材类型的条码存出来的最终条码 接头A Demo:2013000001-01-1 接头B Demo:2013000001-02-1 case Maticsoft.Model.E_InspectMethod.TFK二十四芯检测x2: { ArrayList Tem = new ArrayList(); //初始化数组 //01端 Tem.Add("01-1"); Tem.Add("01-2"); Tem.Add("01-3"); Tem.Add("01-4"); Tem.Add("01-5"); Tem.Add("01-6"); Tem.Add("01-7"); Tem.Add("01-8"); Tem.Add("01-9"); Tem.Add("01-10"); Tem.Add("01-11"); Tem.Add("01-12"); Tem.Add("01-13"); Tem.Add("01-14"); Tem.Add("01-15"); Tem.Add("01-16"); Tem.Add("01-17"); Tem.Add("01-18"); Tem.Add("01-19"); Tem.Add("01-20"); Tem.Add("01-21"); Tem.Add("01-22"); Tem.Add("01-23"); Tem.Add("01-24"); //02端 Tem.Add("02-1"); Tem.Add("02-2"); Tem.Add("02-3"); Tem.Add("02-4"); Tem.Add("02-5"); Tem.Add("02-6"); Tem.Add("02-7"); Tem.Add("02-8"); Tem.Add("02-9"); Tem.Add("02-10"); Tem.Add("02-11"); Tem.Add("02-12"); Tem.Add("02-13"); Tem.Add("02-14"); Tem.Add("02-15"); Tem.Add("02-16"); Tem.Add("02-17"); Tem.Add("02-18"); Tem.Add("02-19"); Tem.Add("02-20"); Tem.Add("02-21"); Tem.Add("02-22"); Tem.Add("02-23"); Tem.Add("02-24"); return(Tem); } case Model.E_InspectMethod.TFK一芯检测x2: { return(PigtailList(2)); } case Maticsoft.Model.E_InspectMethod.FFOS_四芯: { return(PigtailList(5)); } case Maticsoft.Model.E_InspectMethod.FFOS_八芯: { return(PigtailList(9)); } case Maticsoft.Model.E_InspectMethod.FFOS_二十四芯: { return(PigtailList(25)); } case Maticsoft.Model.E_InspectMethod.FFOS_十六芯: { return(PigtailList(17)); } case Maticsoft.Model.E_InspectMethod.FFOS_三十二芯: { return(PigtailList(33)); } case Maticsoft.Model.E_InspectMethod.FFOS32_三十二芯双头: { return(PigtailList(34)); } case Maticsoft.Model.E_InspectMethod.四芯检测: { return(PigtailList(4)); } case Maticsoft.Model.E_InspectMethod.八芯检测: { return(PigtailList(8)); } case Maticsoft.Model.E_InspectMethod.一码一签_跳线: { return(PigtailList(2)); } case Maticsoft.Model.E_InspectMethod.二十四芯检测: { return(PigtailList(24)); } case Maticsoft.Model.E_InspectMethod.四十八芯检测: { return(PigtailList(48)); } case Maticsoft.Model.E_InspectMethod.MPO检测: { return(PigtailList(4)); } case Maticsoft.Model.E_InspectMethod.十二芯检测: { return(PigtailList(12)); } case Maticsoft.Model.E_InspectMethod.一码一签: { return(PigtailList(1)); } case Maticsoft.Model.E_InspectMethod.配组_八芯_SAMHALL: { return(PigtailList(1)); } case Maticsoft.Model.E_InspectMethod.配组_二十四芯_SAMHALL: { return(PigtailList(1)); } case Maticsoft.Model.E_InspectMethod.配组_四十八芯_SAMHALL: { return(PigtailList(1)); } case Model.E_InspectMethod.配组_九十六芯_SAMHALL: { return(PigtailList(1)); } default: return(null); } } }
//---------------------------------------------------------------------------------------------------------- // 名称:返回ClientSN 标准比对数组 //---------------------------------------------------------------------------------------------------------- /// <summary> /// 返回ClientSN的线材编号标准数组 /// </summary> /// <param name="_inspectMethod">线材类型</param> /// <returns></returns> public ArrayList Client_Standard_ClientNum(Maticsoft.Model.E_InspectMethod _inspectMethod) { ArrayList _temList = new ArrayList(); _temList.Clear(); switch (_inspectMethod) { case Maticsoft.Model.E_InspectMethod.配组_二十四芯: { _temList.Add("01"); _temList.Add("02"); _temList.Add("03"); return(_temList); //01、02、03 } case Maticsoft.Model.E_InspectMethod.配组_四十八芯: { _temList.Add("01"); _temList.Add("02"); _temList.Add("03"); _temList.Add("04"); _temList.Add("05"); _temList.Add("06"); return(_temList); //01、02、03、04、05、06 } case Maticsoft.Model.E_InspectMethod.配组_九十六芯: { _temList.Add("01"); _temList.Add("02"); _temList.Add("03"); _temList.Add("04"); _temList.Add("05"); _temList.Add("06"); _temList.Add("07"); _temList.Add("08"); _temList.Add("09"); _temList.Add("10"); _temList.Add("11"); _temList.Add("12"); return(_temList); //01、02、03、04、05、06、07、08、09、10、11、12 } case Maticsoft.Model.E_InspectMethod.配组_八芯_SAMHALL: { _temList.Add("1"); _temList.Add("2"); _temList.Add("3"); _temList.Add("4"); _temList.Add("5"); _temList.Add("6"); _temList.Add("7"); _temList.Add("8"); return(_temList); //1、2、3、4、5、6、7、8 } case Maticsoft.Model.E_InspectMethod.配组_九十六芯_SAMHALL: { for (int i = 1; i <= 96; i++) { _temList.Add(i.ToString()); } return(_temList); //1、2、3、4、5、6、7、8 ..... 46、47、48 } case Model.E_InspectMethod.配组_四十八芯_SAMHALL: { for (int i = 1; i <= 48; i++) { _temList.Add(i.ToString()); } return(_temList); //1、2、3、4、5、6、7、8 ..... 46、47、48 } case Model.E_InspectMethod.配组_二十四芯_SAMHALL: { for (int i = 1; i <= 24; i++) { _temList.Add(i.ToString()); } return(_temList); //1、2、3、4、5、6、7、8 ..... 46、47、48 } default: return(null); //未知检测类型请添加 } }
/// <summary> /// 设置事件 /// </summary> /// <param name="_InspectMethod"></param> private void EventSet(Maticsoft.Model.E_InspectMethod _InspectMethod, Maticsoft.Model.E_InspectType _InspectType) { //------------------------------------------------------------------------------------------------------- // 名称:事件赋值 // 功能:检测不是配组类型的线材 //-------------------------------------------------------------------------------------------------------- if (_InspectMethod == Model.E_InspectMethod.配组_二十四芯 || _InspectMethod == Model.E_InspectMethod.配组_四十八芯 || _InspectMethod == Model.E_InspectMethod.配组_九十六芯 ) { Event_Inspect += InspectMethod_Two; if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_User_3D.Getdata_Method_Multicore; _GLL_TestData.GetData_Exfo += _M_User_Exfo.Getdata_Method_Multicore; // if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack2; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_User_3D.Getdata_Method_Multicore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack2; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.Getdata_Method_Multicore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } } //------------------------------------------------------------------------------------------------------- // 名称:事件赋值 // 功能:检测不是配组类型的线材 //-------------------------------------------------------------------------------------------------------- else if (_InspectMethod == Maticsoft.Model.E_InspectMethod.双并检测 || _InspectMethod == Model.E_InspectMethod.一码一签_跳线 || _InspectMethod == Model.E_InspectMethod.四芯检测 || _InspectMethod == Model.E_InspectMethod.十二芯检测 || _InspectMethod == Model.E_InspectMethod.二十四芯检测 || _InspectMethod == Model.E_InspectMethod.四十八芯检测 || _InspectMethod == Model.E_InspectMethod.八芯检测 || _InspectMethod == Model.E_InspectMethod.FFOS32_三十二芯双头 || _InspectMethod == Model.E_InspectMethod.FFOS_四芯 || _InspectMethod == Model.E_InspectMethod.FFOS_十六芯 || _InspectMethod == Model.E_InspectMethod.FFOS_三十二芯 || _InspectMethod == Model.E_InspectMethod.FFOS_二十四芯 || _InspectMethod == Model.E_InspectMethod.FFOS_八芯 ) { Event_Inspect += InspectMothod_One; //检测方法 if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_User_3D.Getdata_Method_TwainCore; _GLL_TestData.GetData_Exfo += _M_User_Exfo.Getdata_Method_TwainCore; // if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_User_3D.Getdata_Method_TwainCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.Getdata_Method_TwainCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } } //------------------------------------------------------------------------------------------------------- // 名称:事件赋值 // 功能:MPO检测 //-------------------------------------------------------------------------------------------------------- else if (_InspectMethod == Model.E_InspectMethod.MPO检测) { MultiFiber _M_Multifiber = new MultiFiber(); Event_Inspect += InspectMothod_One; //检测方法 if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_Multifiber.Getdata_Method_MPO; _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_MPO; if (IsUpdate) //检测是否启用更新 { // //_GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_Multifiber.Getdata_Method_MPO; if (IsUpdate) //检测是否启用更新 { // _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_MPO; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } } //------------------------------------------------------------------------------------------------------- // 名称:事件赋值 // 功能:检测 //-------------------------------------------------------------------------------------------------------- else if (_InspectMethod == Model.E_InspectMethod.配组_八芯_SAMHALL || _InspectMethod == Model.E_InspectMethod.配组_二十四芯_SAMHALL || _InspectMethod == Model.E_InspectMethod.配组_四十八芯_SAMHALL || _InspectMethod == Model.E_InspectMethod.配组_九十六芯_SAMHALL) { Event_Inspect += InspectMethod_Three; if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_User_3D.GetData_Method_OneCore; _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_OneCore; if (IsUpdate) //检测是否启用更新 { // _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack3; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_User_3D.GetData_Method_OneCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack3; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_OneCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } } //------------------------------------------------------------------------------------------------------- // 名称:事件赋值 // 功能:检测12芯*2 //-------------------------------------------------------------------------------------------------------- else if (_InspectMethod == Model.E_InspectMethod.TFK十二芯检测x2 || _InspectMethod == Model.E_InspectMethod.TFK二十四芯检测x2 || _InspectMethod == Model.E_InspectMethod.TFK一芯检测x2) { Event_Inspect += InspectMothod_four; //检测方法 if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_User_3D.Getdata_Method_twentyFour; _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_OneCore_TFK; if (IsUpdate) //检测是否启用更新 { // _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_User_3D.Getdata_Method_twentyFour; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.Getdata_Method_TwainCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } } //------------------------------------------------------------------------------------------------------- // 名称:事件赋值 // 功能:检测不是配组类型的线材 //-------------------------------------------------------------------------------------------------------- else if (_InspectMethod == Model.E_InspectMethod.一码一签) //_InspectMethod == Model.E_InspectMethod.两码一签 || { Event_Inspect += InspectMothod_One; //检测方法 if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_User_3D.GetData_Method_OneCore; _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_OneCore; if (IsUpdate) //检测是否启用更新 { // _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_User_3D.GetData_Method_OneCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_OneCore; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack; } } } else if (_InspectMethod == Model.E_InspectMethod.两码两签) { Event_Inspect += InspectMethod_TwoSnTwoLab; //检测方法 if (_InspectType == Maticsoft.Model.E_InspectType.检测3D与Exfo) { _GLL_TestData.GetData_3D += _M_User_3D.GetData_Method_TwoSnToLab; _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_TwoSnToLab; if (IsUpdate) //检测是否启用更新 { // _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack_TwoSnTwoLab; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测3D) { _GLL_TestData.GetData_3D += _M_User_3D.GetData_Method_TwoSnToLab; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_3D += _M_Pack_3D.Add_Pack; } } else if (_InspectType == Maticsoft.Model.E_InspectType.检测Exfo) { _GLL_TestData.GetData_Exfo += _M_User_Exfo.GetData_Method_TwoSnToLab; if (IsUpdate) //检测是否启用更新 { _GLL_TestData.UpData_Exfo += _M_Pack_Exfo.Add_Pack_TwoSnTwoLab; } } } }
/// <summary> /// 查询已包装的数据 ——主要用于导出 /// </summary> /// <param name="BatchNo">包装批号 当为多芯查询时 为ClientSN编码</param> /// <returns>已包装数据</returns> public DataSet Get_PackData(string BatchNo, Maticsoft.Model.E_InspectMethod _inspectMethod) { return(dal.Get_PackData(BatchNo, _inspectMethod)); }