Пример #1
0
        private void picLogic()
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "Images Files(*.jpg; *.jpeg; *.gif; *.bmp; *.png)|*.jpg;*.jpeg;*.gif;*.bmp;*.png";
            ofd.ShowDialog();


            if (ofd.FileNames.Length > 0)
            {
                foreach (string filename in ofd.FileNames)
                {
                    txtFloorPlanNm.Text = Path.GetFileNameWithoutExtension(filename); //경로빼고 파일명만!
                    image   = Image.FromFile(filename);                               //이미지
                    ImgPath = filename;                                               //파일경로

                    Image floorPlanImg = ComInfo.pic_resize_logic(pictureBox1, image);
                    pictureBox1.BackgroundImage = floorPlanImg;
                }
            }
            else
            {
                pictureBox1.BackgroundImage = null;
            }
        }
Пример #2
0
        private void dgv상세_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            검사카드.Visible = true;
            wnDm wDm = new wnDm();

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("     and A.LOT_NO = '" + dgv상세.Rows[e.RowIndex].Cells[0].Value.ToString() + "' ");

            //   sb.AppendLine("     and B.F_STEP = '3' ");
            DataTable dt = wDm.fn_Flow_Chk_Req_List(sb.ToString());

            if (dt != null && dt.Rows.Count > 0)
            {
                txt_chk_date.Text = dt.Rows[0]["F_SUB_DATE"].ToString();

                txt_lot_no.Text  = dt.Rows[0]["LOT_NO"].ToString();
                txt_lot_sub.Text = dt.Rows[0]["LOT_SUB"].ToString();
                txt_item_cd.Text = dt.Rows[0]["ITEM_CD"].ToString();
                txt_item_nm.Text = dt.Rows[0]["ITEM_NM"].ToString();
                txt_spec.Text    = dt.Rows[0]["SPEC"].ToString();
                txt_flow_cd.Text = dt.Rows[0]["FLOW_CD"].ToString();
                txt_flow_nm.Text = dt.Rows[0]["FLOW_NM"].ToString();

                txt_item_gubun_nm.Text = dt.Rows[0]["ITEM_GUBUN_NM"].ToString();
                txt_sub_amt.Text       = (decimal.Parse(dt.Rows[0]["F_SUB_AMT"].ToString())).ToString("#,0.######");

                txt_measure_cnt.Text = (decimal.Parse(dt.Rows[0]["F_SUB_AMT"].ToString())).ToString("#,0.######");  // dt.Rows[0]["MEASURE_CNT"].ToString();
                //txt_eva_gubun_nm.Text = dt.Rows[0]["EVA_GUBUN_NM"].ToString();
                txt_check_nm.Text  = dt.Rows[0]["CHECK_NM"].ToString();
                txt_check_yn.Text  = dt.Rows[0]["CHECK_YN"].ToString();
                txt_f_step.Text    = dt.Rows[0]["F_STEP"].ToString();
                txt_exam_test.Text = dt.Rows[0]["EXTERIOR"].ToString();
                txt_pass.Text      = dt.Rows[0]["PASS_YN"].ToString();


                if (int.Parse(dt.Rows[0]["MAP_SIZE"].ToString()) > 0)
                {
                    byte[]       rs  = (byte[])dt.Rows[0]["MAP"]; // byte to string Encoding.UTF8.GetBytes(dt.Rows[0]["MAP"].ToString());
                    MemoryStream ms  = new MemoryStream(rs);
                    Image        img = Image.FromStream(ms);

                    Image cus_img = ComInfo.pic_resize_logic(pic_exam, img);

                    pic_exam.BackgroundImage = cus_img;
                }
                else
                {
                    pic_exam.BackgroundImage = null;
                }
            }
            else
            {
                MessageBox.Show("데이터 일시 오류 \n 다시 더블클릭 해주시기 바랍니다. ");
                return;
            }
        }
        private void pic_logic(PictureBox pic)
        {
            ofd.Filter = "*.png|*.jpg";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                //이미지
                image = Image.FromFile(ofd.FileName);
                //이미지 경로
                path = ofd.FileName;

                /* 이미지 리사이즈 */
                Image cus_img = ComInfo.pic_resize_logic(pic, image);
                //픽쳐박스에 이미지를 띄운다
                pic.BackgroundImage = cus_img;
            }
        }
Пример #4
0
        private void outputDetail2()
        {
            itemOutGrid.Rows.Clear();

            DataTable dt = wnDm.fn_주문항목_List(" where A.ORD_DATE='" + str주문일자 + "' and A.ORD_NUM='" + str주문번호 + "'");

            try
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    itemOutGrid.Rows.Add();
                    //   dgv주문등록.Rows[i].Cells["P_PLAN_DATE"].Value = dt.Rows[i]["ORD_DATE"].ToString();
                    //  dgv주문등록.Rows[i].Cells["P_PLAN_CD"].Value = dt.Rows[i]["ORD_NUM"].ToString();
                    itemOutGrid.Rows[i].Cells["O_SPEC"].Value    = dt.Rows[i]["SPEC"].ToString();
                    itemOutGrid.Rows[i].Cells["O_NO"].Value      = dt.Rows[i]["ORD_SEQ"].ToString();
                    itemOutGrid.Rows[i].Cells["O_ITEM_CD"].Value = dt.Rows[i]["ITEM_CD"].ToString();
                    itemOutGrid.Rows[i].Cells["O_ITEM_NM"].Value = dt.Rows[i]["ITEM_NM"].ToString();
                    itemOutGrid.Rows[i].Cells["O_UNIT_CD"].Value = dt.Rows[i]["UNIT_CD"].ToString();
                    itemOutGrid.Rows[i].Cells["O_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString();
                    itemOutGrid.Rows[i].Cells["최종매출일"].Value     = DateTime.Parse(dt.Rows[i]["LAST_DATE"].ToString());
                    itemOutGrid.Rows[i].Cells["비고"].Value        = dt.Rows[i]["COMMENT"].ToString();
                    itemOutGrid.Rows[i].Cells["매출구분"].Value      = dt.Rows[i]["SALE_GB"].ToString();



                    itemOutGrid.Rows[i].Cells["TOTAL_AMT"].Value   = (decimal.Parse(dt.Rows[i]["ORD_QTY"].ToString())).ToString("#,0.######");
                    itemOutGrid.Rows[i].Cells["PRICE"].Value       = (decimal.Parse(dt.Rows[i]["ORD_PRICE"].ToString())).ToString("#,0.######");
                    itemOutGrid.Rows[i].Cells["TOTAL_MONEY"].Value = (decimal.Parse(dt.Rows[i]["ORD_AMT"].ToString())).ToString("#,0.######");
                }

                byte[]       rs  = (byte[])dt.Rows[0]["RECIPIENT_SIGN"];
                MemoryStream ms  = new MemoryStream(rs);
                Image        img = Image.FromStream(ms);

                Image cus_img = ComInfo.pic_resize_logic(pic, img);

                pic.BackgroundImage = cus_img;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.ToString());
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                msg.ShowDialog();
            }
        }
Пример #5
0
        private void saupSetting()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();
                dt = wDm.fn_Saup_List(saup_no);

                if (dt != null && dt.Rows.Count > 0)
                {
                    txt_saup_nm.Text    = dt.Rows[0]["COMPANY_NM"].ToString();
                    txt_corporate.Text  = dt.Rows[0]["CORPORATE_NO"].ToString();
                    txt_uptae.Text      = dt.Rows[0]["UPTAE"].ToString();
                    txt_jongmok.Text    = dt.Rows[0]["JONGMOK"].ToString();
                    txt_post_no.Text    = dt.Rows[0]["POST_NO"].ToString();
                    txt_addr.Text       = dt.Rows[0]["ADDR"].ToString();
                    txt_addr2.Text      = dt.Rows[0]["ADDR2"].ToString();
                    txt_open_date.Text  = dt.Rows[0]["OPEN_DATE"].ToString();
                    txt_comp_phone.Text = dt.Rows[0]["COMP_PHONE"].ToString();
                    txt_fax.Text        = dt.Rows[0]["FAX"].ToString();
                    txt_mg_email.Text   = dt.Rows[0]["MANAGER_EMAIL"].ToString();
                    txt_mg_phone.Text   = dt.Rows[0]["MANAGER_PHONE"].ToString();
                    txt_homepage.Text   = dt.Rows[0]["HOMEPAGE"].ToString();

                    if (int.Parse(dt.Rows[0]["LOGO_SIZE"].ToString()) > 0)
                    {
                        byte[]       rs  = (byte[])dt.Rows[0]["SAUP_LOGO"];
                        MemoryStream ms  = new MemoryStream(rs);
                        Image        img = Image.FromStream(ms);

                        Image cus_img = ComInfo.pic_resize_logic(pic_exam, img);

                        pic_exam.BackgroundImage = cus_img;
                    }
                }
                else
                {
                    txt_saup_nm.Text = Common.p_strCompNm;
                }
            }
            catch (Exception e)
            {
            }
        }
