Exemplo n.º 1
0
        private void tsbDelete_Click(object sender, EventArgs e)
        {
            DialogResult r = (MessageBox.Show("Bạn thật sự muốn xoá nhân viên này?", "Chú ý", MessageBoxButtons.YesNo, MessageBoxIcon.Question));

            if (r == DialogResult.Yes)
            {
                int ret = nvc.Delete(new NhanVien()
                {
                    MaNV = int.Parse(txtMaNV.Text)
                });
                if (ret == 1)
                {
                    MessageBox.Show("Xóa nhân viên thành công!", "Success!");
                    LoadData();
                }
                else
                {
                    MessageBox.Show("Xóa không thành công.Xin kiểm tra lại!", "Failed!");
                }
            }
        };
Exemplo n.º 2
0
 public static bool Delete(string maNhanVien)
 {
     return(Controller.Delete(maNhanVien));
 }