private void btnAdd_Click(object sender, EventArgs e) { FrmCustomer frm = new FrmCustomer(); this.Hide(); frm.ShowDialog(); this.Visible = true; dto = bll.Select(); dataGridView1.DataSource = dto.Customer; }
private void btnUpdate_Click(object sender, EventArgs e) { if (detail.ID == 0) { MessageBox.Show("Select a customer to update"); } else { FrmCustomer frm = new FrmCustomer(); frm.detail = detail; frm.isUpdate = true; this.Hide(); frm.ShowDialog(); this.Visible = true; bll = new CustomerBLL(); dto = bll.Select(); dataGridView1.DataSource = dto.Customer; } }