Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmProducts frm = new FrmProducts();

            this.Hide();
            frm.ShowDialog();
            this.Visible             = true;
            dto                      = bll.Select();
            dataGridView1.DataSource = dto.Products;
        }
Exemplo n.º 2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.ProductID == 0)
     {
         MessageBox.Show("Select a product");
     }
     else
     {
         FrmProducts frm = new FrmProducts();
         frm.detail   = detail;
         frm.isUpdate = true;
         frm.dto      = dto;
         this.Hide();
         frm.ShowDialog();
         this.Visible             = true;
         bll                      = new ProductBLL();
         dto                      = bll.Select();
         dataGridView1.DataSource = dto.Products;
         CleanFiltes();
     }
 }