Пример #6
0
        private void btn싸인_Click(object sender, EventArgs e)
        {
            ofd.FileName = "";
            ofd.Filter   = "Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                //이미지
                image = Image.FromFile(ofd.FileName);
                //이미지 경로
                path = ofd.FileName;

                /* 이미지 리사이즈 */
                Image sign_img = ComInfo.pic_resize_logic(pic, image);
                //픽쳐박스에 이미지를 띄운다
                pic.BackgroundImage = sign_img;
            }
            else
            {
                pic.BackgroundImage = null;
            }
        }
Пример #7
0
        private void dgv_floorPlan_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            lbl_gbn.Text           = "0";
            dtp_input_date.Enabled = false;
            DataTable dt = new DataTable();

            try
            {
                dt = wDm.SelectFloorPlan(dgv_floorPlan.Rows[e.RowIndex].Cells["INPUT_DATE"].Value.ToString(), dgv_floorPlan.Rows[e.RowIndex].Cells["INPUT_CD"].Value.ToString());

                dtp_input_date.Text = dgv_floorPlan.Rows[e.RowIndex].Cells["INPUT_DATE"].Value.ToString();
                txt_input_cd.Text   = dgv_floorPlan.Rows[e.RowIndex].Cells["INPUT_CD"].Value.ToString();
                txtFloorPlanNm.Text = dt.Rows[0]["IMG_NAME"].ToString();
                txt_comment.Text    = dt.Rows[0]["COMMENT"].ToString();
                img_size            = int.Parse(dt.Rows[0]["IMG_PATH"].ToString());

                if (dt.Rows[0]["IMG"] != null && !dt.Rows[0]["IMG"].ToString().Equals(""))
                {
                    ip = (byte[])dt.Rows[0]["IMG"];

                    Image img = null;

                    if (ip.Length < 2)
                    {
                        pictureBox1.BackgroundImage = null;
                    }
                    else
                    {
                        Image a = ByteImg(ip);

                        img = ComInfo.pic_resize_logic(pictureBox1, a);
                        pictureBox1.BackgroundImage = img;
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Пример #8
0
        private void pic_logic_banner(PictureBox pic)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.FileName = "";
            ofd.Filter   = "Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                //이미지
                bannerimage = Image.FromFile(ofd.FileName);
                //이미지 경로
                bannerPath = ofd.FileName;
                /* 이미지 리사이즈 */
                Image cus_img = ComInfo.pic_resize_logic(pic, bannerimage);
                //픽쳐박스에 이미지를 띄운다
                pic.BackgroundImage = cus_img;
            }
            else
            {
                pic.BackgroundImage = null;
                bannerimage         = null;
            }
        }
Пример #9
0
        private void pic_logic(PictureBox pic)
        {
            ofd.Filter = "*.png|*.jpg";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                //이미지
                image = Image.FromFile(ofd.FileName);
                //이미지 경로
                path = ofd.FileName;

                string sTxt = path.Substring(path.Length - 3, 3);

                if (sTxt != "jpg" && sTxt != "JPG" && sTxt != "png" && sTxt != "PNG" && sTxt != "pdf" && sTxt != "PDF")
                {
                    MessageBox.Show("이미지 파일만 선택 가능합니다..");
                    return;
                }

                /* 이미지 리사이즈 */
                Image cus_img = ComInfo.pic_resize_logic(pic, image);
                //픽쳐박스에 이미지를 띄운다
                pic.BackgroundImage = cus_img;
            }
        }
Пример #10
0
        //제품검사 더블클릭 시 로직
        private void item_chk_data_logic(DataGridView dgv, DataGridViewCellEventArgs e, bool change_chk)
        {
            wnDm      wDm = new wnDm();
            DataTable dt  = new DataTable();

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("     and A.LOT_NO = '" + dgv.Rows[e.RowIndex].Cells[2].Value.ToString() + "' ");
            sb.AppendLine("     and B.LOT_SUB = '" + dgv.Rows[e.RowIndex].Cells[3].Value.ToString() + "' ");
            sb.AppendLine("     and B.F_STEP = '" + dgv.Rows[e.RowIndex].Cells[10].Value.ToString() + "' ");
            //sb.AppendLine("     and B.FLOW_CD = '" + dgv.Rows[e.RowIndex].Cells[9].Value.ToString() + "' ");

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

            if (dt != null && dt.Rows.Count > 0)
            {
                txt_chk_date.Text = dt.Rows[0]["F_CHK_DATE"].ToString();
                txt_lot_no.Text   = dt.Rows[0]["LOT_NO"].ToString();
                txt_lot_sub.Text  = dt.Rows[0]["LOT_SUB"].ToString();
                txt_item_cd.Text  = dt.Rows[0]["ITEM_CD"].ToString();
                txt_item_nm.Text  = dt.Rows[0]["ITEM_NM"].ToString();
                txt_spec.Text     = dt.Rows[0]["SPEC"].ToString();
                txt_flow_cd.Text  = dt.Rows[0]["FLOW_CD"].ToString();
                txt_flow_nm.Text  = dt.Rows[0]["FLOW_NM"].ToString();

                txt_item_gubun_nm.Text = dt.Rows[0]["ITEM_GUBUN_NM"].ToString();
                txt_sub_amt.Text       = (decimal.Parse(dt.Rows[0]["F_SUB_AMT"].ToString())).ToString("#,0.######");

                txt_measure_cnt.Text = dt.Rows[0]["MEASURE_CNT"].ToString();
                //txt_eva_gubun_nm.Text = dt.Rows[0]["EVA_GUBUN_NM"].ToString();
                txt_check_nm.Text = dt.Rows[0]["ITEM_CHECK_NM"].ToString();
                txt_check_yn.Text = dt.Rows[0]["ITEM_CHECK_YN"].ToString();
                txt_f_step.Text   = dt.Rows[0]["F_STEP"].ToString();

                if (dt.Rows[0]["PASS_YN"].ToString().Equals("Y"))
                {
                    txt_pass.Text = "합격";
                }
                else if (dt.Rows[0]["PASS_YN"].ToString().Equals("N"))
                {
                    txt_pass.Text = "불합격";
                }
                else
                {
                    txt_pass.Text = "";
                }

                if (int.Parse(dt.Rows[0]["MAP_SIZE"].ToString()) > 0)
                {
                    byte[]       rs  = (byte[])dt.Rows[0]["MAP"]; // byte to string Encoding.UTF8.GetBytes(dt.Rows[0]["MAP"].ToString());
                    MemoryStream ms  = new MemoryStream(rs);
                    Image        img = Image.FromStream(ms);

                    Image cus_img = ComInfo.pic_resize_logic(pic_exam, img);

                    pic_exam.BackgroundImage = cus_img;
                }
                else
                {
                    pic_exam.Image = null;
                }

                flow_chk_detail(dataChkGrid, dgv.Rows[e.RowIndex].Cells[8].Value.ToString(), dgv.Rows[e.RowIndex].Cells[9].Value.ToString(), change_chk, 2);
            }
            else
            {
                MessageBox.Show("데이터 일시 오류 \n 다시 더블클릭 해주시기 바랍니다. ");
                return;
            }
        }
