void _Barcode_Received_Data(byte[] yReceiveData)
        {
            try
            {
                if (yReceiveData.Length > 0)
                {
                    string pFindData       = string.Empty;
                    string vPart_code      = string.Empty;
                    string vMake_no        = string.Empty;
                    string vInspect_no     = string.Empty;
                    string vVend_Part_Code = string.Empty;
                    string vReference_id   = string.Empty;

                    pFindData = CoFAS_ConvertManager.Bytes2String(yReceiveData, 0, 0);
                    //pFindData = pFindData.Substring(0, pFindData.Length -5);//뒤에 개행문자 지울경우(2자리)
                    pFindData = pFindData.Substring(0, 11);

                    CoFAS_ControlManager.InvokeIfNeeded(_luBAR_CODE, () => _luBAR_CODE.Text = pFindData);
                    MainFind_DisplayData();


                    //종료시 close시키기
                    //엑셀로 커서가게
                    //바코드세팅 com번호 가져오게하기
                    //기존 USP_BarcodeLabelPrint_R30를 수정하여 같이쓰게 하든가 아니면 별도로 가져오게하기
                    //dispose 예외처리하기
                }

                Application.DoEvents(); //화면초기화
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        void _Barcode_Received_Data(byte[] yReceiveData)
        {
            try
            {
                if (yReceiveData.Length > 0)
                {
                    string temp = string.Empty;
                    temp = CoFAS_ConvertManager.Bytes2String(yReceiveData, 0, 0);
                    temp = temp.Substring(0, temp.Length - 2); //뒤에 개행문자 지울경우(2자리)
                                                               // FindPartCode(temp);
                                                               //종료시 close시키기
                                                               //엑셀로 커서가게
                                                               //바코드세팅 com번호 가져오게하기
                                                               //기존 USP_BarcodeLabelPrint_R30를 수정하여 같이쓰게 하든가 아니면 별도로 가져오게하기
                                                               //dispose 예외처리하기
                }

                Application.DoEvents(); //화면초기화
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 3
0
        void _Barcode_Received_Data(byte[] yReceiveData)
        {
            try
            {
                if (yReceiveData.Length > 0)
                {
                    if (!_pPART_STOCK_YN)
                    {
                        string pFindData       = string.Empty;
                        string vPart_code      = string.Empty;
                        string vMake_no        = string.Empty;
                        string vInspect_no     = string.Empty;
                        string vVend_Part_Code = string.Empty;
                        string vReference_id   = string.Empty;

                        pFindData = CoFAS_ConvertManager.Bytes2String(yReceiveData, 0, 0);
                        pFindData = pFindData.Substring(0, pFindData.Length - 4);//뒤에 개행문자 지울경우(2자리)
                        DataSet pDataSet = new DataSet();
                        pDataSet = new BarcodeLabelPrintBusiness().BarcodeLabelPrint_inspect_Info(_pfrmPOPMain_RAWMATERIAL_COSMETICSEntity.LANGUAGE_TYPE, "DOC", pFindData);
                        _dtList  = pDataSet.Tables[0];
                        if (_dtList != null && _dtList.Rows.Count > 0)
                        {
                            vPart_code      = _dtList.Rows[0]["part_code"].ToString();
                            vMake_no        = _dtList.Rows[0]["make_no"].ToString();
                            vInspect_no     = _dtList.Rows[0]["inspect_no"].ToString();
                            vVend_Part_Code = _dtList.Rows[0]["vend_part_code"].ToString();
                            vReference_id   = _dtList.Rows[0]["reference_id"].ToString();
                            //제조
                            if (_pPROCESS_CODE_MST == "PC01")
                            {
                                FindPartCode(vPart_code, vVend_Part_Code, vInspect_no, vReference_id);
                            }
                            else
                            {
                                FindPartCode(vPart_code, vVend_Part_Code, vMake_no, vReference_id);
                            }
                        }
                        else
                        {
                            CoFAS_DevExpressManager.ShowInformationMessage("등록되지 않은 바코드입니다.");
                        }

                        //종료시 close시키기
                        //엑셀로 커서가게
                        //바코드세팅 com번호 가져오게하기
                        //기존 USP_BarcodeLabelPrint_R30를 수정하여 같이쓰게 하든가 아니면 별도로 가져오게하기
                        //dispose 예외처리하기
                    }

                    //재고확인
                    else
                    {
                        string pFindData       = string.Empty;
                        string vPart_code      = string.Empty;
                        string vMake_no        = string.Empty;
                        string vInspect_no     = string.Empty;
                        string vVend_Part_Code = string.Empty;
                        string vReference_id   = string.Empty;

                        _pfrmPOPMain_RAWMATERIAL_COSMETICSEntity.CRUD      = "R";
                        _pfrmPOPMain_RAWMATERIAL_COSMETICSEntity.USER_CODE = _pUSER_CODE;
                        //_pPOPSelect_INSPECT_COSMETICSEntity.PART_CODE = _luPART_CODE.Text;
                        pFindData = CoFAS_ConvertManager.Bytes2String(yReceiveData, 0, 0);
                        pFindData = pFindData.Substring(0, pFindData.Length - 4);//뒤에 개행문자 지울경우(2자리)
                        frmPOPPartStockCheck frmkey = new frmPOPPartStockCheck(_pUserEntity);
                        frmkey.titleName    = "원료재고확인";
                        frmkey._pBARCODE_NO = pFindData;// "MI181128000001";

                        // if (_pBarcode_Serial.IsOpen)
                        //     _pBarcode_Serial.Close();

                        if (frmkey.ShowDialog() == DialogResult.OK)
                        {
                            // if (!_pBarcode_Serial.IsOpen)
                            //     _pBarcode_Serial.Open() ;

                            string PopupValue  = frmkey.ReturnValue1;       //검체채취량
                            string PopupValue2 = frmkey.ReturnValue2;       //검체채취일


                            DisplayMessage(_ucbtINSPECT_REG.Name + " -> " + PopupValue);
                            _pfrmPOPMain_RAWMATERIAL_COSMETICSEntity.SAMPLING_RESULT = PopupValue;
                            _pfrmPOPMain_RAWMATERIAL_COSMETICSEntity.SAMPLING_DATE   = PopupValue2;
                        }
                    }
                }


                //Application.DoEvents(); //화면초기화
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }