Exemplo n.º 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(txtCode.Text))
            {
                frmMessageBoxFillNull frm = new frmMessageBoxFillNull();
                frm.ShowDialog();
            }
            else
            {
                frmMessageBoxDelete frm = new frmMessageBoxDelete();
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    String cod = txtCode.Text;
                    serviceDA.deleteEmployee(cod);
                    frmSearchUser fm = Owner as frmSearchUser;
                    fm.dgvSearch.AutoGenerateColumns = false;
                    fm.dgvSearch.DataSource          = serviceDA.queryAllEmployee();

                    this.Close();
                }
            }
        }