Example #1
0
 private void button_xoa_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(tbMaNKTT.Text))
     {
         MessageBox.Show(this, "Thiếu!", "Vui Lòng nhập mã nhân khẩu hoặc mã thường trú", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     using (ChuyenKhauGUI ck = new ChuyenKhauGUI())
     {
         ck.ShowDialog(this);
         this.lyDo   = ck.lyDo;
         this.noiDen = ck.noiDen;
         xuatFile();
         if (nktt.XoaNKTT(tbMaNKTT.Text))
         {
             MessageBox.Show(this, "Thành công!");
         }
         else
         {
             MessageBox.Show(this, "Lỗi!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }