Пример #1
0
        private void delbtn_Click(object sender, EventArgs e)
        {
            //kiem tra user co chon hang de xoa hay ko
            if (this.dataNV.SelectedRows.Count <= 0)
            {
                return;
            }

            if (NhanVienController.DeleteNV(this.txtmanv.Text.Trim()) == false)
            {
                MessageBox.Show("Loi khi xoa nhan vien", "Loi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            ShowData();
        }