public ProductInfoForm(BOMManageForm frm, string employee, string ProductNameText, bool EnabledProductName) { InitializeComponent(); this.frm = frm; this.ProductNameText = ProductNameText; this.EnabledProductName = EnabledProductName; this.employee = employee; }
private BOMManageForm BOMSettingForm(string Prog_name, string Visible) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic["PROG_NAME"] = Prog_name; dic["PROG_FORM_NAME"] = "BOMManageForm"; dic["Search"] = Visible; BOMManageForm frm = (BOMManageForm)this.GetMdiParent().MdiChildrenShow(dic); return(frm); }
private void btnBOMCopy_Click(object sender, EventArgs e) { dgv.EndEdit(); List <int> Selectedlist = new List <int>(); List <object> IsCheckedList = new List <object>(); foreach (DataGridViewRow row in dgv.Rows) { DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)dgv[0, row.Index]; // 체크되면 해당되는 제품 번호를 가져옴 if (chk.Value == null) { IsCheckedList.Add(chk.Value); continue; } if ((bool)chk.Value == true) { if (dgv[2, chk.RowIndex].Value.ToString() == "재료") // 재료를 체크하고 복사를 진행하는 경우 { MessageBox.Show("재료는 BOM 정보가 없습니다. 복사는 반제품, 완제품만 가능합니다."); return; } Selectedlist.Add(dgv[1, row.Index].Value.ToInt()); } else { chk.Value = null; IsCheckedList.Add(chk.Value); } } // 체크를 안하고 복사를 진행하는 경우 if (IsCheckedList.Count == dgv.Rows.Count) { MessageBox.Show("체크를 한 후 복사를 진행해주시기 바랍니다."); return; } BOMManageForm frm = BOMSettingForm("BOM 복사 진행", "Y"); frm.BOMCopySettings(this, emp, Selectedlist, true); }
private void btnbarCopy_Click(object sender, EventArgs e) { if (dgvBarcode.Rows.Count < 1) { MessageBox.Show("데이터가 존재하지 않습니다."); return; } List <int> productNum = new List <int>(); foreach (DataGridViewRow row in dgvBarcode.Rows) { productNum.Add(dgvBarcode[0, row.Index].Value.ToInt()); } BOMManageForm frm = BOMSettingForm("BOM 바코드 복사", "BOMManageForm"); frm.BOMCopySettings(this, emp, productNum, true); }
private void dgv_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } int ProductID = dgv[1, e.RowIndex].Value.ToInt(); string ProductName = dgv[3, e.RowIndex].Value.ToString(); string Prog_Name; if (e.ColumnIndex == 5) { if (dgv[5, e.RowIndex].Value.ToString() == "BOM 등록") // 미등록 상태일 때 { BomEnrollCheck = false; // bom 미등록 상태 Prog_Name = "BOM 등록"; } else if (dgv[5, e.RowIndex].Value.ToString() == "BOM 수정") // 수정 상태일 때 { BomEnrollCheck = true; Prog_Name = "BOM 수정"; } else // 재료의 - 상태일 때 { return; } BOMManageForm frm = BOMSettingForm(Prog_Name, "BOMManageForm"); frm.BOMSettings(this, emp, BomEnrollCheck, ProductID, ProductName, BomEnrollStatus); //재료의 - 상태는 return됨 } }