private void txt_cust_nm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("WHERE  A.BUY_DATE >= '" + start_date.Text.ToString() + "' and  A.BUY_DATE <= '" + end_date.Text.ToString() + "' ");

                if (txt_cust_nm.Text != null && !txt_cust_nm.Text.Equals(""))
                {
                    Popup.pop거래처검색 frm = new Popup.pop거래처검색();
                    frm.txtSrch.Text = txt_cust_nm.Text.ToString();
                    frm.sCustGbn     = "2";
                    frm.ShowDialog();
                    if (frm.sCode != "")
                    {
                        txt_cust_cd.Text = frm.sCode.Trim();
                        txt_cust_nm.Text = frm.sName.Trim();

                        sb.AppendLine("  and C.CUST_CD = '" + txt_cust_cd.Text + "'  ");
                    }
                    frm.Dispose();
                    frm = null;
                }


                SalesGrid(inputGrid, sb.ToString());
            }
        }
Beispiel #2
0
        private void txt_srch_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Popup.pop거래처검색 msg = new Popup.pop거래처검색();
                msg.sCustGbn     = "2";
                msg.txtSrch.Text = txt_srch.Text.ToString();

                msg.ShowDialog();

                if (msg.sCode != null && !msg.sCode.Equals(""))
                {
                    txt_srch.Text  = msg.sName;
                    txt_srch2.Text = msg.sCode;

                    input_cust_list();
                    inputRmGrid.Rows.Clear();

                    in_grid_logic();
                    in_grade_logic();
                    calBalance_logic();
                    wnGConstant wng = new wnGConstant();
                    wng.mergeCells(inputRmGrid, 3);
                }
            }
        }
Beispiel #3
0
        private void btnCustSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색("납품처");

            frm.sCustGbn = "1";
            frm.sCustNm  = txt_cust_nm.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt_cust_cd.Text = frm.sCode.Trim();
                txt_cust_nm.Text = frm.sName.Trim();
                txt_vat_cd.Text  = frm.sVatCd.Trim();
                old_cust_nm      = frm.sCode.Trim();
                item_out_detail("");
            }
            else
            {
                txt_cust_cd.Text = old_cust_nm;
            }

            frm.Dispose();
            frm = null;
            cmb_stor.Focus();
        }
        private void btnCustSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "1";
            frm.sCustNm  = txt_cust_nm.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt_cust_cd.Text = frm.sCode.Trim();
                txt_cust_nm.Text = frm.sName.Trim();
                old_cust_nm      = frm.sCode.Trim();

                StringBuilder sb = new StringBuilder();
                sb.AppendLine(" and D.CUST_CD = '" + txt_cust_cd.Text.ToString() + "' ");

                item_out_detail(sb.ToString());
            }
            else
            {
                txt_cust_cd.Text = old_cust_nm;
            }

            frm.Dispose();
            frm = null;
        }
Beispiel #5
0
        private void btn_cust_search_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "2";
            frm.sCustNm  = txt_cust_nm.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt_cust_cd.Text = frm.sCode.Trim();
                txt_cust_nm.Text = frm.sName.Trim();
                txt_balance.Text = decimal.Parse(frm.sBalance.Trim().Replace(",", "")).ToString("#,0.######");
            }


            frm.Dispose();
            frm = null;

            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();
                // dt = sc.selectSalesList(txt_cust_cd.Text.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show("시스템 오류" + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Beispiel #6
0
 /// <summary>
 /// 거래처 검색하는 메소드
 /// </summary>
 /// <param name="sender">텍스트박스 안에 콤보박스처럼 생긴 </param>
 /// <param name="e">클릭시 </param>
 private void btnCustSrch_Click(object sender, EventArgs e)
 {
     Popup.pop거래처검색 거래처검색 = new Popup.pop거래처검색();
     거래처검색.ShowDialog();
     str거래처코드         = 거래처검색.sCode;
     txt_cust_nm.Text = 거래처검색.sName;
 }
Beispiel #7
0
        private void rs_order_grid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1)
            {
                DataGridView     grd  = (DataGridView)sender;
                DataGridViewCell cell = grd[e.ColumnIndex, e.RowIndex];
                var senderGrid        = (DataGridView)sender;
                if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                    e.RowIndex >= 0 && senderGrid.Columns[e.ColumnIndex].Name.Equals("검색"))
                {
                    Popup.pop거래처검색 frm = new Popup.pop거래처검색();

                    frm.sCustGbn = "2"; //구매처
                    frm.ShowDialog();

                    if (frm.sCode != "")
                    {
                        rs_order_grid.Rows[e.RowIndex].Cells["PUR_CUST_CD"].Value = frm.sCode.Trim();
                        rs_order_grid.Rows[e.RowIndex].Cells["PUR_CUST_NM"].Value = frm.sName.Trim();
                        SendKeys.Send("{Tab}");
                    }
                    frm.Dispose();
                    frm = null;
                }
            }
        }
Beispiel #8
0
        private void txt_cust_nm_Leave(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Popup.pop거래처검색 frm = new Popup.pop거래처검색();

                frm.sCustGbn = "1"; //매출처
                frm.sCustNm  = txt_cust_nm.Text.ToString();
                frm.ShowDialog();

                if (frm.sCode != "")
                {
                    txt_cust_cd.Text = frm.sCode.Trim();
                    txt_cust_nm.Text = frm.sName.Trim();
                    //txt_tax_cd.Text = frm.sTaxCd.Trim();
                    old_cust_nm = frm.sCode.Trim();
                }
                else
                {
                    txt_cust_cd.Text = old_cust_nm;
                }


                frm.Dispose();
                frm = null;
            }
        }
Beispiel #9
0
 private void txttype_DropDown(object sender, EventArgs e)
 {
     Popup.pop거래처검색 frm = new Popup.pop거래처검색("구매처");
     frm.sCustGbn = "2";
     frm.sCustNm  = txtcustSrch.Text.ToString();
     frm.ShowDialog();
     custCD           = frm.sCode.Trim();
     txtcustSrch.Text = frm.sName.Trim();
 }
        private void btn_bill_cust_srch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 msg = new Popup.pop거래처검색();
            msg.sCustGbn = "1";
            //msg.sCustNm = txt_srch.Text.ToString();

            msg.ShowDialog();

            if (msg.sCode != null && !msg.sCode.Equals(""))
            {
                txtSrch.Text  = msg.sName;
                txtSrch2.Text = msg.sCode;
            }
        }
Beispiel #11
0
        private void btnCust_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "2";
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                // cmb_cust.SelectedValue = frm.sCode.Trim();
            }

            frm.Dispose();
            frm = null;
        }
Beispiel #12
0
        private void btn_cust_srch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 msg = new Popup.pop거래처검색();
            msg.sCustGbn = "2";
            //msg.sCustNm = txt_srch.Text.ToString();

            msg.ShowDialog();

            if (msg.sCode != null && !msg.sCode.Equals(""))
            {
                txt_srch.Text  = msg.sName;
                txt_srch2.Text = msg.sCode;

                input_cust_list();
                inputRmGrid.Rows.Clear();
            }
        }
Beispiel #13
0
        private void txt_srch_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Popup.pop거래처검색 msg = new Popup.pop거래처검색();
                msg.sCustGbn = "1";
                msg.sCustNm  = txt_srch.Text.ToString();

                msg.ShowDialog();

                if (msg.sCode != null && !msg.sCode.Equals(""))
                {
                    txt_srch.Text  = msg.sName;
                    txt_srch2.Text = msg.sCode;
                }
            }
        }
Beispiel #14
0
        private void txtcustSrch_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Popup.pop거래처검색 frm = new Popup.pop거래처검색("구매처");
                frm.sCustGbn = "2";
                frm.sCustNm  = txtcustSrch.Text.ToString();
                frm.ShowDialog();
                custCD           = frm.sCode.Trim();
                txtcustSrch.Text = frm.sName.Trim();
            }

            else
            {
                return;
            }
        }
Beispiel #15
0
        private void serch()
        {
            switch (cboType.SelectedIndex)
            {
            case 1:
                Popup.pop_sf_제품검색 frm = new Popup.pop_sf_제품검색();
                frm.txtSrch.Text = txtType.Text.ToString();
                frm.ShowDialog();
                if (frm.sCode != "")
                {
                    txtcode.Text = frm.sCode.Trim();
                    txtType.Text = frm.sName.Trim();
                    old_item_nm  = frm.sCode.Trim();
                }
                else
                {
                    txtcode.Text = old_item_nm;
                }
                break;

            case 2:
                Popup.pop거래처검색 frm2 = new Popup.pop거래처검색("납품처");

                frm2.sCustGbn = "1";
                frm2.sCustNm  = txtType.Text.ToString();
                frm2.ShowDialog();

                if (frm2.sCode != "")
                {
                    txtcode.Text = frm2.sCode.Trim();
                    txtType.Text = frm2.sName.Trim();
                    old_item_nm  = frm2.sCode.Trim();
                }
                else
                {
                    txtcode.Text = old_item_nm;
                }
                break;

            default:
                break;
            }
        }
Beispiel #16
0
        private void btnSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "1";
            frm.ShowDialog();
            MessageBox.Show(frm.sCode);
            if (frm.sCode != "")
            {
                cmbCust.SelectedValue = frm.sCode.Trim();
            }
            if (frm.sName != "")
            {
                cmbItem.SelectedValue = frm.sName.Trim();
            }

            frm.Dispose();
            frm = null;
        }
        private void btnSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "1";
            frm.sCustNm  = txtcustSrch.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txtcustSrch.Text = frm.sName.Trim();
            }
            else
            {
                //txt_cust_cd.Text = old_cust_nm;
            }

            frm.Dispose();
            frm = null;
        }
Beispiel #18
0
        private void btnCustSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "1"; //매출처
            frm.sCustNm  = txt_cust_nm.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt_cust_cd.Text = frm.sCode.Trim();
                txt_cust_nm.Text = frm.sName.Trim();
                if (itemJumunGrid.Rows.Count == 0)
                {
                    itemJumunGridAdd();
                }
            }
            frm.Dispose();
            frm = null;
        }
Beispiel #19
0
        private void btn_Cust_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "2";
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                cmb_cust.SelectedValue = frm.sCode.Trim();
            }
            else
            {
                // txt_cust_cd.Text = old_cust_nm;
            }

            frm.Dispose();
            frm = null;

            cmb_used.Focus();
        }
        private void btnCustSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "2";
            frm.sCustNm  = txt_cust_nm.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt_cust_cd.Text = frm.sCode.Trim();
                txt_cust_nm.Text = frm.sName.Trim();
                //old_cust_nm = frm.sCode.Trim();
                //ni_detail();
                //in_grid_detail();
            }


            frm.Dispose();
            frm = null;
        }
Beispiel #21
0
        private void btn거래처검색(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색("구매처");

            frm.sCustGbn = "2";
            frm.sCustNm  = txt구매처.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt거래처코드.Text = frm.sCode.Trim();
                txt구매처.Text   = frm.sName.Trim();
                old_cust_nm   = frm.sCode.Trim();
            }
            else
            {
                txt_cust_cd.Text = old_cust_nm;
            }

            frm.Dispose();
            frm = null;
        }
Beispiel #22
0
        private void CustSrchRsLogic(DataGridView grd, DataGridViewCellEventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();

            frm.sCustGbn = "2";
            frm.sCustNm  = cust_nm;
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                // txt_cust_cd.Text = frm.sCode.Trim();
                grd.SelectedRows[0].Cells["CUST_CD"].Value   = frm.sCode.Trim();
                grd.SelectedRows[0].Cells["CUST_NAME"].Value = frm.sName.Trim();
            }
            else
            {
                // txt_cust_cd.Text = old_cust_nm;
            }

            frm.Dispose();
            frm = null;
        }
Beispiel #23
0
        private void btnCustSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색();


            frm.sCustGbn = "1"; //매출처
            frm.sCustNm  = txt_cust_nm.Text.ToString();
            frm.ShowDialog();

            //if (frm.sCode != "")
            //{
            //    txt_cust_cd.Text = frm.sCode.Trim();
            //    txt_cust_nm.Text = frm.sName.Trim();
            //    old_cust_nm = frm.sCode.Trim();
            //}
            //else
            //{
            //    txt_cust_cd.Text = old_cust_nm;
            //}

            frm.Dispose();
            frm = null;
        }
Beispiel #24
0
        private void btnCustSrch_Click(object sender, EventArgs e)
        {
            Popup.pop거래처검색 frm = new Popup.pop거래처검색("납품처");

            frm.sCustGbn = "1";
            frm.sCustNm  = txt_Cust.Text.ToString();
            frm.ShowDialog();

            if (frm.sCode != "")
            {
                txt_Cust.Tag  = frm.sCode.Trim();
                txt_Cust.Text = frm.sName.Trim();

                old_cust_nm = frm.sCode.Trim();
            }
            else
            {
                txt_Item.Tag = old_cust_nm;
            }

            frm.Dispose();
            frm = null;
        }
Beispiel #25
0
        private void txt_cust_nm_Leave(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Popup.pop거래처검색 frm = new Popup.pop거래처검색();

                frm.sCustGbn = "1"; //매출처
                frm.sCustNm  = txt_cust_nm.Text.ToString();
                frm.ShowDialog();

                if (frm.sCode != "")
                {
                    txt_cust_cd.Text = frm.sCode.Trim();
                    txt_cust_nm.Text = frm.sName.Trim();
                    if (itemJumunGrid.Rows.Count == 0)
                    {
                        itemJumunGridAdd();
                    }
                }
                frm.Dispose();
                frm = null;
            }
        }
        private void txt_cust_nm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Popup.pop거래처검색 frm = new Popup.pop거래처검색();

                frm.sCustGbn = "2";
                frm.sCustNm  = txt_cust_nm.Text.ToString();
                frm.ShowDialog();

                if (frm.sCode != "")
                {
                    txt_cust_cd.Text = frm.sCode.Trim();
                    txt_cust_nm.Text = frm.sName.Trim();
                    //old_cust_nm = frm.sCode.Trim();
                    //ni_detail();
                    //in_grid_detail();
                }


                frm.Dispose();
                frm = null;
            }
        }
