예제 #1
0
        //
        //导出装箱报告
        //
        private void btn_R_Export_Encasement_Click(object sender, RoutedEventArgs e)
        {
            Maticsoft.BLL.Report_3D _Report_Encasement = new Report_3D();
            Report _Report = new Report();                              //初始化报告导出类

            _Report.Export_TextReport += _Report_Encasement.Encasement; //赋值导出方式

            Maticsoft.BLL.BoxInfo _M_BoxInfo = new BoxInfo();
            //定义参数 DataSet数据 导出模板 保存路径
            DataSet _Temds = _M_BoxInfo.GetList_BatchNo_Or_BoxSN("BatchNo = '" + cmb_R_BatchNo_Encasement.Text.Trim() + "'");

            Report.ImportEventArgs p =
                new Report.ImportEventArgs(_Temds, cmb_TemplateList.Text.Trim(), txb_SavePatch.Text.Trim() + "\\" + cmb_R_BatchNo_Encasement.Text.Trim());
            p.UpProgressBar += UpProgressBar;
            _Report.StatExport(p);
        }
예제 #2
0
        /// <summary>
        /// 导出3D数据报告
        /// </summary>
        private void btn_Report_3D_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                btn_Report_3D.IsEnabled = false;
                temBatchNo   = cmb_Report_BatchNo_3D.Text;
                _TemPlate    = cmb_TemplateList.Text;
                temSavePatch = txb_SavePatch.Text;
                //
                Pack_3D   _M_Pack3D   = new Pack_3D();
                Pack_Exfo _M_PackExfo = new Pack_Exfo();
                //
                Report _Report_3D   = new Report();
                Report _Report_Exfo = new Report();
                //
                Report_3D   _report_3d   = new Report_3D();
                Report_Exfo _report_exfo = new Report_Exfo();

                Maticsoft.BLL.WorkOrder   _M_WorkOrder = new WorkOrder();
                Maticsoft.Model.WorkOrder _WorkOrder   = new Maticsoft.Model.WorkOrder();

                _WorkOrder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text.Trim());

                //十二芯X2 导出
                if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.TFK十二芯检测x2)
                {
                    //导出3D数据
                    _Report_3D.Export_TextReport += _report_3d.TFK十二芯检测x2;

                    Report.ImportEventArgs p = new Report.ImportEventArgs(_M_Pack3D.Get_PackData(cmb_Report_BatchNo_3D.Text.Trim(), _WorkOrder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);
                    p.OrderInfo = _WorkOrder;
                    OrderLabSet _M_OrderLabSet = new OrderLabSet();
                    p.LabInfo        = _M_OrderLabSet.GetLabInfo("OrderID='" + txb_Report_OrderID_3D.Text + "'");
                    p.UpProgressBar += UpProgressBar;

                    _Report_3D.StatExport(p);

                    //导出Exfo数据
                }
                else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_二十四芯 ||
                         _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_四十八芯 ||
                         _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.配组_九十六芯 ||
                         _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.四十八芯检测 ||
                         _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.二十四芯检测
                         )
                {
                    //导出3D数据
                    Maticsoft.BLL.SerialNumber _M_SerialNumber = new SerialNumber();

                    _Report_3D.Export_TextReport += _report_3d.Multicore;
                    DataSet temds            = new DataSet();
                    Report.ImportEventArgs p = new Report.ImportEventArgs(temds, _TemPlate, temSavePatch + "\\");
                    p.OrderInfo = _WorkOrder;
                    OrderLabSet _M_OrderLabSet = new OrderLabSet();
                    p.LabInfo        = _M_OrderLabSet.GetLabInfo("OrderID='" + txb_Report_OrderID_3D.Text + "'");
                    p.UpProgressBar += UpProgressBar;

                    ArrayList _SN_List = _M_SerialNumber.Get_SN_List(_WorkOrder.OrderID, Maticsoft.Model.E_SerialNumber_Type.ClientSN, Maticsoft.Model.E_Barcode_State.Yet_Pack);
                    _Report_3D.StatExport(p, _SN_List);
                }
                //配组8芯
                else
                {
                    //导出3D数据
                    _Report_3D.Export_TextReport += _report_3d.peizu;
                    Report.ImportEventArgs p = new Report.ImportEventArgs(_M_Pack3D.Get_PackData(cmb_Report_BatchNo_3D.Text.Trim(), _WorkOrder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);
                    p.OrderInfo      = _WorkOrder;
                    p.UpProgressBar += UpProgressBar;
                    _Report_3D.StatExport(p);
                }
                btn_Report_3D.IsEnabled = true;
            }
            catch { }
        }