Ejemplo n.º 1
0
        private void btnTraCuu_Click(object sender, EventArgs e)
        {
            string cmnd = txtCMNDThanhVien.Text;

            tempCongDan = hoKhauController.timThanhVien(cmnd);
            if (tempCongDan != null)
            {
                lbHoTen.Text    = tempCongDan.HoLot + " " + tempCongDan.Ten;
                lbNgaySinh.Text = tempCongDan.NgaySinh.ToShortDateString();
                if (tempCongDan.GioiTinh)
                {
                    lbGioiTinh.Text = "Nam";
                }
                else
                {
                    lbGioiTinh.Text = "Nữ";
                }
                lbCMND.Text     = tempCongDan.soCMND;
                lbQuocTich.Text = tempCongDan.QuocTich;
                lbDanToc.Text   = tempCongDan.DanToc;
                lbTonGiao.Text  = tempCongDan.TonGiao;
            }
            else
            {
                MessageBox.Show("Không tìm thấy công dân");
            }
        }
Ejemplo n.º 2
0
        private void btnTraCuu_Click(object sender, EventArgs e)
        {
            string cmnd_ChuHo = txtCMNDThanhVien.Text;

            if (cmnd_ChuHo.Equals(""))
            {
                MessageBox.Show("Chưa nhập CMND chủ hộ");
                return;
            }
            chuHo    = hoKhauController.timThanhVien(cmnd_ChuHo);
            DanhSach = hoKhauQuanHeController.layTatCaQuanHeBangMaHK(chuHo.MaHK);
            if (DanhSach == null)
            {
                MessageBox.Show("Lỗi - Không tìm thấy thành viên nào");
            }
            loadThanhVien();
        }