示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            PriceInfoVO vo = new PriceInfoVO();

            foreach (DataGridViewRow row in this.dgvMUPM.SelectedRows)
            {
                vo = row.DataBoundItem as PriceInfoVO;
            }

            MUPMPop frm = new MUPMPop(MUPMPop.EditMode.Update, null, vo);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                price_service = new PriceService();
                List <PriceInfoVO> newPricelist = price_service.GetPriceInfo("COOPERATIVE");    //등록후 다시 조회
                dgvMUPM.DataSource = newPricelist;
                dgvMUPM.ClearSelection();
                SetBottomStatusLabel("자재단가 수정이 완료되었습니다.");
            }
        }
示例#2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            List <PriceInfoVO> list = new List <PriceInfoVO>();

            foreach (DataGridViewRow row in this.dgvMUPM.Rows)
            {
                PriceInfoVO vo = new PriceInfoVO();
                vo = row.DataBoundItem as PriceInfoVO;
                list.Add(vo);
            }
            MUPMPop frm = new MUPMPop(MUPMPop.EditMode.Insert, list);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                price_service = new PriceService();
                List <PriceInfoVO> new_priceinfo_list = price_service.GetPriceInfo("COOPERATIVE");    //등록후 다시 조회
                dgvMUPM.DataSource = new_priceinfo_list;
                SetBottomStatusLabel("신규 자재단가가 등록되었습니다.");
            }
        }