// //包装批号 // private void cmb_BatchNo_DropDownClosed(object sender, System.EventArgs e) { if (cmb_BatchNo.Text != "") { _PackBatch = _M_PackBatch.GetModel(cmb_BatchNo.Text.Trim()); cmb_BatchNo.IsEnabled = false; Info_Batch_Count.Text = _PackBatch.Count.ToString(); Info_YetPack_Count.Text = _M_SerialNumber.Get_PackCount_Batch("BatchNo ='" + cmb_BatchNo.Text.Trim() + "' AND (Type = 'ClientSN') AND State ='Yet_Pack'").ToString(); // _WTT_Inspect.PackBatch = _PackBatch; _WTT_Inspect.IsUpdate = false; _WTT_Inspect.IsPrint = false; if ( _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯 || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯 || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯 ) { txb_ClientSN.Text = _M_SerialNumber.Get_MinSN(_WorkOrder.OrderID, Maticsoft.Model.E_SerialNumber_Type.ClientSN); //待包装线号 txb_ClientNum.Text = _WTT_Inspect.Get_Client_NotPack_PigtailNum(txb_ClientSN.Text.Trim()); } //获取8芯配组ClientSN else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_八芯_SAMHALL || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯_SAMHALL || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯_SAMHALL || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯_SAMHALL) { txb_ClientSN.Text = _M_SerialNumber.Get_MinSN(txb_Orderid.Text.Trim(), Maticsoft.Model.E_SerialNumber_Type.ClientSN, ""); //待包装线号 txb_ClientNum.Text = _WTT_Inspect.Get_Client_NotPack_PigtailNum(txb_ClientSN.Text.Trim()); } //验证此批号是否包装完成 if (Info_Batch_Count.Text.Trim() == Info_YetPack_Count.Text.Trim()) { txb_Pigtailsn.IsEnabled = false; My_MessageBox.My_MessageBox_Message("批号:" + _PackBatch.BatchNo + " 数量:" + _PackBatch.Count + "已包装:" + Info_YetPack_Count + "\r\n包装完成!"); } else { txb_Pigtailsn.IsEnabled = true; } cmb_LabName.Text = _WTT_Inspect.My_Print.LabName; } }
// //包装批号 // private void cmb_BatchNo_DropDownClosed(object sender, EventArgs e) { if (cmb_BatchNo.Text != "") { Maticsoft.Model.PackBatch _PackBatch = _M_PackBatchNo.GetModel(cmb_BatchNo.Text.Trim()); cmb_BatchNo.IsEnabled = false; Maticsoft.BLL.SerialNumber _M_SerialNumber = new SerialNumber(); // Info_YetPack_Count.Text = _M_SerialNumber.Get_PackCount_Batch("OrderID='" + txb_Orderid.Text.Trim() + "' AND BatchNO='" + cmb_BatchNo.Text.Trim() + "' AND State='Yet_Pack' ").ToString(); Info_Batch_Count.Text = _PackBatch.Count.ToString(); Info_YetPrintCount.Text = _M_PrintRecord.Get_Count("BatchNo='" + cmb_BatchNo.Text.Trim() + "'").ToString(); // _WTT_My_Print = new My_Print(txb_Orderid.Text.Trim(), cmb_BatchNo.Text.Trim()); if (_WTT_OrderInfo.InspectMethod == Maticsoft.Model.E_InspectMethod.TFK十二芯检测x2) { _WTT_My_Print.IsBtPrint = true; } } else { My_MessageBox.My_MessageBox_Message("批号不能为空!"); } }
// //包装批号 // private void cmb_BatchNo_DropDownClosed(object sender, System.EventArgs e) { lab_NotPrintCount.Visibility = System.Windows.Visibility.Visible; if (cmb_BatchNo.Text != "") { //结束BT进程 ZhuifengLib.ProcessControl.Process_Control _Process = new ZhuifengLib.ProcessControl.Process_Control(); _Process.kill_Process("bartend"); _PackBatch = _M_PackBatch.GetModel(cmb_BatchNo.Text.Trim()); cmb_BatchNo.IsEnabled = false; Info_Batch_Count.Text = _PackBatch.Count.ToString(); Info_YetPack_Count.Text = _M_SerialNumber.Get_PackCount_Batch("BatchNo ='" + cmb_BatchNo.Text.Trim() + "' AND (Type = 'ClientSN') AND State ='Yet_Pack'").ToString(); // _WTT_Inspect.PackBatch = _PackBatch; _WTT_Inspect.IsUpdate = true; if ( _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯 || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯 || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯 ) { lab_NotPrintCount.Visibility = System.Windows.Visibility.Hidden; txb_ClientSN.Text = _M_SerialNumber.Get_MinSN(_WorkOrder.OrderID, Maticsoft.Model.E_SerialNumber_Type.ClientSN); //待包装线号 txb_ClientNum.Text = _WTT_Inspect.Get_Client_NotPack_PigtailNum(txb_ClientSN.Text.Trim()); } //获取8芯配组ClientSN else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_八芯_SAMHALL || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯_SAMHALL || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯_SAMHALL || _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯_SAMHALL) { lab_NotPrintCount.Visibility = System.Windows.Visibility.Hidden; txb_ClientSN.Text = _M_SerialNumber.Get_MinSN(txb_Orderid.Text.Trim(), Maticsoft.Model.E_SerialNumber_Type.ClientSN, ""); //待包装线号 txb_ClientNum.Text = _WTT_Inspect.Get_Client_NotPack_PigtailNum(txb_ClientSN.Text.Trim()); } //验证此批号是否包装完成 int tem1 = int.Parse(Info_Batch_Count.Text.Trim()); //批量 int tem2 = int.Parse(Info_YetPack_Count.Text.Trim()); //已包装数量 if (tem2 >= tem1) { txb_Pigtailsn.IsEnabled = false; My_MessageBox.My_MessageBox_Message("批号:" + _PackBatch.BatchNo + " 数量:" + _PackBatch.Count + "已包装:" + Info_YetPack_Count.Text + "\r\n包装完成!"); } else { txb_Pigtailsn.IsEnabled = true; } try { //获取并显示标签模板的名字 txb_LabName.Text = _WTT_Inspect.My_Print.LabName; if (_WTT_Inspect.My_Print.LabName == "海信_RD-A-ELA32983.btw" || _WTT_Inspect.My_Print.LabName == "特恩驰跳线.btw" || _WTT_Inspect.My_Print.LabName == "特恩驰双并.btw" || _WTT_Inspect.My_Print.LabName == "TKF盒子标签12芯.btw" || _WTT_Inspect.My_Print.LabName == "MM海信_RD-A-ELA32983.btw") { _WTT_Inspect.My_Print.IsBtPrint = true; } } catch (Exception ex) { My_MessageBox.My_MessageBox_Message(ex.Message); } } }