Beispiel #27
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            order_date_2 = dtp입고요청일.Value.ToString("yyyy-MM-dd");

            if (right[0])
            {
                try
                {
                    if (rs_order_grid.Rows.Count > 0)
                    {
                        int chk = 0;
                        //체크박스 재 정의
                        for (int i = 0; i < rs_order_grid.Rows.Count; i++)
                        {
                            if ((bool)rs_order_grid.Rows[i].Cells[0].Value == true)
                            {
                                chk++;
                            }
                        }



                        //if (chk < rs_order_grid.Rows.Count)
                        //{
                        //    //재 정의
                        //    for (int i = 0; i < rs_order_grid.Rows.Count; i++)
                        //    {
                        //        if ((bool)rs_order_grid.Rows[i].Cells[0].Value == true)
                        //        {
                        //            if (i == 0)
                        //            {
                        //                cust_max_num = int.Parse(rs_order_grid.Rows[i].Cells["CUST_NUM"].Value.ToString());
                        //            }
                        //            else
                        //            {
                        //                if (cust_max_num < int.Parse(rs_order_grid.Rows[i].Cells["CUST_NUM"].Value.ToString()))
                        //                {
                        //                    cust_max_num = int.Parse(rs_order_grid.Rows[i].Cells["CUST_NUM"].Value.ToString());
                        //                }
                        //            }
                        //        }
                        //    }
                        //}
                        int           cnt  = 0;
                        StringBuilder w_sb = new StringBuilder();



                        if (chk == 0)
                        {
                            MessageBox.Show("최소 하나의 발주여부를 선택해야 합니다.");
                            return;
                        }

                        if (cnt > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            sb.AppendLine("발주량이 0인 부분은 저장이 불가능합니다.");
                            sb.AppendLine(w_sb.ToString());

                            MessageBox.Show(sb.ToString());
                            return;
                        }


                        for (int i = 0; i < rs_order_grid.Rows.Count; i++)
                        {
                            if (rs_order_grid.Rows[i].Cells["col_chk"].Value != null && (bool)rs_order_grid.Rows[i].Cells["col_chk"].Value == true)
                            {
                                if (rs_order_grid.Rows[i].Cells["PUR_CUST_CD"].Value == null || rs_order_grid.Rows[i].Cells["PUR_CUST_CD"].Value.ToString().Equals(""))
                                {
                                    DialogResult msgOk = MessageBox.Show(" 일부 구매처가 선택되지 않았습니다.\n 누락된 구매처를 일괄 입력하시겠습니까? ", "발주처 일괄등록 여부", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                                    if (msgOk == System.Windows.Forms.DialogResult.OK || msgOk == System.Windows.Forms.DialogResult.Yes)
                                    {
                                        Popup.pop거래처검색 msg = new Popup.pop거래처검색("발주처를 선택하여주십시오");
                                        msg.sCustGbn = "2";
                                        msg.ShowDialog();

                                        if (msg.sCode == null || msg.sCode.Equals(""))
                                        {
                                            MessageBox.Show("일부 자재의 발주처가 설정되지 않았습니다.");
                                            return;
                                        }
                                        else
                                        {
                                            SetCustCd(msg.sCode, msg.sName);
                                            continue;
                                        }
                                    }
                                    else
                                    {
                                        MessageBox.Show("일부 자재의 발주처가 설정되지 않았습니다.");
                                        return;
                                    }
                                }
                                else if (rs_order_grid.Rows[i].Cells["PUR_CUST_NM"].Value == null || rs_order_grid.Rows[i].Cells["PUR_CUST_NM"].Value.ToString().Equals(""))
                                {
                                    MessageBox.Show("1개 이상의 항목이 구매처가 설정되지 않았습니다.");
                                    return;
                                }
                                else if (rs_order_grid.Rows[i].Cells["RS_AMT"].Value == null || rs_order_grid.Rows[i].Cells["RS_AMT"].Value.ToString().Equals("0"))
                                {
                                    MessageBox.Show("발주량이 0인 부분은 저장이 불가능합니다.");
                                    return;
                                }
                                try
                                {
                                    if (decimal.Parse(rs_order_grid.Rows[i].Cells["RS_AMT"].Value.ToString()) < 0)
                                    {
                                        MessageBox.Show("음수 발주는 불가능합니다.");
                                        return;
                                    }
                                }
                                catch (Exception ex2)
                                {
                                    MessageBox.Show("발주수량 입력 양식이 잘못되었습니다.");
                                    return;
                                }
                            }
                        }


                        if (cust_max_num > 1)
                        {
                            StringBuilder sb = new StringBuilder();

                            sb.AppendLine(chk + "개의 원자재를 선택하셨습니다.");
                            sb.AppendLine("원자재는 각 거래처별로 발주됩니다.");
                            sb.AppendLine("입고요청일은 [" + order_date_2 + "]로 반영됩니다. ");

                            //sb.AppendLine(cust_max_num + "개의 거래처가 있어 발주서가 나눠서 저장됩니다.");
                            sb.AppendLine(" 저장하시겠습니까?");
                            DialogResult msgOk = MessageBox.Show(sb.ToString(), "[발주확인]", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                            if (msgOk == DialogResult.No)
                            {
                                return;
                            }
                        }

                        wnDm wDm   = new wnDm();
                        int  rsNum = wDm.insertSoyo(
                            rs_order_grid
                            , chk_planGrid

                            , order_date_2);

                        if (rsNum == 0)
                        {
                            plan_list(planGrid, "where PN.PLAN_DATE >= '" + start_date.Text.ToString() + "' and  PN.PLAN_DATE <= '" + end_date.Text.ToString() + "' ");
                            chk_planGrid.Rows.Clear();
                            rs_order_grid.Rows.Clear();
                            itemPlanGrid.Rows.Clear();
                            MessageBox.Show("성공적으로 등록하였습니다.");
                        }
                        else if (rsNum == 1)
                        {
                            MessageBox.Show("저장에 실패하였습니다");
                        }
                        else if (rsNum == 2)
                        {
                            MessageBox.Show("SQL COMMAND 에러");
                        }
                        else
                        {
                            MessageBox.Show("Exception 에러1");
                        }
                    }
                    else
                    {
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("시스템 오류: " + ex.ToString());
                    Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                    msg.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("권한이없습니다.");
            }
        }
Beispiel #28
0
        private void btn_work_inst_srch_Click(object sender, EventArgs e)
        {
            try
            {
                if (rBtn_s_lot.Checked)
                {
                    SrchValue = ComInfo.TextBoxMessage("납품LOT번호", "입력");
                    if (!SrchValue.Equals(""))
                    {
                        string valueTemp = SrchValue;
                        txt_srch_value.Text = SrchValue;
                        txt_rBtn_value.Text = rBtn_s_lot.Text;

                        if (valueTemp.Length == 9) //200103001
                        {
                            string date = "";
                            string cd   = "";
                            try
                            {
                                decimal.Parse(valueTemp); // 양식 체크용
                                date = "20" + valueTemp.Substring(0, 2) + "-" + valueTemp.Substring(2, 2) + "-" + valueTemp.Substring(4, 2);
                                cd   = int.Parse(valueTemp.Substring(6, 3)).ToString();
                                ResetSetting();
                                SrchValue = "and S.SALES_DATE = '" + date + "'   AND S.SALES_CD = '" + cd + "'   ";
                                Srch_List();
                            }
                            catch (Exception ex)
                            {
                                MessageBox.Show("입력 양식이 올바르지 않습니다 ( 9자리 )");
                                return;
                            }
                        }
                        else
                        {
                            MessageBox.Show("입력 양식이 올바르지 않습니다 ( 9자리 )");
                        }
                    }
                }
                else if (rBtn_lot.Checked)
                {
                    SrchValue = ComInfo.TextBoxMessage("공정LOT번호", "입력");
                    if (!SrchValue.Equals(""))
                    {
                        txt_srch_value.Text = SrchValue;
                        txt_rBtn_value.Text = rBtn_lot.Text;
                        ResetSetting();
                        SrchValue = "and II.LOT_NO = '" + SrchValue + "' ";
                        Srch_List();
                    }
                }
                else if (rBtn_a_union.Checked)
                {
                    SrchValue = ComInfo.TextBoxMessage("묶음코드(제품)", "입력");
                    if (!SrchValue.Equals(""))
                    {
                        txt_srch_value.Text = SrchValue;
                        txt_rBtn_value.Text = rBtn_a_union.Text;
                        ResetSetting();
                        SrchValue = "and A_UNION_CD = '" + SrchValue + "' ";
                        Srch_List();
                    }
                }
                else if (rBtn_srch_item.Checked)
                {
                    Popup.pop_sf_제품검색 msg = new Popup.pop_sf_제품검색();
                    msg.ShowDialog();

                    if (msg.sCode != null && !msg.sCode.Equals(""))
                    {
                        SrchValue           = msg.sCode;
                        txt_srch_value.Text = msg.sLabelNM;
                        txt_rBtn_value.Text = rBtn_srch_item.Text;
                        ResetSetting();
                        SrchValue = "and ID.ITEM_CD  = '" + SrchValue + "' and S.SALES_DATE >= '" + txt_start_date.Text + "'  and S.SALES_DATE <= '" + txt_end_date.Text + "'   ";
                        Srch_List();
                    }
                }
                else if (rBtn_srch_cust.Checked)
                {
                    Popup.pop거래처검색 msg = new Popup.pop거래처검색();
                    msg.sCustGbn = "1";
                    msg.ShowDialog();

                    if (msg.sCode != null && !msg.sCode.Equals(""))
                    {
                        SrchValue           = msg.sCode;
                        txt_srch_value.Text = msg.sName;
                        txt_rBtn_value.Text = rBtn_srch_cust.Text;
                        ResetSetting();
                        SrchValue = "and CN.CUST_CD = '" + SrchValue + "' and S.SALES_DATE >= '" + txt_start_date.Text + "'  and S.SALES_DATE <= '" + txt_end_date.Text + "'   ";
                        Srch_List();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중 오류가 발생했습니다");
                Console.WriteLine(ex);
                return;
            }
        }