예제 #1
0
        private static void padding_EightCore(Maticsoft.BLL.Report.ImportEventArgs e, Excel.Application xlApp)
        {
            Maticsoft.BLL.Pack_Exfo _M_PackExfo     = new Pack_Exfo();
            SerialNumber            _M_SerialNumber = new SerialNumber();
            ArrayList _SN_Data = _M_SerialNumber.Get_SN_List(" BatchNo = '" + e.BatchNo.BatchNo + "' AND State = 'Yet_Pack'");
            int       temcount = 0;
            int       _exRow   = 5;

            foreach (string _SN in _SN_Data)
            {
                xlApp.Cells[_exRow, 1] = _SN;
                // 1
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-1" + "'   AND (Wave = '1550nm')"), _exRow, 3);
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-2" + "'   AND (Wave = '1550nm')"), _exRow, 5);
                // 2
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-3" + "'   AND (Wave = '1550nm')"), _exRow, 7);
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-4" + "'   AND (Wave = '1550nm')"), _exRow, 9);
                // 3
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-5" + "'   AND (Wave = '1550nm')"), _exRow, 11);
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-6" + "' AND (Wave = '1550nm')"), _exRow, 13);
                // 4
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-7" + "'   AND (Wave = '1550nm')"), _exRow, 15);
                PaddingEightCore(xlApp, _M_PackExfo.GetList("SN = '" + _SN + "-8" + "' AND (Wave = '1550nm')"), _exRow, 17);
                temcount++;
                _exRow++;
                e.StatUpProgressBar(0, _SN_Data.Count, temcount);
            }
        }
예제 #2
0
        //批号下拉菜单
        private void cmb_BatchNo_DropDownClosed(object sender, EventArgs e)
        {
            try
            {
                txb_BoxSN.IsEnabled = true;
                txb_BoxSN.Text      = "";
                //获取批号信息
                PackBatch _M_PackBatch = new PackBatch();
                Maticsoft.Model.PackBatch _PackBatch = new Maticsoft.Model.PackBatch();
                _PackBatch          = _M_PackBatch.GetModel(cmb_BatchNo.Text.Trim());
                txb_BatchCount.Text = _PackBatch.Count.ToString();

                //获取装箱信息
                EncasementSet _M_EncasementSet = new EncasementSet();
                Maticsoft.Model.EncasementSet _EncasementSet = new Maticsoft.Model.EncasementSet();
                _EncasementSet = _M_EncasementSet.GetModel(cmb_BatchNo.Text.Trim());
                if (_EncasementSet != null)
                {
                    Info_Device.Text    = _EncasementSet.Device;
                    Info_DeviceQty.Text = _EncasementSet.DeviceQty;
                    Info_SackQty.Text   = _EncasementSet.SackQty;
                    //****************************************************** 2015-6-25 增加 对标签检测进行设置
                    if (_EncasementSet.DeviceQty == "2")
                    {
                        labCheck.vm.IsEnSN2 = true;
                    }
                    labCheck.vm.OrderID = _PackBatch.OrderID;
                }

                //已包装数量
                Maticsoft.BLL.SerialNumber _M_SerialNumber = new Maticsoft.BLL.SerialNumber();
                Info_YetPack_Count.Text = _M_SerialNumber.Get_PackCount_Batch(" (BatchNO = '" + cmb_BatchNo.Text.Trim() + "')  AND (State = '" + Maticsoft.Model.E_Barcode_State.Yet_Pack + "')").ToString();

                //已装箱数量
                Maticsoft.BLL.BoxInfo _M_BoxInfo = new Maticsoft.BLL.BoxInfo();
                Info_YetEncasement_Count.Text = _M_BoxInfo.GetYetEncasementCount("tb_BoxInfo.BatchNo = '" + cmb_BatchNo.Text.Trim() + "'").ToString();

                //批号装箱完成
                if (int.Parse(Info_YetEncasement_Count.Text.Trim()) >= int.Parse(txb_BatchCount.Text.Trim()))
                {
                    My_MessageBox.My_MessageBox_Message("批号:" + cmb_BatchNo.Text.Trim() + "数量:" + txb_BatchCount.Text.Trim() + "\r\n装箱完毕!");
                    txb_Device.IsEnabled       = false;
                    txb_SerialNumber.IsEnabled = false;
                }
            }
            catch { }
        }
        //数据查看
        private void FindData(DataDelivery e)
        {
            Maticsoft.BLL.SerialNumber sn = new Maticsoft.BLL.SerialNumber();        //条码操作类
            Type   BarcodeState           = typeof(Maticsoft.Model.E_Barcode_State); //条码状态
            string s = BarcodeState.GetEnumName(e.Option);                           //根据 索引获取 字符串  结果为 red

            Maticsoft.BLL.Pack_3D _M_Pack3D       = new Pack_3D();
            SerialNumber          _M_SerialNumber = new SerialNumber();

            switch (e.Option)
            {
            case 0:     //未包装
                ds_Record = sn.GetList("(State = '" + s + "') AND (OrderID = '" + txb_Find_OrderID.Text + "')");
                break;

            case 1:     //已包装
                ds_Record = sn.GetList("(State = '" + s + "') AND (OrderID = '" + txb_Find_OrderID.Text + "')");
                break;

            case 2:     //未装箱
                ds_Record = sn.GetList("(State = '" + s + "') AND (OrderID = '" + txb_Find_OrderID.Text + "')");
                break;

            case 3:     //已装箱
                ds_Record = sn.GetList("(State = '" + s + "') AND (OrderID = '" + txb_Find_OrderID.Text + "')");
                break;

            case 4:     //未打印
                break;

            case 5:     //已打印
                Maticsoft.BLL.tb_PrintRecord print_Record = new tb_PrintRecord();
                ds_Record = print_Record.GetList("(OrderID = '" + txb_Find_OrderID.Text + "')");
                break;

            case 6:    //客户编码
                ds_Record = _M_Pack3D.GetList("ClientSN ='" + txb_Find_OrderID.Text.Trim() + "'");
                // ds_Record = _M_Pack3D.Get_PackData(txb_Find_OrderID.Text.Trim(), Maticsoft.Model.E_InspectMethod.配组_四十八芯);
                break;

            case 7:    //客户编码
                ds_Record = _M_Pack3D.GetList("SN ='" + txb_Find_OrderID.Text.Trim() + "'");
                break;

            case 8:    //SN查询
                ds_Record = _M_SerialNumber.GetList("SN ='" + txb_Find_OrderID.Text.Trim() + "'");
                break;

            case 9:      //原始数据3D查询 根据SN
                ds_Record = MCP_CS._M_User_3D_Test_Good.GetList("SN LIKE '" + txb_Find_OrderID.Text.Trim() + "%'");
                break;

            case 10:     //原始数据JDS查询 根据SN
                ds_Record = MCP_CS._M_User_JDS_Test_Good.GetList("SN LIKE '" + txb_Find_OrderID.Text.Trim() + "%'");
                break;

            case 11:      //删除记录查询
                ds_Record = MCP_CS.Operation_Log.GetList("Remarks LIKE '%" + txb_Find_OrderID.Text.Trim() + "%'");
                break;
            }
            dgv_Info.ItemsSource = ds_Record.Tables[0].DefaultView;                      //显示控件中显示
            lab_Record.Text      = ds_Record.Tables[0].Rows.Count.ToString() + "条";      //记录数量
        }