private void _ucbtWORK_ORDER_Click(object sender, EventArgs e)
        {
            //작업지시
            frmPOPOrder.PROCESS_MST_CODE_COSMETICS = "PC02";// "ALL";
            frmPOPOrder frmOr = new frmPOPOrder(_pUserEntity);

            frmOr.ShowDialog();
            if (frmOr.dtReturn == null)
            {
                frmOr.Dispose();
                return;
            }

            if (frmOr.dtReturn != null && frmOr.dtReturn.Rows.Count > 0)
            {
                _luORDER_ID.Text   = frmOr.dtReturn.Rows[0]["PRODUCTION_ORDER_ID"].ToString();
                _luORDER_DATE.Text = frmOr.dtReturn.Rows[0]["PRODUCTION_ORDER_DATE"].ToString();
                _luORDER_QTY.Text  = frmOr.dtReturn.Rows[0]["PRODUCTION_ORDER_QTY"].ToString();
                _luPART_NAME.Text  = frmOr.dtReturn.Rows[0]["PART_NAME"].ToString();
                // _luPART_CODE.Text = frmOr.dtReturn.Rows[0]["PART_CODE"].ToString();
                _luPART_CODE.Text  = frmOr.dtReturn.Rows[0]["VEND_PART_CODE"].ToString();
                _luNG_QTY.Text     = frmOr.dtReturn.Rows[0]["NG_QTY"].ToString();
                _luRESULT_QTY.Text = frmOr.dtReturn.Rows[0]["RESULT_QTY"].ToString();
                _luOK_QTY.Text     = frmOr.dtReturn.Rows[0]["OK_QTY"].ToString();
                _pPOPSelect_INSPECT_COSMETICSEntity.PART_CODE                 = frmOr.dtReturn.Rows[0]["PART_CODE"].ToString();
                _pPOPSelect_INSPECT_COSMETICSEntity.PRODUCTION_ORDER_ID       = _luORDER_ID.Text;
                _pPOPSelect_INSPECT_COSMETICSEntity.ORDER_FILE                = frmOr.dtReturn.Rows[0]["ORDER_FILE"].ToString();
                _pPOPSelect_INSPECT_COSMETICSEntity.REQUEST_FILE              = frmOr.dtReturn.Rows[0]["REQUEST_FILE"].ToString();
                _pPOPSelect_INSPECT_COSMETICSEntity.PRODUCTION_STATUS_PACKING = frmOr.dtReturn.Rows[0]["PRODUCTION_STATUS_PACKING"].ToString();


                _pPOPSelect_INSPECT_COSMETICSEntity.PROCESS_CODE_MST = frmOr.dtReturn.Rows[0]["PROCESS_CODE_MST"].ToString();// _pUserEntity.PROCESS_CODE;
                _luTPROCESS_CODE_MST.Text = frmOr.dtReturn.Rows[0]["PROCESS_NAME"].ToString();
                //제조일경우에는 요청서 안보이게
                if (_pPOPSelect_INSPECT_COSMETICSEntity.PROCESS_CODE_MST == "PT040001" || _pPOPSelect_INSPECT_COSMETICSEntity.PROCESS_CODE_MST == "PC01")
                {
                    _ucbtORDER_REQUEST.Enabled = false;
                }
                else
                {
                    _ucbtORDER_REQUEST.Enabled = true;
                }

                _pINSPECT_CHECK_YN = false;
                if (frmOr.dtReturn.Rows[0]["INSPECT_STATUS"].ToString() != "QC010001")
                {
                    if (frmOr.dtReturn.Rows[0]["INSPECT_STATUS"].ToString() != "")
                    {
                        _pINSPECT_CHECK_YN = true;
                    }
                }


                Size_reset();
            }


            frmOr.Dispose();
        }
        //품목코드 찾기(저울스캔시)
        //   private void FindPartCode(string pPart_code)
        //   {
        //       IWorkbook workbook = _sdMAIN.Document;
        //       Worksheet sheet_0 = workbook.Worksheets[0];
        //       Range rg;
        //
        //       rg = sheet_0.Range["D11:D42"];    //판정유무
        //
        //       IEnumerable<Cell> searchResult = rg.Search(pPart_code);
        //       foreach (Cell cell in searchResult)
        //       {
        //           sheet_0.Cells[cell.RowIndex, 8].SetValue("450.1");
        //           //cell.RowIndex
        //       }
        //   }


        #endregion

        private void _ucbtWORK_ORDER_Click(object sender, EventArgs e)
        {
            //작업지시
            frmPOPOrder.PROCESS_MST_CODE_COSMETICS = "ALL";
            frmPOPOrder frmOr = new frmPOPOrder(_pUserEntity);

            frmOr.ShowDialog();
            if (frmOr.dtReturn == null)
            {
                frmOr.Dispose();
                return;
            }

            if (frmOr.dtReturn != null && frmOr.dtReturn.Rows.Count > 0)
            {
                _luORDER_ID.Text   = frmOr.dtReturn.Rows[0]["PRODUCTION_ORDER_ID"].ToString();
                _luORDER_DATE.Text = frmOr.dtReturn.Rows[0]["PRODUCTION_ORDER_DATE"].ToString();
                _luORDER_QTY.Text  = frmOr.dtReturn.Rows[0]["PRODUCTION_ORDER_QTY"].ToString();
                _luPART_NAME.Text  = frmOr.dtReturn.Rows[0]["PART_NAME"].ToString();
                // _luPART_CODE.Text = frmOr.dtReturn.Rows[0]["PART_CODE"].ToString();
                _luPART_CODE.Text  = frmOr.dtReturn.Rows[0]["VEND_PART_CODE"].ToString();
                _luNG_QTY.Text     = frmOr.dtReturn.Rows[0]["NG_QTY"].ToString();
                _luRESULT_QTY.Text = frmOr.dtReturn.Rows[0]["RESULT_QTY"].ToString();
                _luOK_QTY.Text     = frmOr.dtReturn.Rows[0]["OK_QTY"].ToString();
                _pPOPSelect_INSPECT_COSMETICSEntity.PART_CODE = frmOr.dtReturn.Rows[0]["PART_CODE"].ToString();
                if (frmOr.dtReturn.Rows[0]["INSPECT_STATUS"].ToString() != "QC010001")
                {
                    if (frmOr.dtReturn.Rows[0]["INSPECT_STATUS"].ToString() != "")
                    {
                        _pINSPECT_CHECK_YN = true;
                    }
                }
            }


            frmOr.Dispose();
        }
        private void btnCmd_Click(object pSender, EventArgs pEventArgs)
        {
            SimpleButton pCmd = pSender as SimpleButton;

            string sCls = pCmd.Name.Substring(6, 2);



            switch (sCls)
            {
            case "10":
                // 실적등록
                frmPopupKeypad frmkey = new frmPopupKeypad();
                frmkey.titleName = pCmd.Text;
                if (frmkey.ShowDialog() == DialogResult.OK)
                {
                    string PopupValue = frmkey.ReturnValue1;
                    DisplayMessage(pCmd.Text + " -> " + PopupValue);
                }

                break;

            case "20":
                // 불량처리
                frmPOPBad frmb = new frmPOPBad();
                frmb.titleName = pCmd.Text;
                if (frmb.ShowDialog() == DialogResult.OK)
                {
                    string PopupValue = frmb.ReturnValue1;
                    DisplayMessage(pCmd.Text + " -> " + PopupValue);
                }
                break;

            case "30":
                // 비가동 등록
                frmPOPStop frmStop = new frmPOPStop();
                if (frmStop.ShowDialog() == DialogResult.OK)
                {
                }

                break;

            case "40":
                //작업표준서
                frmPOPDocument frmdoc = new frmPOPDocument();
                if (frmdoc.ShowDialog() == DialogResult.OK)
                {
                }

                break;

            case "50":
                //작업지시
                frmPOPOrder frmOr = new frmPOPOrder(_pUserEntity);
                if (frmOr.ShowDialog() == DialogResult.OK)
                {
                }

                break;

            default: break;
            }
        }