Exemple #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmProduct frm = new FrmProduct();

            frm.dto = dto;
            this.Hide();
            frm.ShowDialog();
            this.Visible             = true;
            dto                      = bll.Select();
            dataGridView1.DataSource = dto.Products;
            CleanFilters();
        }
Exemple #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.ProductID == 0)
     {
         MessageBox.Show("Please select a product from table");
     }
     else
     {
         FrmProduct frm = new FrmProduct();
         frm.isUpdate = true;
         frm.detail   = detail;
         frm.dto      = dto;
         this.Hide();
         frm.ShowDialog();
         this.Visible             = true;
         bll                      = new ProductBLL();
         dto                      = bll.Select();
         dataGridView1.DataSource = dto.Products;
         CleanFilters();
     }
 }