private void btnUpdate_Click(object sender, EventArgs e) { PriceInfoVO vo = new PriceInfoVO(); foreach (DataGridViewRow row in this.dgvSUPM.SelectedRows) { vo = row.DataBoundItem as PriceInfoVO; } SUPMPop frm = new SUPMPop(SUPMPop.EditMode.Update, null, vo); if (frm.ShowDialog() == DialogResult.OK) { price_service = new PriceService(); List <PriceInfoVO> newPricelist = price_service.GetPriceInfo("CUSTOMER"); //등록후 다시 조회 dgvSUPM.DataSource = newPricelist; dgvSUPM.ClearSelection(); SetBottomStatusLabel("영업단가 수정이 완료되었습니다."); } }
private void btnAdd_Click(object sender, EventArgs e) { List <PriceInfoVO> list = new List <PriceInfoVO>(); foreach (DataGridViewRow row in this.dgvSUPM.Rows) { PriceInfoVO vo = new PriceInfoVO(); vo = row.DataBoundItem as PriceInfoVO; list.Add(vo); } SUPMPop frm = new SUPMPop(SUPMPop.EditMode.Insert, list); if (frm.ShowDialog() == DialogResult.OK) { price_service = new PriceService(); List <PriceInfoVO> new_priceinfo_list = price_service.GetPriceInfo("CUSTOMER"); //등록후 다시 조회 dgvSUPM.DataSource = new_priceinfo_list; SetBottomStatusLabel("신규 영업 단가가 등록되었습니다."); } }