/// <summary> /// BOM 관리 버튼 클릭 이벤트 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnBOM_Click(object sender, EventArgs e) { lblFunctionName.Text = ""; btnBomMain.Location = new Point(0, 224); btnBomAdd.Location = new Point(0, 253); btnBomSearch.Location = new Point(0, 282); btnBomMatEstimating.Location = new Point(0, 311); btnProMatEstimating.Location = new Point(0, 340); btnSales.Location = new Point(0, 370); btnManage.Location = new Point(0, 443); FrmBomInfoControl fbic = new FrmBomInfoControl(); btnDateInsert.Controls.Clear(); btnDateInsert.Controls.Add(fbic); btnBomMain.Visible = true; btnBomAdd.Visible = true; btnBomMatEstimating.Visible = true; btnBomSearch.Visible = true; btnProMatEstimating.Visible = true; btnSales1.Visible = false; btnSi.Visible = false; btnchp.Visible = false; btnma.Visible = false; button6.Visible = false; button5.Visible = false; button4.Visible = false; button1.Visible = false; button7.Visible = false; }
/// <summary> /// BOM 메인 버튼 클릭 이벤트 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnBomMain_Click(object sender, EventArgs e) { lblFunctionName.Text = sender.ToString().Substring(sender.ToString().LastIndexOf('t') + 2); FrmBomInfoControl fbic = new FrmBomInfoControl(); btnDateInsert.Controls.Clear(); btnDateInsert.Controls.Add(fbic); }
/// <summary> /// Form이 Load될 때 발생하는 이벤트 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmBomAllMatInfo_Load(object sender, EventArgs e) { dgvAllMat.Font = new Font("맑은고딕", 9); fbi = new FrmBomInfoControl(); //부모 자재를 등록할 때 if (mat_Level == 9999) { //부모 자재는 Mat_Level의 값이 0이 아닌 값만 뜨도록 설정 bDao = new DAO.BomDAO(); dt = bDao.SelectBom(true); dgvAllMat.DataSource = fbi.CloneDataTable(dt, dtClone); DisplayGridview(); } else //자식 자재를 등록할 때 { //자식 자재는 부모 자재보다 Level값이 같거나 작은 값만 뜨며, 자신은 안뜨도록 설정 //자식 자재는 완제품은 출력되지 않도록 설정 bDao = new DAO.BomDAO(); dt = bDao.SelectBom(mat_Level, mat_No); dgvAllMat.DataSource = fbi.CloneDataTable(dt, dtClone); DisplayGridview(); } }