Ejemplo n.º 1
0
        public NhanKhauThuongTruGUI()
        {
            InitializeComponent();
            nktt          = new NhanKhauThuongTruBUS();
            tieuSu        = new TieuSuBUS();
            tienAn        = new TienAnTienSuBUS();
            shk           = new SoHoKhauBUS();
            tbMaNKTT.Text = TrinhTaoMa.TangMa9kytu(TrinhTaoMa.getLastID_MaNhanKhauThuongTru());
            ttp           = new TinhThanhPhoBUS();

            //dGVTieuSu.DataSource = null;
            //dGVTieuSu.Rows.Clear();
            //dGVTieuSu.DataSource = nktt.GetAll().Tables["nhankhauthuongtru"];
            LoadtieuSu();
            //dGVTienAnTienSu.DataSource = tienAn.GetAll().Tables[0];
            Loadtienantiensu();
            //themMaDinhDanhBang(); hàm này để chạy 2 cái datafridview bị lỗi.... ô sửa lại đi

            cbbNoiCap.DisplayMember  = "ten";
            cbbNoiCap.ValueMember    = "matp";
            cbbNoiCap.DataSource     = ttp.GetAll().Tables[0];
            cbbNoiSinh.DisplayMember = "ten";
            cbbNoiSinh.ValueMember   = "matp";
            cbbNoiSinh.DataSource    = ttp.GetAll().Tables[0];
            cbbNoiCap.SelectedValue  = cbbNoiSinh.SelectedValue = "74";
        }
Ejemplo n.º 2
0
        public NhanKhauThuongTruGUI(string sosohokhau, string diachithuongtru)
        {
            InitializeComponent();
            nktt   = new NhanKhauThuongTruBUS();
            tieuSu = new TieuSuBUS();
            tienAn = new TienAnTienSuBUS();
            shk    = new SoHoKhauBUS();
            ttp    = new TinhThanhPhoBUS();

            tbSoSHK.Text          = sosohokhau;
            tbSoSHK.Enabled       = false;
            tbDCThuongTru.Text    = diachithuongtru;
            tbDCThuongTru.Enabled = false;

            tbMaNKTT.Text = TrinhTaoMa.TangMa9kytu(TrinhTaoMa.getLastID_MaNhanKhauThuongTru());
            LoadtieuSu();
            Loadtienantiensu();

            cbbNoiCap.DisplayMember  = "ten";
            cbbNoiCap.ValueMember    = "matp";
            cbbNoiCap.DataSource     = ttp.GetAll().Tables[0];
            cbbNoiSinh.DisplayMember = "ten";
            cbbNoiSinh.ValueMember   = "matp";
            cbbNoiSinh.DataSource    = ttp.GetAll().Tables[0];
        }
Ejemplo n.º 3
0
        public NhanKhauThuongTruGUI(string madinhdanh, int i, string tenChuHo = "")
        {
            InitializeComponent();
            nktt          = new NhanKhauThuongTruBUS();
            tieuSu        = new TieuSuBUS();
            tienAn        = new TienAnTienSuBUS();
            shk           = new SoHoKhauBUS();
            ttp           = new TinhThanhPhoBUS();
            this.tenChuHo = tenChuHo;

            tbmadinhdanh.Text   = madinhdanh;
            tbSoSHK.Enabled     = false;
            button_them.Enabled = false;

            cbbNoiCap.DisplayMember  = "ten";
            cbbNoiCap.ValueMember    = "matp";
            cbbNoiCap.DataSource     = ttp.GetAll().Tables[0];
            cbbNoiSinh.DisplayMember = "ten";
            cbbNoiSinh.ValueMember   = "matp";
            cbbNoiSinh.DataSource    = ttp.GetAll().Tables[0];

            DataTable kq = nktt.TimKiemJoinNhanKhau("nhankhau.madinhdanh='" + tbmadinhdanh.Text + "'").Tables[0];

            if (kq.Rows.Count > 0)
            {
                DataRow dt = kq.Rows[0];
                nkttDTO = new NhanKhauThuongTruDTO(dt);

                fillData();
            }

            //tbMaNKTT.Text = TrinhTaoMa.TangMa9kytu(TrinhTaoMa.getLastID_MaNhanKhauThuongTru());
            //LoadtieuSu();
            //Loadtienantiensu();
        }
Ejemplo n.º 4
0
        public ChonDonViHanhChinhGUI()
        {
            ttp = new TinhThanhPhoBUS();
            qh  = new QuanHuyenBUS();
            xp  = new XaPhuongThiTranBUS();
            InitializeComponent();

            //cbbTinhThanh.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
            //cbbTinhThanh.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            //cbbTinhThanh.AutoCompleteSource = AutoCompleteSource.ListItems;

            cbbTinhThanh.DisplayMember = "ten";
            cbbTinhThanh.ValueMember   = "matp";
            cbbTinhThanh.DataSource    = ttp.GetAll().Tables[0];
            cbbTinhThanh.SelectedValue = "74";
            cbbQuanHuyen.SelectedValue = "724";
        }