private void btnAdd_Click(object sender, EventArgs e) { FrmUsers frm = new FrmUsers(); this.Hide(); frm.ShowDialog(); this.Visible = true; }
private void btnUpdate_Click(object sender, EventArgs e) { if (detail.UserNumer == 0) { MessageBox.Show("Select a empote from the table"); } else { FrmUsers frm = new FrmUsers(); frm.detail = detail; frm.isUpdate = true; this.Hide(); frm.ShowDialog(); this.Visible = true; bll = new EmployeeBLL(); dto = bll.Select(); dataGridView1.DataSource = dto.Employees; CleanAll(); } }