Пример #11
0
        private void saupSetting()
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();
                dt = wDm.fn_Saup_List(saup_no);

                if (dt != null && dt.Rows.Count > 0)
                {
                    txt_saup_nm.Text    = dt.Rows[0]["COMPANY_NM"].ToString();
                    txt_corporate.Text  = dt.Rows[0]["CORPORATE_NO"].ToString();
                    txt_uptae.Text      = dt.Rows[0]["UPTAE"].ToString();
                    txt_jongmok.Text    = dt.Rows[0]["JONGMOK"].ToString();
                    txt_post_no.Text    = dt.Rows[0]["POST_NO"].ToString();
                    txt_addr.Text       = dt.Rows[0]["ADDR"].ToString();
                    txt_addr2.Text      = dt.Rows[0]["ADDR2"].ToString();
                    txt_open_date.Text  = dt.Rows[0]["OPEN_DATE"].ToString();
                    txt_comp_phone.Text = dt.Rows[0]["COMP_PHONE"].ToString();
                    txt_fax.Text        = dt.Rows[0]["FAX"].ToString();
                    txt_mg_email.Text   = dt.Rows[0]["MANAGER_EMAIL"].ToString();
                    txt_mg_phone.Text   = dt.Rows[0]["MANAGER_PHONE"].ToString();
                    txt_homepage.Text   = dt.Rows[0]["HOMEPAGE"].ToString();
                    txt_owner_nm.Text   = dt.Rows[0]["CEO_NAME"].ToString();
                    txt_account.Text    = dt.Rows[0]["ACCOUNT"].ToString();
                    txt_account2.Text   = dt.Rows[0]["ACCOUNT2"].ToString();
                    txt_flagship.Text   = dt.Rows[0]["FLAGSHIP"].ToString();
                    if (int.Parse(dt.Rows[0]["LOGO_SIZE"].ToString()) > 0)
                    {
                        byte[]       rs  = (byte[])dt.Rows[0]["SAUP_LOGO"];
                        MemoryStream ms  = new MemoryStream(rs);
                        Image        img = Image.FromStream(ms);
                        image = img;
                        Image cus_img = ComInfo.pic_resize_logic(pic_exam, img);

                        pic_exam.BackgroundImage = cus_img;
                    }

                    if (int.Parse(dt.Rows[0]["BANNER_SIZE"].ToString()) > 0)
                    {
                        byte[]       rs  = (byte[])dt.Rows[0]["SAUP_BANNER"];
                        MemoryStream ms  = new MemoryStream(rs);
                        Image        img = Image.FromStream(ms);
                        bannerimage = img;
                        Image cus_img = ComInfo.pic_resize_logic(pic_banner, img);

                        pic_banner.BackgroundImage = cus_img;
                    }

                    if (int.Parse(dt.Rows[0]["SEAL_SIZE"].ToString()) > 0)
                    {
                        byte[]       rs  = (byte[])dt.Rows[0]["SAUP_SEAL"];
                        MemoryStream ms  = new MemoryStream(rs);
                        Image        img = Image.FromStream(ms);
                        직인image = img;
                        Image cus_img = ComInfo.pic_resize_logic(pic_직인, img);

                        pic_직인.BackgroundImage = cus_img;
                    }
                }
                else
                {
                    txt_saup_nm.Text = Common.p_strCompNm;
                }
            }
            catch (Exception e)
            {
                Popup.pop오류리포트 msg = new Popup.pop오류리포트(e.Message + " - " + e.ToString());
                msg.ShowDialog();
            }
        }
Пример #12
0
        private void ReqChkList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1)
            {
                if (ReqChkList.Rows[e.RowIndex].Cells[14].Value != null)
                {
                    txt_exam_test.Text = ReqChkList.Rows[e.RowIndex].Cells[14].Value.ToString();
                }
                //for (int i = 0; i < dataChkGrid.Rows.Count; i++)
                //{
                //    dataChkGrid.Rows[i].Cells["GRADE"].i = (dataChkGrid.Rows[i].Cells["GRADE"] as DataGridViewComboBoxCell).Items[0];
                //}
                //row.Cells[col.Name].Value = (row.Cells[col.Name] as DataGridViewComboBoxCell).Items[0];
                DataGridView dgv = (DataGridView)sender;
                if (Common.sp_code == "300") //e대양요청사항 (항목 빼주라)
                {
                    dataChkGrid.Columns["GRADE"].Visible = false;
                }

                for (int i = 0; i < dataChkGrid.Rows.Count; i++)
                {
                }
                try
                {
                    bool   change_chk  = false;
                    string ord_lot_no  = txt_lot_no.Text.ToString();
                    string ord_lot_sub = txt_lot_sub.Text.ToString();
                    string ord_f_step  = txt_f_step.Text.ToString();

                    if (dgv.Rows[e.RowIndex].Cells[2].Value.ToString().Equals(ord_lot_no) &&
                        dgv.Rows[e.RowIndex].Cells[3].Value.ToString().Equals(ord_lot_sub) &&
                        dgv.Rows[e.RowIndex].Cells[10].Value.ToString().Equals(ord_f_step))    //같은 내용을 더블클릭 했을 시
                    {
                        change_chk = false;
                    }
                    else
                    {
                        change_chk = true;
                    }

                    if (dgv.Rows[e.RowIndex].Cells[11].Value.ToString().Equals("S")) //대기
                    {
                        wnDm      wDm = new wnDm();
                        DataTable dt  = new DataTable();

                        StringBuilder sb = new StringBuilder();
                        sb.AppendLine(" and ITEM_CD = '" + dgv.Rows[e.RowIndex].Cells[8].Value.ToString() + "' ");
                        sb.AppendLine(" and FLOW_CD = '" + dgv.Rows[e.RowIndex].Cells[9].Value.ToString() + "' ");

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

                        if (dt != null && dt.Rows.Count > 0)
                        {
                            if (int.Parse(dt.Rows[0]["cnt"].ToString()) == 0)
                            {
                                MessageBox.Show("공정검사기준에 등록되지 않았습니다. \n 등록 후 다시 시도하시기 바랍니다. ");
                                return;
                            }
                            sb = new StringBuilder();
                            sb.AppendLine("     and A.LOT_NO = '" + dgv.Rows[e.RowIndex].Cells[2].Value.ToString() + "' ");
                            sb.AppendLine("     and B.LOT_SUB = '" + dgv.Rows[e.RowIndex].Cells[3].Value.ToString() + "' ");
                            sb.AppendLine("     and B.F_STEP = '" + dgv.Rows[e.RowIndex].Cells[10].Value.ToString() + "' ");
                            //sb.AppendLine("     and B.FLOW_CD = '" + dgv.Rows[e.RowIndex].Cells[9].Value.ToString() + "' ");
                            dt = wDm.fn_Flow_Chk_Req_List(sb.ToString());

                            if (dt != null && dt.Rows.Count > 0)
                            {
                                txt_lot_no.Text  = dt.Rows[0]["LOT_NO"].ToString();
                                txt_lot_sub.Text = dt.Rows[0]["LOT_SUB"].ToString();
                                txt_item_cd.Text = dt.Rows[0]["ITEM_CD"].ToString();
                                txt_item_nm.Text = dt.Rows[0]["ITEM_NM"].ToString();
                                txt_spec.Text    = dt.Rows[0]["SPEC"].ToString();
                                txt_flow_cd.Text = dt.Rows[0]["FLOW_CD"].ToString();
                                txt_flow_nm.Text = dt.Rows[0]["FLOW_NM"].ToString();

                                txt_item_gubun_nm.Text = dt.Rows[0]["ITEM_GUBUN_NM"].ToString();
                                txt_sub_amt.Text       = (decimal.Parse(dt.Rows[0]["F_SUB_AMT"].ToString())).ToString("#,0.######");

                                txt_measure_cnt.Text = (decimal.Parse(dt.Rows[0]["F_SUB_AMT"].ToString())).ToString("#,0.######"); // dt.Rows[0]["MEASURE_CNT"].ToString();
                                //txt_eva_gubun_nm.Text = dt.Rows[0]["EVA_GUBUN_NM"].ToString();
                                txt_check_nm.Text  = dt.Rows[0]["CHECK_NM"].ToString();
                                txt_check_yn.Text  = dt.Rows[0]["CHECK_YN"].ToString();
                                txt_exam_test.Text = dt.Rows[0]["EXTERIOR"].ToString();
                                // txt_exam_test.Enabled = false;

                                if (txt_exam_test != null || txt_exam_test.Text == "")
                                {
                                    //button3.Enabled = false;
                                }
                                txt_f_step.Text = dt.Rows[0]["F_STEP"].ToString();



                                if (int.Parse(dt.Rows[0]["MAP_SIZE"].ToString()) > 0)
                                {
                                    byte[]       rs  = (byte[])dt.Rows[0]["MAP"]; // byte to string Encoding.UTF8.GetBytes(dt.Rows[0]["MAP"].ToString());
                                    MemoryStream ms  = new MemoryStream(rs);
                                    Image        img = Image.FromStream(ms);

                                    Image cus_img = ComInfo.pic_resize_logic(pic_exam, img);

                                    pic_exam.BackgroundImage = cus_img;
                                }
                                else
                                {
                                    pic_exam.BackgroundImage = null;
                                }

                                flow_chk_detail(dataChkGrid, dgv.Rows[e.RowIndex].Cells[2].Value.ToString(), dgv.Rows[e.RowIndex].Cells[8].Value.ToString(), dgv.Rows[e.RowIndex].Cells[9].Value.ToString(), change_chk, 1); // 1 -> 대기 , 2-> 미완료 혹은 완료
                            }
                            else
                            {
                                MessageBox.Show("데이터 일시 오류 \n 다시 더블클릭 해주시기 바랍니다. ");
                                return;
                            }
                        }
                    }
                    else //미완료
                    {
                        flow_chk_data_logic(dgv, e, change_chk);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("시스템 에러" + ex.ToString());
                    Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString());
                    msg.ShowDialog();
                }
            }
        }
