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; }
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(); } }