private void Add(object sender, EventArgs e)
        {
            if (((MainForm)this.MdiParent).ActiveMdiChild == this)
            {
                ProductInfoForm frm = new ProductInfoForm(emp.Employee_name, false);

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    MessageBox.Show("등록되었습니다.");
                    ReviewDGV();
                }
            }
        }
Exemplo n.º 2
0
        private void btnInformation_Click(object sender, EventArgs e)
        {
            // 이 이벤트는 BOM Copy에서만 사용하는 이벤트

            if (txtProductName.TextLength < 1)
            {
                MessageBox.Show("제품명을 추가 해주세요");
                return;
            }


            ProductInfoForm frm = new ProductInfoForm(this, employee.Employee_name, txtProductName.Text, true);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                btnInformation.Visible = false;
                btnSubmit.Visible      = true;
                txtProductName.Enabled = false;
            }
        }
        private void dgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            else if (e.ColumnIndex == 5)
            {
                return;
            }

            ProductVO vo = new ProductVO
            {
                Product_Name        = dgv[3, e.RowIndex].Value.ToString(),
                Product_ID          = dgv[1, e.RowIndex].Value.ToInt(), // 그룹명 대신 그룹 ID를 넘겨줌
                Product_Information = dgv[7, e.RowIndex].Value.ToString(),
                Product_Unit        = dgv[8, e.RowIndex].Value.ToString(),
                Product_Standards   = dgv[9, e.RowIndex].Value.ToInt(),
                Product_Note1       = dgv[12, e.RowIndex].Value.ToString(),
                Product_Note2       = dgv[13, e.RowIndex].Value.ToString(),
                Product_Use         = dgv[4, e.RowIndex].Value.ToString(),
                Final_Regist_Time   = DateTime.Now,
                Product_Tact_Time   = dgv[10, e.RowIndex].Value.ToInt(),
                Product_Lead_Time   = dgv[11, e.RowIndex].Value.ToInt(),
                Product_Seq         = dgv[6, e.RowIndex].Value.ToInt(),
                Product_Group_Name  = dgv[2, e.RowIndex].Value.ToString()
            };

            ProductInfoForm frm = new ProductInfoForm(emp.Employee_name, true, vo);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                ReviewDGV();
            }
        }