Пример #13
0
        //공정검사 더블클릭 시 로직
        private void flow_chk_data_logic(DataGridView dgv, DataGridViewCellEventArgs e, bool change_chk)
        {
            // txt_exam_test.Text = "";
            wnDm      wDm = new wnDm();
            DataTable dt  = new DataTable();

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("     and A.LOT_NO = '" + dgv.Rows[e.RowIndex].Cells[2].Value.ToString() + "' ");
            sb.AppendLine("     and B.LOT_SUB = '" + dgv.Rows[e.RowIndex].Cells[3].Value.ToString() + "' ");
            sb.AppendLine("     and B.F_STEP = '" + dgv.Rows[e.RowIndex].Cells[10].Value.ToString() + "' ");
            //sb.AppendLine("     and B.FLOW_CD = '" + dgv.Rows[e.RowIndex].Cells[9].Value.ToString() + "' ");

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


            //sb.AppendLine("select ");
            //sb.AppendLine("          A.F_CHK_DATE ");1
            //sb.AppendLine("         ,A.LOT_NO ");2
            //sb.AppendLine("         ,A.LOT_SUB ");3
            //sb.AppendLine("         ,A.ITEM_CD ");4
            //sb.AppendLine("         ,C.ITEM_NM ");5
            //sb.AppendLine("         ,C.SPEC ");6

            //sb.AppendLine("         ,A.FLOW_CD ");7
            //sb.AppendLine("         ,D.FLOW_NM ");8
            //sb.AppendLine("         ,A.F_STEP ");9
            //sb.AppendLine("         ,A.F_SUB_AMT ");10
            //sb.AppendLine("         ,B.COMPLETE_YN ");11
            //sb.AppendLine("         ,B.CHECK_YN ");12
            //sb.AppendLine("         ,C.ITEM_GUBUN ");13
            //sb.AppendLine("         ,A.MEASURE_CNT ");
            ////sb.AppendLine("         ,A.EVA_GUBUN ");
            //sb.AppendLine("         ,(select S_CODE_NM from [SM_FACTORY_COM].[dbo].[T_S_CODE] where L_CODE = '400' and S_CODE = C.ITEM_GUBUN)  AS ITEM_GUBUN_NM "); //제품구분 코드 600
            //sb.AppendLine("         ,(select S_CODE_NM from [SM_FACTORY_COM].[dbo].[T_S_CODE] where L_CODE = '620' and S_CODE = E.EVA_GUBUN)  AS EVA_GUBUN_NM "); //평가구분 코드 620
            //sb.AppendLine("         ,(select S_CODE_NM from [SM_FACTORY_COM].[dbo].[T_S_CODE] where L_CODE = '610' and S_CODE = B.CHECK_YN)  AS CHECK_NM "); //평가구분 코드 620
            //sb.AppendLine("         ,A.MAP ");
            //sb.AppendLine("         ,A.MAP_SIZE ");
            //sb.AppendLine("         ,A.PASS_YN ");
            if (dt != null && dt.Rows.Count > 0)
            {
                txt_chk_date.Text = dt.Rows[0][0].ToString();
                txt_lot_no.Text   = dt.Rows[0][1].ToString();
                txt_lot_sub.Text  = dt.Rows[0][2].ToString();
                txt_item_cd.Text  = dt.Rows[0][3].ToString();
                txt_item_nm.Text  = dt.Rows[0][4].ToString();
                txt_spec.Text     = dt.Rows[0][5].ToString();
                txt_flow_cd.Text  = dt.Rows[0][6].ToString();
                txt_flow_nm.Text  = dt.Rows[0][7].ToString();

                txt_item_gubun_nm.Text = dt.Rows[0]["ITEM_GUBUN_NM"].ToString();
                txt_sub_amt.Text       = (decimal.Parse(dt.Rows[0]["F_SUB_AMT"].ToString())).ToString("#,0.######");

                txt_measure_cnt.Text = dt.Rows[0]["MEASURE_CNT"].ToString();
                //txt_eva_gubun_nm.Text = dt.Rows[0]["EVA_GUBUN_NM"].ToString();
                txt_check_nm.Text  = dt.Rows[0]["CHECK_NM"].ToString();
                txt_check_yn.Text  = dt.Rows[0]["CHECK_YN"].ToString();
                txt_f_step.Text    = dt.Rows[0]["F_STEP"].ToString();
                txt_exam_test.Text = dt.Rows[0]["EXTERIOR"].ToString();
                //txt_exam_test.Enabled = false;
                if (dt.Rows[0]["PASS_YN"].ToString().Equals("Y"))
                {
                    txt_pass.Text = "합격";
                }
                else if (dt.Rows[0]["PASS_YN"].ToString().Equals("N"))
                {
                    txt_pass.Text = "불합격";
                }
                else
                {
                    txt_pass.Text = "";
                }

                if (txt_exam_test != null || txt_exam_test.Text == "")
                {
                    //button3.Enabled = false;
                }

                if (int.Parse(dt.Rows[0]["MAP_SIZE"].ToString()) > 0)
                {
                    byte[]       rs  = (byte[])dt.Rows[0]["MAP"]; // byte to string Encoding.UTF8.GetBytes(dt.Rows[0]["MAP"].ToString());
                    MemoryStream ms  = new MemoryStream(rs);
                    Image        img = Image.FromStream(ms);

                    Image cus_img = ComInfo.pic_resize_logic(pic_exam, img);

                    pic_exam.BackgroundImage = cus_img;
                }
                else
                {
                    pic_exam.BackgroundImage = null;
                }

                flow_chk_detail(dataChkGrid, dgv.Rows[e.RowIndex].Cells[2].Value.ToString(), dgv.Rows[e.RowIndex].Cells[8].Value.ToString(), dgv.Rows[e.RowIndex].Cells[9].Value.ToString(), change_chk, 2);
            }
            else
            {
                MessageBox.Show("데이터 일시 오류 \n 다시 더블클릭 해주시기 바랍니다. ");
                return;
            }
        }