Example #1
0
        private void grd_soo_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            //reSetting();

            try
            {
                txt_balance.Text = decimal.Parse(grd_soo.Rows[e.RowIndex].Cells["BALANCE"].Value.ToString()).ToString("#,0.######");
                txt_cust_cd.Text = grd_soo.Rows[e.RowIndex].Cells["CUST_CD_SOO"].Value.ToString();
                wnDm wDm = new wnDm();
                collectGrid_Cust_Select(grd_soo.Rows[e.RowIndex].Cells["CUST_CD_SOO"].Value.ToString());

                for (int i = 0; i < collectGrid.Rows.Count; i++)
                {
                    if (collectGrid.Rows[i].Cells["COLLECT_DATE"].Value.ToString().Equals(grd_soo.Rows[e.RowIndex].Cells["SOO_DATE"].Value.ToString()) &&
                        collectGrid.Rows[i].Cells["COLLECT_CD"].Value.ToString().Equals(grd_soo.Rows[e.RowIndex].Cells["SOO_CD"].Value.ToString()))
                    {
                        collectGrid_SelectRow(i);
                        collectGrid.Rows[i].Selected = true;
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("시스템 오류" + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                wnDm wDm   = new wnDm();
                int  rsNum = wDm.Delete_Excel_Input(txt_publish_date.Text.ToString(), txt_publish_cd.Text.ToString(), BillGrid);

                if (rsNum == 0)
                {
                    resetSetting();
                }
                else if (rsNum == 1)
                {
                    MessageBox.Show("삭제에 실패하였습니다");
                }
                else
                {
                    MessageBox.Show("sql 에러");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception 오류");
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #3
0
        private void grdSooLoad()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();
                dt = wDm.selectGiveList(txt_cust_cd.Text.ToString());

                if (dt != null && dt.Rows.Count > 0)
                {
                    grd_soo.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        grd_soo.Rows[i].Cells["SOO_DATE"].Value        = dt.Rows[i]["GIVE_DATE"].ToString();
                        grd_soo.Rows[i].Cells["SOO_CD"].Value          = dt.Rows[i]["GIVE_CD"].ToString();
                        grd_soo.Rows[i].Cells["CUST_NM_SOO"].Value     = dt.Rows[i]["CUST_NM"].ToString();
                        grd_soo.Rows[i].Cells["CUST_CD_SOO"].Value     = dt.Rows[i]["CUST_CD"].ToString();
                        grd_soo.Rows[i].Cells["TOTAL_MONEY_SOO"].Value = (decimal.Parse(dt.Rows[i]["TOTAL_MONEY"].ToString())).ToString("#,0.######");
                        grd_soo.Rows[i].Cells["SOO_GUBUN"].Value       = dt.Rows[i]["GIVE_GUBUN"].ToString();
                        grd_soo.Rows[i].Cells["BALANCE"].Value         = dt.Rows[i]["BALANCE"].ToString();
                    }
                }
                else
                {
                    grd_soo.Rows.Clear();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("시스템 오류" + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #4
0
        private void btnSrch_Click(object sender, EventArgs e)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.fn_Item_Input_List("and Z.INPUT_DATE >= '" + start_date.Text.ToString() + "' and  Z.INPUT_DATE <= '" + end_date.Text.ToString() + "' AND C.ITEM_NM LIKE '%" + txt_Itemcd.Text.ToString() + "%' ");

                this.itemOutGrid.RowCount = dt.Rows.Count;
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        itemOutGrid.Rows[i].Cells["INPUT_DATE"].Value = dt.Rows[i]["PACK_DATE"].ToString();
                        // itemOutGrid.Rows[i].Cells["OUTPUT_CD"].Value = dt.Rows[i]["OUTPUT_CD"].ToString();
                        //itemOutGrid.Rows[i].Cells["SEQ"].Value = dt.Rows[i]["SEQ"].ToString();
                        itemOutGrid.Rows[i].Cells["LOT_NO"].Value    = dt.Rows[i]["LOT_NO"].ToString();
                        itemOutGrid.Rows[i].Cells["LOT_SUB"].Value   = dt.Rows[i]["LOT_SUB"].ToString();
                        itemOutGrid.Rows[i].Cells["CUST_NM"].Value   = dt.Rows[i]["CUST_NM"].ToString();
                        itemOutGrid.Rows[i].Cells["ITEM_CD"].Value   = dt.Rows[i]["ITEM_CD"].ToString();
                        itemOutGrid.Rows[i].Cells["ITEM_NM"].Value   = dt.Rows[i]["ITEM_NM"].ToString();
                        itemOutGrid.Rows[i].Cells["SPEC"].Value      = dt.Rows[i]["SPEC"].ToString();
                        itemOutGrid.Rows[i].Cells["INPUT_AMT"].Value = (decimal.Parse(dt.Rows[i]["F_SUB_AMT"].ToString())).ToString("#,0.######");
                    }
                }
                else
                {
                    itemOutGrid.Rows.Clear();
                }
            }
            catch (Exception ex)
            {
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString()); msg.ShowDialog();
            }
        }
Example #5
0
        private void input_list()
        {
            try
            {
                wnDm      wDm       = new wnDm();
                string    thisYear  = year.Text.ToString().Substring(0, 4);
                string    condition = "and PUBLISH_DATE >= '" + thisYear + "-01-01' and PUBLISH_DATE <= '" + thisYear + "-12-32'  ";
                DataTable dt        = wDm.fn_Select_Excel_List(condition);

                ExcelGrid.Rows.Clear();
                if (dt != null && dt.Rows.Count > 0)
                {
                    ExcelGrid.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        ExcelGrid.Rows[i].Cells["생성일자"].Value   = dt.Rows[i]["PUBLISH_DATE"].ToString();
                        ExcelGrid.Rows[i].Cells["번호2"].Value    = dt.Rows[i]["PUBLISH_CD"].ToString();
                        ExcelGrid.Rows[i].Cells["엑셀제목"].Value   = dt.Rows[i]["TITLE"].ToString();
                        ExcelGrid.Rows[i].Cells["VAT_CD"].Value = dt.Rows[i]["VAT_CD"].ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception 에러");
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
                return;
            }
        }
        //데이터값 넣어주는 메소드

        private void get_data()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = wDm.fn_Select_Inter_Count_Monitor();

                if (dt != null && dt.Rows.Count > 0)
                {
                    dataSensorGrid.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dataSensorGrid.Rows[i].Height = 120;
                        dataSensorGrid.Rows[i].DefaultCellStyle.Alignment          = DataGridViewContentAlignment.MiddleCenter;
                        dataSensorGrid.Rows[i].Cells["GUBUN"].Value                = dt.Rows[i]["M_NAME"].ToString();
                        dataSensorGrid.Rows[i].Cells["COUNT"].Value                = dt.Rows[i]["COUNT"].ToString();
                        dataSensorGrid.Rows[i].Cells["START_TIME"].Value           = dt.Rows[i]["START_TIME"].ToString();
                        dataSensorGrid.Rows[i].Cells["END_TIME"].Value             = dt.Rows[i]["END_TIME"].ToString();
                        dataSensorGrid.Rows[i].DefaultCellStyle.BackColor          = Color.FromArgb(24, 48, 76);
                        dataSensorGrid.Rows[i].DefaultCellStyle.SelectionBackColor = Color.FromArgb(24, 48, 76);
                        DataGridViewCellStyle style = new DataGridViewCellStyle();
                        style.ForeColor          = Color.IndianRed;
                        style.SelectionForeColor = Color.FromArgb(253, 91, 83);
                        dataSensorGrid.Rows[i].Cells[1].Style = style;
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("시스템 오류: " + e.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString());
                msg.ShowDialog();
            }
        }
Example #7
0
        private void input_item_list()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = wDm.fn_Item_Stock_List(" AND A.ITEM_CD = '" + txt_srch2.Text.ToString() + "'  ");
                adoPrt2 = dt.Copy();

                if (dt != null && dt.Rows.Count > 0)
                {
                    txt_item_cd.Text = dt.Rows[0]["ITEM_CD"].ToString();
                    txt_item_nm.Text = dt.Rows[0]["ITEM_NM"].ToString();
                    txt_Unit.Text    = dt.Rows[0]["UNIT_NM"].ToString();
                    txt_Spec.Text    = dt.Rows[0]["SPEC"].ToString();
                    if (dt.Rows[0]["ITEM_GUBUN"].ToString().Equals("1"))
                    {
                        txt_Gubun.Text = "완제품";
                    }
                    else
                    {
                        txt_Gubun.Text = "반제품";
                    }

                    txt_balstock.Text = decimal.Parse(dt.Rows[0]["BAL_STOCK"].ToString()).ToString("#,0.######");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                MessageBox.Show("제품 검색 중 오류가 발생했습니다.");
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
                return;
            }
        }
