Esempio n. 1
0
        private void lbl_ThemTinh_Click(object sender, EventArgs e)
        {
            UCs.ThemTinhTP oThemTinhTP = new ThemTinhTP("QLNS_ThongTinNV");
            oThemTinhTP.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tỉnh thành phố", oThemTinhTP);
            fPopup.ShowDialog();
            if (nNewTinhTPID > 0)
            {
                int?x = null;

                if (comB_Tinh.SelectedValue != Convert.DBNull && comB_Tinh.SelectedValue != null)
                {
                    x = Convert.ToInt16(comB_Tinh.SelectedValue);
                }

                dtTinhTP = oTinhTP.GetData();

                comB_Tinh.DataSource    = dtTinhTP;
                comB_Tinh.DisplayMember = "ten_tinh_tp";
                comB_Tinh.ValueMember   = "id";

                if (x != null)
                {
                    comB_Tinh.SelectedValue = x;
                }
                nNewTinhTPID = 0;
            }
        }
Esempio n. 2
0
        private void lbl_ThemTinh_Click(object sender, EventArgs e)
        {
            UCs.ThemTinhTP oThemTinhTP = new ThemTinhTP("QLNS_ThongTinNV_Phu");
            oThemTinhTP.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tỉnh thành phố", oThemTinhTP);
            fPopup.ShowDialog();
            if (nNewTinhTPID > 0)
            {
                int?v_Que = null, v_NoiSinh = null, v_HoKhau = null;

                if (comB_QueTinh.SelectedValue != Convert.DBNull && comB_QueTinh.SelectedValue != null)
                {
                    v_Que = Convert.ToInt16(comB_QueTinh.SelectedValue);
                }

                if (comB_HoKhauTinh.SelectedValue != Convert.DBNull && comB_HoKhauTinh.SelectedValue != null)
                {
                    v_HoKhau = Convert.ToInt16(comB_HoKhauTinh.SelectedValue);
                }

                if (comB_NoiSinhTinh.SelectedValue != Convert.DBNull && comB_NoiSinhTinh.SelectedValue != null)
                {
                    v_NoiSinh = Convert.ToInt16(comB_NoiSinhTinh.SelectedValue);
                }

                dtTinhTP = oTinhTP.GetData();

                SetupTinhDS();

                if (v_Que != null)
                {
                    comB_QueTinh.SelectedValue = v_Que;
                }
                if (v_NoiSinh != null)
                {
                    comB_NoiSinhTinh.SelectedValue = v_NoiSinh;
                }
                if (v_HoKhau != null)
                {
                    comB_HoKhauTinh.SelectedValue = v_HoKhau;
                }

                nNewTinhTPID = 0;
            }
        }
Esempio n. 3
0
        private void lbl_ThemTinh_Click(object sender, EventArgs e)
        {
            UCs.ThemTinhTP oThemTinhTP = new ThemTinhTP("QLNS_TrinhDo_ChuyenMon");
            oThemTinhTP.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tỉnh thành phố", oThemTinhTP);
            fPopup.ShowDialog();
            if (nNewTinhTPID > 0)
            {
                int? x = null;

                if (comB_Tinh.SelectedValue != Convert.DBNull && comB_Tinh.SelectedValue != null)
                    x = Convert.ToInt16(comB_Tinh.SelectedValue);

                dtTinhTP = oTinhTP.GetData();

                comB_Tinh.DataSource = dtTinhTP;
                comB_Tinh.DisplayMember = "ten_tinh_tp";
                comB_Tinh.ValueMember = "id";

                if (x != null)
                {
                    comB_Tinh.SelectedValue = x;
                }
                nNewTinhTPID = 0;
            }
        }
Esempio n. 4
0
        private void lbl_ThemTinh_Click(object sender, EventArgs e)
        {
            UCs.ThemTinhTP oThemTinhTP = new ThemTinhTP("QLNS_DaoTaoBoiDuong");
            oThemTinhTP.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tỉnh thành phố", oThemTinhTP);
            fPopup.ShowDialog();
            if (nNewTinhTPID > 0)
            {
                int? v_BoiDuong = null, v_DaoTao = null;

                if (comB_Tinh_BoiDuong.SelectedValue != Convert.DBNull && comB_Tinh_BoiDuong.SelectedValue != null)
                {
                    v_BoiDuong = Convert.ToInt16(comB_Tinh_BoiDuong.SelectedValue);
                }

                if (comB_Tinh_DaoTao.SelectedValue != Convert.DBNull && comB_Tinh_DaoTao.SelectedValue != null)
                {
                    v_DaoTao = Convert.ToInt16(comB_Tinh_DaoTao.SelectedValue);
                }

                dtTinhTP = oTinhTP.GetData();

                SetupTinhDS();

                if (v_BoiDuong != null) comB_Tinh_BoiDuong.SelectedValue = v_BoiDuong;
                if (v_DaoTao != null) comB_Tinh_DaoTao.SelectedValue = v_DaoTao;

                nNewTinhTPID = 0;
            }
        }
Esempio n. 5
0
        private void lbl_ThemTinh_Click(object sender, EventArgs e)
        {
            UCs.ThemTinhTP oThemTinhTP = new ThemTinhTP("QLNS_ThongTinNV_Phu");
            oThemTinhTP.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tỉnh thành phố", oThemTinhTP);
            fPopup.ShowDialog();
            if (nNewTinhTPID > 0)
            {
                int? v_Que = null, v_NoiSinh = null, v_HoKhau = null;

                if (comB_QueTinh.SelectedValue != Convert.DBNull && comB_QueTinh.SelectedValue != null)
                {
                    v_Que = Convert.ToInt16(comB_QueTinh.SelectedValue);
                }

                if (comB_HoKhauTinh.SelectedValue != Convert.DBNull && comB_HoKhauTinh.SelectedValue != null)
                {
                    v_HoKhau = Convert.ToInt16(comB_HoKhauTinh.SelectedValue);
                }

                if (comB_NoiSinhTinh.SelectedValue != Convert.DBNull && comB_NoiSinhTinh.SelectedValue != null)
                {
                    v_NoiSinh = Convert.ToInt16(comB_NoiSinhTinh.SelectedValue);
                }

                dtTinhTP = oTinhTP.GetData();

                SetupTinhDS();

                if (v_Que != null) comB_QueTinh.SelectedValue = v_Que;
                if (v_NoiSinh != null) comB_NoiSinhTinh.SelectedValue = v_NoiSinh;
                if (v_HoKhau != null) comB_HoKhauTinh.SelectedValue = v_HoKhau;

                nNewTinhTPID = 0;
            }
        }