Exemplo n.º 1
0
        /***************************  控件事件  **************************************/
        //
        //工单单号
        //
        private void txb_OrderID_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == System.Windows.Input.Key.Enter && txb_OrderID.IsFocused)
            {
                Maticsoft.BLL.WorkOrder   _M_WorkOrder = new Maticsoft.BLL.WorkOrder();
                Maticsoft.Model.WorkOrder _WorkOrder   = new Maticsoft.Model.WorkOrder();
                _WorkOrder = _M_WorkOrder.GetModel(txb_OrderID.Text.Trim());
                if (_WorkOrder != null)
                {
                    //控件赋值
                    txb_OrderCount.Text    = _WorkOrder.Count;
                    Info_PeoductName.Text  = _WorkOrder.ProductName;
                    Info_Model.Text        = _WorkOrder.Model;
                    Info_DeliveryDate.Text = _WorkOrder.DeliveryDate;

                    //赋值包装批号
                    Maticsoft.BLL.PackBatch _temPackBatch = new PackBatch();
                    cmb_BatchNo.DataContext       = _temPackBatch.GetList("OrderID='" + txb_OrderID.Text.Trim() + "'").Tables[0];
                    cmb_BatchNo.DisplayMemberPath = "BatchNo";
                }
                else
                {
                    My_MessageBox.My_MessageBox_Message("未找到工单信息!");
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 导出方法设置
        /// </summary>
        /// <param name="_M_PackExfo"></param>
        /// <param name="_Report_Exfo"></param>
        /// <param name="_report_exfo"></param>
        /// <param name="_M_WorkOrder"></param>
        /// <param name="_WorkOrder"></param>
        private void ExportMethod_Set(Pack_Exfo _M_PackExfo, Report _Report_Exfo, Report_Exfo _report_exfo, Maticsoft.BLL.WorkOrder _M_WorkOrder, Maticsoft.Model.WorkOrder _WorkOrder)
        {
            //双并导出
            if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.双并检测)
            {
                //获取每一个SN的已包装数据
                ArrayList temDatalist = new ArrayList();
                ArrayList temSnList   = new ArrayList();
                Maticsoft.BLL.SerialNumber _M_seriarlnumber = new SerialNumber();

                temSnList = _M_seriarlnumber.Get_SN_List(MCP_CS._M_PackBatch.GetModel(cmb_Report_BatchNo_3D.Text.Trim()), Maticsoft.Model.E_SerialNumber_Type.ClientSN, Maticsoft.Model.E_Barcode_State.Yet_Pack);
                foreach (string _sn in temSnList)
                {
                    temDatalist.Add(_M_PackExfo.Get_PackData(_sn));
                }

                //导出Exfo数据
                Report.ImportEventArgs ep = new Report.ImportEventArgs(temDatalist, _TemPlate, temSavePatch + "\\" + temBatchNo);
                _Report_Exfo.Export_TextReport += _report_exfo.Export_Twin;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.四芯检测 ||
                     _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.一码一签_跳线)
            {
                //获取每一个SN的已包装数据
                ArrayList temDatalist = new ArrayList();
                ArrayList temSnList   = new ArrayList();
                Maticsoft.BLL.SerialNumber _M_seriarlnumber = new SerialNumber();
                Maticsoft.Model.PackBatch  temPack          = MCP_CS._M_PackBatch.GetModel(cmb_Report_BatchNo_3D.Text.Trim());

                temSnList = _M_seriarlnumber.Get_SN_List(temPack, Maticsoft.Model.E_SerialNumber_Type.ClientSN, Maticsoft.Model.E_Barcode_State.Yet_Pack);
                foreach (string _sn in temSnList)
                {
                    temDatalist.Add(_M_PackExfo.Get_PackData(_sn));
                }

                //导出Exfo数据
                Report.ImportEventArgs ep = new Report.ImportEventArgs(temDatalist, _TemPlate, temSavePatch + "\\" + temBatchNo);
                _Report_Exfo.Export_TextReport += _report_exfo.Export_fourCore;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.MPO检测)
            {
                Maticsoft.BLL.PackBatch _M_BatchNo = new PackBatch();
                //导出Exfo数据
                Maticsoft.Model.WorkOrder _temorder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text);

                Report.ImportEventArgs ep = new Report.ImportEventArgs(_M_PackExfo.Get_PackData(_temorder.OrderID, _temorder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);

                ep.BatchNo = _M_BatchNo.GetModel(cmb_Report_BatchNo_3D.Text.Trim());
                _Report_Exfo.Export_TextReport += _report_exfo.Export_Exfo_MPO;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.八芯检测)
            {
                Maticsoft.BLL.PackBatch _M_BatchNo = new PackBatch();
                //导出Exfo数据
                Maticsoft.Model.WorkOrder _temorder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text);

                Report.ImportEventArgs ep = new Report.ImportEventArgs(_M_PackExfo.Get_PackData(_temorder.OrderID, _temorder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);

                ep.BatchNo = _M_BatchNo.GetModel(cmb_Report_BatchNo_3D.Text.Trim());
                _Report_Exfo.Export_TextReport += _report_exfo.Export_EightCore;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else
            {
                //导出Exfo数据
                Maticsoft.Model.WorkOrder _temorder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text);
                Report.ImportEventArgs    ep        = new Report.ImportEventArgs(_M_PackExfo.Get_PackData(cmb_Report_BatchNo_3D.Text.Trim(), _temorder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);
                _Report_Exfo.Export_TextReport += _report_exfo.Export_Exfo_One;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
        }