Example #8
0
        public void bindData()
        {
            try
            {
                wnDm wDm = new wnDm();


                int result = wDm.fn_Insert_Item_To_Jang(InputTabGrid);

                if (result == 0)
                {
                    MessageBox.Show("입고 확정 성공");
                    resetsetting();
                }
                else
                {
                    MessageBox.Show("입고 확정 실패");
                }



                //데이타 끝나고 다시 copy를 써준 이유는 for중에 no에 값을 엏었기 때문에 출력물 데이타테이블(dt)를 다시 복사함
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중에 오류가 발생했습니다.");
                wnLog.writeLog(wnLog.LOG_ERROR, ex.Message + " - " + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #9
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();
            }
        }
Example #10
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable dt = setDataTable(grd_plan_list);
         jpDTO.Plandt = dt;
         jpDTO        = ifjp.save(jpDTO, sbTemp);
         if (jpDTO.Succer == 0)
         {
             MessageBox.Show("성공적으로 등록하였습니다.");
             jumunBinding();
             planBinding();
         }
         else
         {
             MessageBox.Show("저장에 실패하였습니다.");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
         msg.ShowDialog();
     }
 }
Example #11
0
        private void output_list(DataGridView dgv, string condition)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.납품추적_List(condition);

                if (dt != null && dt.Rows.Count > 0)
                {
                    dgv.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv.Rows[i].Cells["제품"].Value     = dt.Rows[i]["ITEM_NM"].ToString();
                        dgv.Rows[i].Cells["LOTNO"].Value  = dt.Rows[i]["LOT_NO"].ToString();
                        dgv.Rows[i].Cells["납품처"].Value    = dt.Rows[i]["CUST_NM"].ToString();
                        dgv.Rows[i].Cells["LOTSUB"].Value = dt.Rows[i]["LOT_SUB"].ToString();
                    }
                }
                else
                {
                    dgv.Rows.Clear();
                }
            }
            catch (Exception e)
            {
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString()); msg.ShowDialog();
            }
        }
Example #12
0
        private void delete_Haccp_Doc(string path, string staff_cd)
        {
            wnDm wDm = new wnDm();

            if (System.IO.File.Exists(@path))
            {
                try
                {
                    System.IO.File.Delete(@path);
                }
                catch (System.IO.IOException e)
                {
                    Console.WriteLine(e.Message);
                    Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString());
                    msg.ShowDialog();
                    return;
                }
            }
            int rst = wDm.Delete_Haccp_Doc(path, staff_cd);

            if (rst == 0)
            {
                MessageBox.Show("성공적으로 삭제했습니다");
                fn_insert_list("where STAFF_CD = '" + txt_staff_cd.Text + "'  and INPUT_DATE >= '" + txt_lower_date.Text + "' and INPUT_DATE <= '" + txt_upper_date.Text + "' "
                               + ((txt_docs_srch.Text == null || txt_docs_srch.Text.ToString().Equals("")) ? "" : "and FNAME like '%" + txt_docs_srch.Text.ToString() + "%'  "));
            }
            else if (rst == 1)
            {
                MessageBox.Show("삭제에 실패했습니다.");
            }
            else if (rst == 9)
            {
                MessageBox.Show("sql오류 발생");
            }
        }
Example #13
0
        private void grid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                DataGridView     grd  = (DataGridView)sender;
                DataGridViewCell cell = grd[e.ColumnIndex, e.RowIndex];
                cell.Style.BackColor = Color.White;
                if (e.ColumnIndex > 11)
                {
                    decimal total_amt   = decimal.Parse(grd.Rows[e.RowIndex].Cells["RS_AMT"].Value.ToString().Replace(",", ""));
                    decimal price       = decimal.Parse(grd.Rows[e.RowIndex].Cells["PRICE"].Value.ToString().Replace(",", ""));
                    decimal total_money = decimal.Parse(grd.Rows[e.RowIndex].Cells["TOTAL_MONEY"].Value.ToString().Replace(",", ""));
                    int     cnt         = e.ColumnIndex;


                    if (11 < e.ColumnIndex && e.ColumnIndex > 14)
                    {
                        grd.Rows[e.RowIndex].Cells["TOTAL_MONEY"].Value = ifjp.totalMoney(total_amt, price);
                    }
                    else if (e.ColumnIndex == 14)
                    {
                        grd.Rows[e.RowIndex].Cells["PRICE"].Value = ifjp.price(total_amt, total_money);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #14
0
        private void input_list(DataGridView dgv, string condition)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.fn_Haccp_input_list(condition);

                if (dt != null && dt.Rows.Count > 0)
                {
                    dgv.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv.Rows[i].Cells[0].Value = (i + 1);
                        dgv.Rows[i].Cells[1].Value = dt.Rows[i]["INPUT_DATE"].ToString();
                        dgv.Rows[i].Cells[2].Value = dt.Rows[i]["INPUT_CD"].ToString();
                        dgv.Rows[i].Cells[3].Value = dt.Rows[i]["STAFF_CD"].ToString();
                        dgv.Rows[i].Cells[4].Value = dt.Rows[i]["STAFF_NM"].ToString();
                        dgv.Rows[i].Cells[5].Value = dt.Rows[i]["COMMENT"].ToString();
                    }
                }
                else
                {
                    dgv.Rows.Clear();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("시스템 오류" + e.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString());
                msg.ShowDialog();
            }
        }
Example #15
0
        private void get_user_nm()
        {
            try
            {
                wnDm wdm = new wnDm();

                txt_user_cd.Text = Common.p_strStaffNo;
                int rs = wdm.getStaffName(txt_user_cd.Text, txt_user_nm);

                if (rs == 1)
                {
                    MessageBox.Show("사용자 검색 에러가 발생했습니다");
                }
                else if (rs == 9)
                {
                    MessageBox.Show("SQL 에러가 발생했습니다");
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("시스템 에러가 발생했습니다");
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString());
                msg.ShowDialog();
            }
        }
Example #16
0
        private void input_cust_list()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = wDm.fn_Cust_List("where CUST_CD = '" + txt_srch2.Text.ToString() + "'  ");
                adoPrt2 = dt.Copy();

                if (dt != null && dt.Rows.Count > 0)
                {
                    txt_cust_nm.Text    = dt.Rows[0]["CUST_NM"].ToString();
                    txt_uptae.Text      = dt.Rows[0]["UPTAE"].ToString();
                    txt_jongmok.Text    = dt.Rows[0]["JONGMOK"].ToString();
                    txt_staff.Text      = dt.Rows[0]["CUST_MANAGER"].ToString();
                    txt_saup.Text       = dt.Rows[0]["SAUP_NO"].ToString();
                    txt_ceo.Text        = dt.Rows[0]["OWNER"].ToString();
                    txt_phone_num.Text  = dt.Rows[0]["CUST_COMP_PHONE"].ToString();
                    txt_fax.Text        = dt.Rows[0]["CUST_FAX"].ToString();
                    txt_begin_date.Text = dt.Rows[0]["CUST_OPEN"].ToString();
                    txt_address.Text    = dt.Rows[0]["ADDR"].ToString();
                    txt_tax.Text        = dt.Rows[0]["TAX_NM"].ToString();
                    txt_balance.Text    = decimal.Parse(dt.Rows[0]["BALANCE"].ToString()).ToString("#,0.######");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                MessageBox.Show("거래처 검색 중 오류가 발생했습니다.");
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
                return;
            }
        }
Example #17
0
        private void all_chk_logic(conDataGridView dgv, string condition, TextBox txt_item_cd)
        {
            try
            {
                if (txt_item_cd.Text.ToString().Equals("") || txt_item_cd.Text == null)
                {
                    MessageBox.Show("제품정보가 없습니다. ");
                    return;
                }

                if (dgv.Rows.Count > 0)
                {
                    MessageBox.Show("항목 데이터가 존재합니다. ");
                    return;
                }

                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();

                StringBuilder sb = new StringBuilder();
                sb.AppendLine("where 1=1 ");
                sb.AppendLine(condition); //"and A.CHK_GUBUN = '1'"

                dt = wDm.fn_Chk_List(sb.ToString());

                if (dt != null && dt.Rows.Count > 0)
                {
                    dgv.RowCount = dt.Rows.Count;

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv.Rows[i].Cells[1].Value  = (i + 1).ToString();
                        dgv.Rows[i].Cells[13].Value = dt.Rows[i]["CHK_CD"].ToString();
                        dgv.Rows[i].Cells[17].Value = dt.Rows[i]["CHK_ORD"].ToString();
                        dgv.Rows[i].Cells[2].Value  = dt.Rows[i]["CHK_NM"].ToString();
                        //dgv.Rows[i].Cells[4].Value = dt.Rows[i]["CHK_LOC"].ToString();
                        //dgv.Rows[i].Cells[5].Value = dt.Rows[i]["RULE_SIZE"].ToString();
                        //dgv.Rows[i].Cells[6].Value = dt.Rows[i]["RULE_LIMIT"].ToString();
                        //dgv.Rows[i].Cells[7].Value = dt.Rows[i]["MEASURE_APP"].ToString();
                        //dgv.Rows[i].Cells[8].Value = dt.Rows[i]["CHK_INTEVAL"].ToString();


                        dgv.Rows[i].Cells[9].Value  = "0";
                        dgv.Rows[i].Cells[10].Value = "0";
                        dgv.Rows[i].Cells[11].Value = "0";
                        dgv.Rows[i].Cells[12].Value = "0";
                    }
                }
                else
                {
                    MessageBox.Show("검사 기준 정보가없습니다.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("시스템 에러: " + ex.Message.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #18
0
        private void esti_list(DataGridView dgv, string condition)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.fn_Esti_List(condition);

                //lbl_cnt.Text = dt.Rows.Count.ToString();

                if (dt != null && dt.Rows.Count > 0)
                {
                    dgv.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv.Rows[i].Cells[0].Value         = dt.Rows[i]["ESTI_DATE"].ToString();
                        dgv.Rows[i].Cells[1].Value         = dt.Rows[i]["ESTI_CD"].ToString();
                        dgv.Rows[i].Cells[5].Value         = dt.Rows[i]["CUST_CD"].ToString();
                        dgv.Rows[i].Cells[2].Value         = dt.Rows[i]["CUST_NM"].ToString();
                        dgv.Rows[i].Cells[8].Value         = dt.Rows[i]["ITEM_CNT"].ToString();
                        dgv.Rows[i].Cells["COMMENT"].Value = dt.Rows[i]["COMMENT"].ToString();
                        dgv.Rows[i].Cells["TAX_CD"].Value  = dt.Rows[i]["TAX_CD"].ToString();
                    }
                }
                else
                {
                    estiGrid.Rows.Clear();
                }
            }
            catch (Exception e)
            {
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString()); msg.ShowDialog();
            }
        }
Example #19
0
        private void stor_list()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.fn_Stor_List();

                if (dt != null && dt.Rows.Count > 0)
                {
                    this.dataStorGrid.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dataStorGrid.Rows[i].Cells[0].Value = dt.Rows[i]["STORAGE_CD"].ToString();
                        dataStorGrid.Rows[i].Cells[1].Value = dt.Rows[i]["STORAGE_NM"].ToString();
                        dataStorGrid.Rows[i].Cells[2].Value = dt.Rows[i]["COMMENT"].ToString();
                    }
                }
                else
                {
                    dataStorGrid.Rows.Clear();
                }
            }
            catch (Exception e)
            {
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString());
                msg.ShowDialog();
            }
        }
Example #20
0
 private void notice()
 {
     try
     {
         wnDm wDm = new wnDm();
         dt = notice2(intime);
         //sb.AppendLine("where A.ORDER_DATE >= '" + start_date.Text.ToString() + "' and  A.ORDER_DATE <= '" + end_date.Text.ToString() + "' ");
         if (dt != null && dt.Rows.Count > 0)
         {
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 label1.Text       = dt.Rows[i]["TITLE"].ToString();
                 richTextBox1.Text = dt.Rows[i]["CONTENT"].ToString();
                 label2.Text       = dt.Rows[i]["STAFF_NM"].ToString();
                 label3.Text       = dt.Rows[i]["intime"].ToString();
                 //textBox1.Text = noticeGrid.Rows[e.RowIndex].Cells["SEQ"].Value.ToString();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("시스템 오류" + ex.ToString());
         Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
         msg.ShowDialog();
     }
 }
Example #21
0
        private void btn_insert_Click(object sender, EventArgs e)
        {
            if (excelGrid.Rows.Count > 0)
            {
                lblMsg.Visible = true;
                Application.DoEvents();
                try
                {
                    wnDm wDm   = new wnDm();
                    int  rsNum = wDm.fn_insert_cust_cd_from_Excel(excelGrid);

                    if (rsNum == 0)
                    {
                        MessageBox.Show("성공적으로 등록하였습니다!");
                        this.Close();
                    }
                    else if (rsNum == 1)
                    {
                        MessageBox.Show("저장에 실패하였습니다. 거래처코드가 중복되지 않았는지 확인하여주십시오");
                        return;
                    }
                    else
                    {
                        MessageBox.Show("Exception 에러 발생");
                    }
                }
                catch (Exception ex)
                {
                    Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                    msg.ShowDialog();
                }

                lblMsg.Visible = false;
            }
        }
Example #22
0
 private void SalesGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         try
         {
             string cust_cd = SalesGrid.Rows[e.RowIndex].Cells["코드"].Value.ToString();
             string vat_cd  = "";
             if (SalesGrid.Rows[e.RowIndex].Cells["구분"].Value.ToString().Equals("면세"))
             {
                 vat_cd = "2";
             }
             else
             {
                 vat_cd = "1";
             }
             string    condition = "WHERE SALES_DATE >= '" + start_date.Text + "' AND SALES_DATE <= '" + end_date.Text + "' AND A.CUST_CD = '" + cust_cd + "' AND A.VAT_CD = '" + vat_cd + "' ";
             wnDm      wDm       = new wnDm();
             DataTable dt        = wDm.fn_Select_Bill_Escalation_Detail(condition);
             SalesDetailGrid.Rows.Clear();
             if (dt != null && dt.Rows.Count > 0)
             {
                 SalesDetailGrid.RowCount = dt.Rows.Count;
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
                     SalesDetailGrid.Rows[i].Cells["매출일자"].Value = dt.Rows[i]["SALES_DATE"].ToString();
                     SalesDetailGrid.Rows[i].Cells["번호"].Value   = dt.Rows[i]["SALES_CD"].ToString();
                     SalesDetailGrid.Rows[i].Cells["상품코드"].Value = dt.Rows[i]["ITEM_CD"].ToString();
                     SalesDetailGrid.Rows[i].Cells["상품명"].Value  = dt.Rows[i]["PRODUCT_NM"].ToString();
                     SalesDetailGrid.Rows[i].Cells["규격"].Value   = dt.Rows[i]["SPEC"].ToString();
                     SalesDetailGrid.Rows[i].Cells["총수량"].Value  = decimal.Parse(dt.Rows[i]["TOTAL_AMT"].ToString()).ToString("#,0.######");
                     SalesDetailGrid.Rows[i].Cells["단위"].Value   = dt.Rows[i]["UNIT_NM"].ToString();
                     SalesDetailGrid.Rows[i].Cells["금액"].Value   = decimal.Parse(dt.Rows[i]["TOTAL_MONEY"].ToString()).ToString("#,0.######");
                     if (dt.Rows[i]["VAT_CD"].ToString().Equals("2"))
                     {
                         SalesDetailGrid.Rows[i].Cells["부가세구분"].Value = "면세";
                     }
                     else
                     {
                         if (!dt.Rows[i]["TAX_CD"].ToString().Equals("0"))
                         {
                             SalesDetailGrid.Rows[i].Cells["부가세구분"].Value = dt.Rows[i]["TAX_NM"].ToString();
                         }
                         else
                         {
                             SalesDetailGrid.Rows[i].Cells["부가세구분"].Value = "";
                         }
                     }
                 }
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show("Exceptiion 오류");
             Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
             msg.ShowDialog();
             return;
         }
     }
 }
Example #23
0
        public DataTable SqlCommandSelect_Jang(SqlCommand sCommand)
        {
            SqlConnection Conn = new SqlConnection(Common.p_sConn_jang);

            try
            {
                sCommand.Connection = Conn;
                Conn.Open();

                SqlDataAdapter dAdapter = new SqlDataAdapter();
                dAdapter.SelectCommand = sCommand;
                DataTable dTable = new DataTable();
                dAdapter.Fill(dTable);
                if (wnGConstant.debug)
                {
                    wnLog.writeLog(wnLog.LOG_QUERY, sCommand.CommandText);
                }
                wnLog.writeLog(wnLog.LOG_QUERY_RESULT, dTable);
                return(dTable);
            }
            catch (Exception ex) {
                wnLog.writeLog(wnLog.LOG_ERROR, ex.Message + " - " + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
                return(null);
            }
            finally
            {
                Conn.Close();
            }
        }
Example #24
0
        private void loadPage(string condition)
        {
            this.lblStatus.Text = "- / -";

            try
            {
                int intSkip = 0;
                intSkip = (intCurrentPage * intPageSize);

                //this.GridRecord.DataSource = dt;

                flow_list_rs(dt);

                GridRecord.Columns[0].DefaultCellStyle.ForeColor = Color.Blue;
                GridRecord.Columns[1].DefaultCellStyle.ForeColor = Color.Blue;

                GridRecord.Columns[0].Frozen = true;
                GridRecord.Columns[1].Frozen = true;

                GridRecord.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                GridRecord.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                GridRecord.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                GridRecord.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                GridRecord.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                this.dgv            = GridRecord;
                this.lblStatus.Text = (intCurrentPage + 1).ToString() + " / " + intPageCount.ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중에 오류가 발생했습니다.");
                wnLog.writeLog(wnLog.LOG_ERROR, ex.Message + " - " + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #25
0
 private void bindData_월계()
 {
     try
     {
         DateTime dateTime  = DateTime.Parse(this.dtpDate.Text);
         string   str       = dateTime.ToString("yyyy-MM-01");
         DateTime dateTime1 = DateTime.Parse(str);
         dateTime1 = dateTime1.AddMonths(1);
         string str1 = dateTime1.AddDays(-1).ToString("yyyy-MM-dd");
         wdm = new wnDm();
         DataTable dataTable = null;
         dataTable = wdm.fn_일월매출수금할인_List();
         if ((dataTable == null ? false : dataTable.Rows.Count > 0))
         {
             conLabel _conLabel = this.lbl매출;
             decimal  num       = decimal.Parse(dataTable.Rows[0]["매출계"].ToString());
             _conLabel.Text = num.ToString("#,0.######");
             conLabel _conLabel1 = this.lbl수금;
             num             = decimal.Parse(dataTable.Rows[0]["수금계"].ToString());
             _conLabel1.Text = num.ToString("#,0.######");
             conLabel str2 = this.lbl할인;
             num       = decimal.Parse(dataTable.Rows[0]["할인계"].ToString());
             str2.Text = num.ToString("#,0.######");
         }
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         wnLog.writeLog(100, string.Concat(exception.Message, " - ", exception.ToString()));
         Popup.pop오류리포트 msg = new Popup.pop오류리포트(exception1.Message + " - " + exception1.ToString());
         msg.ShowDialog();
     }
 }
Example #26
0
        private void loadPage(DataTable dt)
        {
            this.lblStatus.Text = "- / -";

            try
            {
                int intSkip = 0;
                intSkip = (intCurrentPage * intPageSize);

                if (dt.Rows.Count > 0)
                {
                    int GridRecord_IndexTemp = 0;
                    GridRecord.Rows.Clear();
                    bool isMatch = false;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        isMatch = false;
                        for (int j = 0; j < compareGrid.Rows.Count; j++)
                        {
                            if (compareGrid.Rows[j].Cells["SOO_DATE"].Value == null || compareGrid.Rows[j].Cells["SOO_DATE"].Value.ToString().Equals(""))
                            {
                                continue;
                            }
                            else if (dt.Rows[i]["SOO_DATE"].ToString().Equals(compareGrid.Rows[j].Cells["SOO_DATE"].Value.ToString()) &&
                                     dt.Rows[i]["SOO_CD"].ToString().Equals(compareGrid.Rows[j].Cells["SOO_CD"].Value.ToString()))
                            {
                                isMatch = true;
                                break;
                            }
                        }
                        if (isMatch)
                        {
                            continue;
                        }
                        GridRecord.Rows.Add();
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["CHECK"].Value = false;
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["수금일자"].Value  = dt.Rows[i]["SOO_DATE"].ToString();
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["번호"].Value    = dt.Rows[i]["SOO_CD"].ToString();
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["수금액"].Value   = decimal.Parse(dt.Rows[i]["SOO_MONEY"].ToString()).ToString("#,0.######");
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["할인액"].Value   = decimal.Parse(dt.Rows[i]["DC_MONEY"].ToString()).ToString("#,0.######");
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["합계금액"].Value  = decimal.Parse(dt.Rows[i]["TOTAL_MONEY"].ToString()).ToString("#,0.######");
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["구분"].Value    = dt.Rows[i]["SOO_GUBUN_NM"].ToString();
                        GridRecord.Rows[GridRecord_IndexTemp].Cells["비고"].Value    = dt.Rows[i]["COMMENT"].ToString();
                        GridRecord_IndexTemp++;
                    }
                }
                else
                {
                    GridRecord.Rows.Clear();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중에 오류가 발생했습니다.");
                wnLog.writeLog(wnLog.LOG_ERROR, ex.Message + " - " + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #27
0
        private void LoadDataGird()
        {
            try
            {
                DataTable dt = wDm.fn_select_processing_flow();
                if (dt != null && dt.Rows.Count > 0)
                {
                    processingGrid.Rows.Clear();
                    processingGrid.RowCount = dt.Rows.Count;

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        processingGrid.Rows[i].Cells["지시일자"].Value    = dt.Rows[i]["INST_DATE"].ToString();
                        processingGrid.Rows[i].Cells["납품요구일"].Value   = dt.Rows[i]["DELI_DATE"].ToString();
                        processingGrid.Rows[i].Cells["제품명"].Value     = dt.Rows[i]["ITEM_NM"].ToString();
                        processingGrid.Rows[i].Cells["LOTNO"].Value   = dt.Rows[i]["LOT_NO"].ToString();
                        processingGrid.Rows[i].Cells["공정수"].Value     = dt.Rows[i]["FLOW_COUNT"].ToString();
                        processingGrid.Rows[i].Cells["지시수량"].Value    = decimal.Parse(dt.Rows[i]["INST_AMT"].ToString()).ToString("#,0.######");
                        processingGrid.Rows[i].Cells["생산수량"].Value    = decimal.Parse(dt.Rows[i]["INPUT_AMT"].ToString()).ToString("#,0.######");
                        processingGrid.Rows[i].Cells["생산완료율"].Value   = decimal.Parse(dt.Rows[i]["INPUT_PER"].ToString()).ToString("#,0.######") + "%";
                        processingGrid.Rows[i].Cells["ITEM_CD"].Value = dt.Rows[i]["ITEM_CD"].ToString();

                        DataGridViewCellStyle Style = new DataGridViewCellStyle();

                        if (decimal.Parse(dt.Rows[i]["INPUT_PER"].ToString()) <= 40)
                        {
                            Style.ForeColor          = Color.FromArgb(255, 0, 0);
                            Style.SelectionForeColor = Color.FromArgb(255, 0, 0);
                            Style.Font = new Font("Noto Sans CJK KR Regular", 10, FontStyle.Bold);
                        }
                        else if (decimal.Parse(dt.Rows[i]["INPUT_PER"].ToString()) <= 60)
                        {
                            Style.ForeColor          = Color.FromArgb(112, 173, 71);
                            Style.SelectionForeColor = Color.FromArgb(112, 173, 71);
                            Style.Font = new Font("Noto Sans CJK KR Regular", 10, FontStyle.Bold);
                        }
                        else if (decimal.Parse(dt.Rows[i]["INPUT_PER"].ToString()) <= 80)
                        {
                            Style.ForeColor          = Color.FromArgb(157, 195, 230);
                            Style.SelectionForeColor = Color.FromArgb(157, 195, 230);
                            Style.Font = new Font("Noto Sans CJK KR Regular", 10, FontStyle.Bold);
                        }
                        else
                        {
                            Style.ForeColor          = Color.FromArgb(91, 155, 213);
                            Style.SelectionForeColor = Color.FromArgb(91, 155, 213);
                            Style.Font = new Font("Noto Sans CJK KR Regular", 10, FontStyle.Bold);
                        }
                        processingGrid.Rows[i].Cells["생산완료율"].Style = Style;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception 오류 발생");
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Example #28
0
        private void output_list(DataGridView dgv, string condition)
        {
            try
            {
                dgv주문등록.Rows.Clear();
                wnDm      wDm = new wnDm();
                DataTable dt  = null;
                dt = wDm.fn_배송주문_List(condition);

                if (dt != null && dt.Rows.Count > 0)
                {
                    dgv.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dgv.Rows[i].Cells["H주문일자"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        dgv.Rows[i].Cells["H주문번호"].Value = dt.Rows[i]["ORD_NUM"].ToString();
                        // dgv.Rows[i].Cells["H항목순번"].Value = dt.Rows[i]["ORD_SEQ"].ToString();
                        dgv.Rows[i].Cells["H주문시간"].Value  = dt.Rows[i]["ORD_TIME"].ToString();
                        dgv.Rows[i].Cells["H거래처코드"].Value = dt.Rows[i]["CUST_CD"].ToString();
                        dgv.Rows[i].Cells["H거래처"].Value   = dt.Rows[i]["CUST_NM"].ToString();
                        // dgv.Rows[i].Cells[3].Value = dt.Rows[i]["ITEM_CNT"].ToString();
                        dgv.Rows[i].Cells["H담당사원코드"].Value = dt.Rows[i]["STAFF_CD"].ToString();
                        dgv.Rows[i].Cells["H담당사원"].Value   = dt.Rows[i]["STAFF_NM"].ToString();
                        //   dgv.Rows[i].Cells[7].Value = dt.Rows[i]["SELF_YN"].ToString();
                        dgv.Rows[i].Cells["H부가세"].Value = dt.Rows[i]["VAT_CD"].ToString();
                        //if (dt.Rows[i]["SALE_STATE"].ToString().Equals("1"))
                        //{
                        //    dgv.Rows[i].Cells["H전표상태"].Value = "배송";
                        //}
                        //else
                        //{
                        //    dgv.Rows[i].Cells["H전표상태"].Value = "배송완료";
                        //}
                        dgv.Rows[i].Cells["H전표상태"].Value = dt.Rows[i]["SALE_STATE_NM"].ToString();
                        dgv.Rows[i].Cells["H비고"].Value   = dt.Rows[i]["COMMENT"].ToString();
                        //dgv.Rows[i].Cells[4].Value = dt.Rows[i]["COMPLETE_YN"].ToString();

                        //dgv.Rows[i].Cells["배송배송일"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송번호"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송거래처"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송제품수"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송거래처코드"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송창고코드"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송창고명"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송자체여부"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                        //dgv.Rows[i].Cells["배송부가세구분"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                    }
                }
                else
                {
                    dgv.Rows.Clear();
                }
            }
            catch (Exception e)
            {
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString()); msg.ShowDialog();
            }
        }
Example #29
0
        public int SqlCommandRun(SqlCommand sCommand, string sDesc)
        {
            SqlConnection  wnConnection = new SqlConnection(Common.p_sConn);
            SqlTransaction tran         = null;

            try
            {
                sCommand.Connection = wnConnection;
                wnConnection.Open();

                // 트랜잭션 ###############################################################################################
                tran = wnConnection.BeginTransaction();
                sCommand.Transaction = tran;
                //sCommand.CommandType = CommandType.Text;
                if (wnGConstant.debug)
                {
                    wnLog.writeLog(wnLog.LOG_QUERY, sCommand.CommandText);
                }
                int qResult = sCommand.ExecuteNonQuery();
                //sCommand.CommandText = null;

                if (qResult > 0)
                {
                    tran.Commit();
                }
                else
                {
                    tran.Rollback();
                    //Popup.pop오류리포트 msg = new Popup.pop오류리포트(sCommand.CommandText + " - " + sDesc + "-" + qResult);
                    //msg.ShowDialog();
                }
                wnLog.writeLog(wnLog.LOG_QUERY_RESULT, sDesc + "-" + qResult);
                return(qResult);
            }
            catch (Exception ex)
            {
                if (wnConnection != null)
                {
                    if (wnConnection.State == ConnectionState.Open)
                    {
                        if (tran != null)
                        {
                            tran.Rollback();
                        }
                        wnConnection.Close();
                    }
                }
                wnLog.writeLog(wnLog.LOG_ERROR, ex.Message + " - " + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(sCommand.CommandText + " - " + ex.Message + " - " + ex.ToString());
                msg.ShowDialog();

                return(-1);
            }
            finally
            {
                wnConnection.Close();
            }
        }
Example #30
0
        private void loadPage(DataTable dt)
        {
            this.lblStatus.Text = "- / -";

            try
            {
                int intSkip = 0;
                intSkip = (intCurrentPage * intPageSize);

                GridRecord.Columns[0].DefaultCellStyle.ForeColor = Color.Blue;
                GridRecord.Columns[1].DefaultCellStyle.ForeColor = Color.Blue;
                GridRecord.Columns[2].DefaultCellStyle.ForeColor = Color.Blue;

                GridRecord.Columns[0].Frozen = true;
                GridRecord.Columns[1].Frozen = true;
                GridRecord.Columns[2].Frozen = true;


                this.lblStatus.Text = (intCurrentPage + 1).ToString() + " / " + intPageCount.ToString();

                if (dt.Rows.Count > 0)
                {
                    GridRecord.RowCount = dt.Rows.Count;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        GridRecord.Rows[i].Cells[1].Value = dt.Rows[i]["LOC_NM"].ToString();
                        GridRecord.Rows[i].Cells[2].Value = dt.Rows[i]["LOC_CD"].ToString();
                    }

                    if (sCheckValue != null && !sCheckValue.Equals(""))
                    {
                        string[] CheckValues = sCheckValue.Split('|');
                        for (int i = 0; i < CheckValues.Length; i++)
                        {
                            for (int j = 0; j < GridRecord.Rows.Count; j++)
                            {
                                if (GridRecord.Rows[j].Cells[2].Value.ToString().Equals(CheckValues[i].ToString()))
                                {
                                    GridRecord.Rows[j].Cells[0].Value = true;
                                    break;
                                }
                            }
                        }
                    }
                }
                else
                {
                    GridRecord.Rows.Clear();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중에 오류가 발생했습니다.");
                wnLog.writeLog(wnLog.LOG_ERROR, ex.Message + " - " + ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }