Beispiel #1
0
 public FormCapLai()
 {
     InitializeComponent();
     congDanController   = new QuanLyCongDan();
     khaiSinhController  = new KhaiSinhController();
     capGiayToController = new QuanLyCapGiayTo();
 }
Beispiel #2
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            //Hủy đăng ký thường trú
            if (comBoBoxChucNang.SelectedIndex == 1)
            {
                string imfor = null;

                QuanLyThuongTru QLTT = new QuanLyThuongTru();
                QLTT.CapNhatNgayHuy(txtMaCD.Text.Trim(), datePick_Huy.Value, ref imfor);

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);

                LoadForm();
            }
            //Đăng ký thường trú
            else
            {
                string imfor = null;
                ql.TaoMoiThuTucThuongTru(txtMaCD.Text, datePick_NgayDK.Value, datePick_NgayDen.Value, datePick_NgayDK.Value, txtNoiDangKyThuongTru.Text, txtSoHK_DK.Text, ref imfor);

                QuanLyCongDan qlcd = new QuanLyCongDan();

                qlcd.CaiChinhDiaChiThuongTru(txtMaCD.Text.Trim(), txtNoiDangKyThuongTru.Text.Trim(), ref imfor);

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
                LoadForm();
            }
        }
Beispiel #3
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            //Hủy đăng ký tạm trú
            if (comBoBoxChucNang.SelectedIndex == 1)
            {
                string       imfor = null;
                QuanLyTamTru qltt  = new QuanLyTamTru();
                qltt.TaoMoiThuTucTamTru(txtMaCD.Text, datePick_NgayDK.Value, datePick_NgayDen.Value, datePicNgayHetHan.Value, txtNoiDangKyTamTru.Text, txtSoHK_DK.Text, ref imfor);
                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
                QuanLyCongDan qlcd = new QuanLyCongDan();

                qlcd.CaiChinhDiaChiTamTru(txtMaCD.Text.Trim(), txtNoiDangKyTamTru.Text.Trim(), ref imfor);
                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
            //Gia Hạn Tạm trú
            if (comBoBoxChucNang.SelectedIndex == 2)
            {
                string       imfor     = null;
                QuanLyTamTru QLyTamTru = new QuanLyTamTru();
                QLyTamTru.CapNhatNgayGiaHan(txtMaCD.Text.Trim(), datePickGiaHan.Value, ref imfor);
            }
            //Hủy đăng ký tạm trú
            if (comBoBoxChucNang.SelectedIndex == 3)
            {
                string       imfor     = null;
                QuanLyTamTru QLyTamTru = new QuanLyTamTru();
                QLyTamTru.CapNhatNgayHuy(txtMaCD.Text.Trim(), datePick_Huy.Value, ref imfor);
            }
        }
Beispiel #4
0
        private void btnTimCMND_Click(object sender, EventArgs e)
        {
            //Hủy đăng ký thường trú
            if (comBoBoxChucNang.SelectedIndex == 1)
            {
                string imfor = null;

                //Tìm hiện thông tin Công dân
                QuanLyCongDan QLCD = new QuanLyCongDan();

                CongDan CD = QLCD.TimCD_CMND(txtCMND_Search.Text.Trim(), ref imfor);
                txtMaCD.Text     = CD.MaCD;
                txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                txtTonGiao.Text  = CD.TonGiao;
                txtNoiSong.Text  = CD.DiaChiThuongTru;
                txtCMND.Text     = CD.soCMND;
                txtDanToc.Text   = CD.DanToc;
                txtQuocTich.Text = CD.QuocTich;
                //Tìm Hiện thông tin thường trú
                QuanLyThuongTru QLTT = new QuanLyThuongTru();
                ThuongTru       TT   = QLTT.TimThuongTru_CMND(CD.MaCD, ref imfor);
                datePick_NgayDK.Value  = TT.NgayDK;
                datePick_NgayDen.Value = TT.NgayDen;

                if (TT.SoDK <= 9)
                {
                    txtSoQL.Text = "0" + TT.SoDK.ToString();
                }
                else
                {
                    txtSoQL.Text = TT.SoDK.ToString();
                }
                txtSoQuyen.Text = TT.SoQuyen;
                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
            else
            {
                //Thêm đăng ký thường trú
                string        imfor = null;
                QuanLyCongDan QLCD  = new QuanLyCongDan();

                CongDan CD = new CongDan();
                CD = QLCD.TimCD_CMND(txtCMND_Search.Text.Trim(), ref imfor);

                txtMaCD.Text     = CD.MaCD;
                txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                txtTonGiao.Text  = CD.TonGiao;
                txtNoiSong.Text  = CD.DiaChiThuongTru;
                txtCMND.Text     = CD.soCMND;
                txtDanToc.Text   = CD.DanToc;
                txtQuocTich.Text = CD.QuocTich;

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
        }
 public Form_ChinhSuaHoKhau()
 {
     InitializeComponent();
     congDanController      = new QuanLyCongDan();
     hoKhauController       = new QuanLyHoKhau();
     hoKhauQuanHeController = new QuanLyQuanHeHoKhau();
     DanhSachThanhVienMoi   = new List <HoKhau_QuanHe>();
     dt1 = new DataTable();
     dt2 = new DataTable();
 }
Beispiel #6
0
        private void btnTimCMND_Click(object sender, EventArgs e)
        {
            if (comBoBoxChucNang.SelectedIndex == 0)
            {
                //Thêm đăng ký tạm vắng
                string        imfor = null;
                QuanLyCongDan QLCD  = new QuanLyCongDan();

                CongDan CD = new CongDan();

                CD = QLCD.TimCD_CMND(txtCMND_Search.Text.Trim(), ref imfor);

                txtMaCD.Text     = CD.MaCD;
                txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                txtTonGiao.Text  = CD.TonGiao;
                txtNoiSong.Text  = CD.DiaChiThuongTru;
                txtCMND.Text     = CD.soCMND;
                txtDanToc.Text   = CD.DanToc;
                txtQuocTich.Text = CD.QuocTich;

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
            if (comBoBoxChucNang.SelectedIndex == 1)
            {
                string        imfor = null;
                QuanLyCongDan QLCD  = new QuanLyCongDan();

                CongDan CD = new CongDan();

                CD = QLCD.TimCD_CMND(txtCMND_Search.Text.Trim(), ref imfor);

                txtMaCD.Text     = CD.MaCD;
                txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                txtTonGiao.Text  = CD.TonGiao;
                txtNoiSong.Text  = CD.DiaChiThuongTru;
                txtCMND.Text     = CD.soCMND;
                txtDanToc.Text   = CD.DanToc;
                txtQuocTich.Text = CD.QuocTich;

                QuanLyTamVang QLTV = new QuanLyTamVang();

                TamVang TV = QLTV.TimTamTru_MaCD(CD.MaCD, ref imfor);

                txtLyDoTamVang.Text   = TV.LyDoTamVang;
                txtSoQL.Text          = TV.SoDK.ToString();
                txtSoQuyen.Text       = TV.SoQuyen;
                datePick_NgayDK.Value = TV.NgayDK;
            }
        }
Beispiel #7
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            if (comBoBoxChucNang.SelectedIndex == 0)
            {
                string        imfor = null;
                QuanLyTamVang qltv  = new QuanLyTamVang();
                qltv.TaoMoiThuTucTamVang(txtMaCD.Text, datePick_NgayDK.Value, txtLyDoTamVang.Text, ref imfor);

                QuanLyCongDan qlcd = new QuanLyCongDan();

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
            if (comBoBoxChucNang.SelectedIndex == 1)
            {
                string        imfor      = null;
                QuanLyTamVang QLyTamVang = new QuanLyTamVang();
                QLyTamVang.CapNhatNgayHuy(txtMaCD.Text.Trim(), datePick_Huy.Value, ref imfor);
                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
        }
Beispiel #8
0
 public FormCapNhatCMND()
 {
     InitializeComponent();
     congDanController = new QuanLyCongDan();
     cmndController    = new QuanLyCMND();
 }
 public Form3()
 {
     InitializeComponent();
     ketHonController  = new QuanLyKetHon();
     congDanController = new QuanLyCongDan();
 }
Beispiel #10
0
        private void btnTimCMND_Click(object sender, EventArgs e)
        {
            //Đăng ký tạm trú
            if (comBoBoxChucNang.SelectedIndex == 1)
            {
                //Tìm công dân trong bảng công dân bằng chứng minh nhân dân
                //

                string  imfor = null;
                CongDan CD    = new CongDan();

                QuanLyCongDan QLCD = new QuanLyCongDan();
                CD = QLCD.TimCD_CMND(txtCMND_Search.Text, ref imfor);
                if (CD != null)
                {
                    txtMaCD.Text     = CD.MaCD;
                    txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                    txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                    txtTonGiao.Text  = CD.TonGiao;
                    txtNoiSong.Text  = CD.DiaChiThuongTru;
                    txtCMND.Text     = CD.soCMND;
                    txtDanToc.Text   = CD.DanToc;
                    txtQuocTich.Text = CD.QuocTich;
                }
                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
            //Gia Hạn tạm trú
            if (comBoBoxChucNang.SelectedIndex == 2)
            {
                string imfor = null;
                //Tìm thông tin công dân tạm trú
                QuanLyCongDan QLCD = new QuanLyCongDan();

                CongDan CD = QLCD.TimCD_CMND(txtCMND_Search.Text.Trim(), ref imfor);
                txtMaCD.Text     = CD.MaCD;
                txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                txtTonGiao.Text  = CD.TonGiao;
                txtNoiSong.Text  = CD.DiaChiThuongTru;
                txtCMND.Text     = CD.soCMND;
                txtDanToc.Text   = CD.DanToc;
                txtQuocTich.Text = CD.QuocTich;

                //Tìm Công dân tạm trú

                QuanLyTamTru QLTT = new QuanLyTamTru();

                TamTru CDTT = new TamTru();
                CDTT = QLTT.TimTamTru_MaCD(CD.MaCD, ref imfor);

                txtSoQL.Text    = CDTT.SoDK.ToString();
                txtSoQuyen.Text = CDTT.SoQuyen;

                datePick_NgayDen.Value  = CDTT.NgayDen;
                datePick_NgayDK.Value   = CDTT.NgayDK;
                datePicNgayHetHan.Value = CDTT.NgayHetHan;

                txtSoHK_DK.Text         = CDTT.MaHoKhau;
                txtNoiDangKyTamTru.Text = CDTT.NoiDKTamTru;

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
            //Hủy đăng ký tạm trú.
            if (comBoBoxChucNang.SelectedIndex == 3)
            {
                string imfor = null;
                //Tìm thông tin công dân tạm trú
                QuanLyCongDan QLCD = new QuanLyCongDan();

                CongDan CD = QLCD.TimCD_CMND(txtCMND_Search.Text.Trim(), ref imfor);
                txtMaCD.Text     = CD.MaCD;
                txtHoVaTen.Text  = CD.HoLot + " " + CD.Ten;
                txtNgaySinh.Text = CD.NgaySinh.ToShortDateString();
                txtTonGiao.Text  = CD.TonGiao;
                txtNoiSong.Text  = CD.DiaChiThuongTru;
                txtCMND.Text     = CD.soCMND;
                txtDanToc.Text   = CD.DanToc;
                txtQuocTich.Text = CD.QuocTich;

                //Tìm Công dân tạm trú

                QuanLyTamTru QLTT = new QuanLyTamTru();

                TamTru CDTT = new TamTru();
                CDTT = QLTT.TimTamTru_MaCD(CD.MaCD, ref imfor);

                txtSoQL.Text    = CDTT.SoDK.ToString();
                txtSoQuyen.Text = CDTT.SoQuyen;

                datePick_NgayDen.Value  = CDTT.NgayDen;
                datePick_NgayDK.Value   = CDTT.NgayDK;
                datePicNgayHetHan.Value = CDTT.NgayHetHan;

                txtSoHK_DK.Text         = CDTT.MaHoKhau;
                txtNoiDangKyTamTru.Text = CDTT.NoiDKTamTru;

                if (CDTT.NgayGiaHan != null)
                {
                    labGiaHan.Visible      = true;
                    datePickGiaHan.Visible = true;
                    datePickGiaHan.Value   = CDTT.NgayGiaHan.Value;
                }

                DevExpress.XtraEditors.XtraMessageBox.Show(imfor);
            }
        }