예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            ProductPop frm = new ProductPop(ProductPop.EditMode.Insert);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                List <ProductVO> new_product_list = product_service.GetAllProducts();    //등록후 다시 조회
                dgvProductList.DataSource = new_product_list;
                SetBottomStatusLabel("신규 품목이 등록되었습니다.");
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //vo = new ProductVO();
            ProductVO product_vo = new ProductVO();

            foreach (DataGridViewRow row in this.dgvProductList.SelectedRows)
            {
                product_vo = row.DataBoundItem as ProductVO;
            }

            ProductPop frm = new ProductPop(ProductPop.EditMode.Update, product_vo);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                List <ProductVO> new_product_list = product_service.GetAllProducts();    //등록후 다시 조회
                dgvProductList.DataSource = new_product_list;
                SetBottomStatusLabel("품목 정보가 수정되었습니다.");
            }
        }