Beispiel #1
0
        private void btn_Tim_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txt_MaNV.Text) || (!string.IsNullOrWhiteSpace(txt_Ho.Text) && !string.IsNullOrWhiteSpace(txt_Ten.Text)))
            {
                oCNVC.Ho   = txt_Ho.Text.Trim();
                oCNVC.Ten  = txt_Ten.Text.Trim();
                oCNVC.MaNV = string.IsNullOrWhiteSpace(txt_MaNV.Text.Trim()) ? null : txt_MaNV.Text.Trim();
                DataTable dt;

                try
                {
                    dt = oCNVC.SearchDataForQD(true);

                    if (dt != null && dt.Rows.Count > 0)
                    {
                        Forms.Popup frPopup = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC", new HDQD.UCs.DSCNVC(dt));
                        frPopup.ShowDialog();
                        Get_BindResult();
                    }
                    else
                    {
                        MessageBox.Show("Nhân viên này khòng còn hợp đồng hoặc không tồn tại trong hệ thống.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                catch (Exception)
                {
                }
            }
            else
            {
                MessageBox.Show("Xin vui lòng cung cấp mã nhân viên hoặc họ tên", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #2
0
        private void lbl_ThemQuocGia_Click(object sender, EventArgs e)
        {
            UCs.ThemQuocGia oThemQuocGia = new ThemQuocGia("QLNS_ThongTinNV");
            oThemQuocGia.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm quốc gia", oThemQuocGia);
            fPopup.ShowDialog();
            if (nNewQuocGiaID > 0)
            {
                int?x = null;

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

                dtQuocGia = oQuocGia.GetData();

                comB_QuocGia.DataSource    = dtQuocGia;
                comB_QuocGia.DisplayMember = "ten_quoc_gia";
                comB_QuocGia.ValueMember   = "id";

                if (x != null)
                {
                    comB_QuocGia.SelectedValue = x;
                }
                nNewQuocGiaID = 0;
            }
        }
Beispiel #3
0
        private void btn_Them_Click(object sender, EventArgs e)
        {
            if (HDQD.Program.ma_nv != "")
            {
                AddFlag = true;
                oFile   = new Business.CNVC.CNVC_File();
                HDQD.UCs.DSTapTin oDSTapTin = new HDQD.UCs.DSTapTin("QLNS_TapTin", oFile);
                oDSTapTin.txt_MaTapTin.Enabled = true;
                Form f = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH TẬP TIN", oDSTapTin);
                f.ShowDialog();

                if (oFile != null && oFile.Path.Count > 0)
                {
                    try
                    {
                        pb_Status.Style = ProgressBarStyle.Blocks;
                        UploadFile();
                    }
                    catch (Exception)
                    {
                        throw;
                    }
                }
            }
            else
            {
                MessageBox.Show("Xin vui lòng tìm và chọn nhân viên.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #4
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;
            }
        }
Beispiel #5
0
        private void btn_Them_Click(object sender, EventArgs e)
        {
            if (HDQD.Program.ma_nv != "")
            {
                AddFlag = true;
                oFile = new Business.CNVC.CNVC_File();
                HDQD.UCs.DSTapTin oDSTapTin = new HDQD.UCs.DSTapTin("QLNS_TapTin", oFile);
                oDSTapTin.txt_MaTapTin.Enabled = true;
                Form f = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH TẬP TIN", oDSTapTin);
                f.ShowDialog();

                if (oFile != null && oFile.Path.Count >0)
                {
                    try
                    {
                        pb_Status.Style = ProgressBarStyle.Blocks;
                        UploadFile();

                    }
                    catch (Exception)
                    {
                        
                        throw;
                    }
                }
            }
            else
            {
                MessageBox.Show("Xin vui lòng tìm và chọn nhân viên.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            
        }
Beispiel #6
0
        private void btn_NhapFile_Click(object sender, EventArgs e)
        {
            UCs.DSTapTin oDSTapTin = new UCs.DSTapTin("HopDong", oFile);
            oDSTapTin.txt_MaTapTin.Enabled = false;
            Form f = new Forms.Popup(oDSTapTin, "QUẢN LÝ NHÂN SỰ - DANH SÁCH TẬP TIN");

            f.ShowDialog();
        }
Beispiel #7
0
        private void lbl_ThemLoaiFile_Click(object sender, EventArgs e)
        {
            HDQD.UCs.ThemLoaiFile oThemLoaiFile = new HDQD.UCs.ThemLoaiFile("QLNS_TapTin");
            oThemLoaiFile.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm nhóm tập tin", oThemLoaiFile);
            fPopup.ShowDialog();

            Load_Bind_Combo();
        }
Beispiel #8
0
 private void lbl_ThemLoaiFile_Click(object sender, EventArgs e)
 {
     UCs.ThemLoaiFile oThemLoaiFile = new ThemLoaiFile("DSTapTin");
     oThemLoaiFile.Dock = DockStyle.Fill;
     Forms.Popup fPopup = new Forms.Popup(oThemLoaiFile, "Thêm nhóm tập tin");
     fPopup.ShowDialog();
     if (cb_LoaiTT.SelectedItem != null)
     {
         int selectingidx = Convert.ToInt16(cb_LoaiTT.SelectedValue);
     }
     Get_LoadFileGroupTable();
 }
Beispiel #9
0
 private void btn_ThietLap_Click(object sender, EventArgs e)
 {
     Forms.Popup frPopup = new Forms.Popup(ucDinhNghiaCT, "QUẢN LÝ NHÂN SỰ - ĐỊNH NGHĨA CÔNG THỨC TÍNH PHỤ CẤP");
     if (ucDinhNghiaCT.lstDisplayString.Count > 0)
     {
     }
     frPopup.ShowDialog();
     if (ucDinhNghiaCT.lstValueString.Count > 0)
     {
         rtb_CongThuc.Text = string.Join(" ", ucDinhNghiaCT.lstDisplayString.ToArray());
     }
 }
Beispiel #10
0
        private void Show_QD_Chung(DataGridViewRow p_row)
        {
            try
            {
                string ma_qd = p_row.Cells["ma_quyet_dinh"].Value.ToString();

                UCs.QDChung qdchung = new QDChung(ma_qd, true);
                Forms.Popup popup   = new Forms.Popup(qdchung, "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH CHUNG");
                popup.Show();
            }
            catch { }
        }
Beispiel #11
0
        private void lbl_ThemQuocGia_Click(object sender, EventArgs e)
        {
            UCs.ThemQuocGia oThemQuocGia = new ThemQuocGia("QLNS_ThongTinNV_Phu");
            oThemQuocGia.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm quốc gia", oThemQuocGia);
            fPopup.ShowDialog();
            if (nNewQuocGiaID > 0)
            {
                Label    lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                case "lbl_ThemQueQuan_QuocGia":
                    com = comB_QueQuan_QuocGia;
                    break;

                case "lbl_ThemNoiSinh_QuocGia":
                    com = comB_NoiSinh_QuocGia;
                    break;

                case "lbl_ThemQuocGia_HoKhau":
                    com = comB_HoKhau_QuocGia;
                    break;

                case "lb_ThemQuocTich_QuocGia":
                    com = comB_QuocTich;
                    break;


                default:
                    break;
                }
                int?x = null;

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

                dtQuocGia = oQuocGia.GetData();

                FillQuocGiaComb();

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewQuocGiaID = 0;
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(timerr.Text))
            {
                pop = new Popup("Please enter everything");
                pop.Show();
            }
            else
            {
                CID.delay = timerr.Text;

                this.Close();
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(Filename.Text) ||
                String.IsNullOrEmpty(Folder.Text))

            {
                pop = new Popup("Please enter everything");
                pop.Show();
            }
            else
            {
                CID.Sfilename  = Filename.Text;
                CID.FolderName = Folder.Text;

                this.Close();
            }
        }
Beispiel #14
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;
            }
        }
Beispiel #15
0
        private void lbl_ThemTonGiao_Click(object sender, EventArgs e)
        {
            UCs.ThemTonGiao oThemTonGiao = new ThemTonGiao("QLNS_ThongTinNV_Phu");
            oThemTonGiao.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tôn giáo", oThemTonGiao);
            fPopup.ShowDialog();
            if (nNewTonGiaoID > 0)
            {
                Label    lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                case "lbl_ThemTonGiao":
                    com = comb_TonGiao;
                    break;


                default:
                    break;
                }
                int?x = null;

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

                dtTonGiao = oTonGiao.GetData();

                com.DataSource    = dtTonGiao;
                com.DisplayMember = "ten_ton_giao";
                com.ValueMember   = "id";

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewTonGiaoID = 0;
            }
        }
Beispiel #16
0
        private void lbl_ThemDanToc_Click(object sender, EventArgs e)
        {
            UCs.ThemDanToc oThemDanToc = new ThemDanToc("QLNS_ThongTinNV_Phu");
            oThemDanToc.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm dân tộc", oThemDanToc);
            fPopup.ShowDialog();
            if (nNewDanTocID > 0)
            {
                Label    lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                case "lbl_ThemDanToc":
                    com = comb_DanToc;
                    break;


                default:
                    break;
                }
                int?x = null;

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

                dtDanToc = oDanToc.GetData();

                com.DataSource    = dtDanToc;
                com.DisplayMember = "ten_dan_toc";
                com.ValueMember   = "id";

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewDanTocID = 0;
            }
        }
Beispiel #17
0
        private void btn_Tim_Click(object sender, EventArgs e)
        {
            string ma_nv  = txt_MaNV.Text == "" ? null : txt_MaNV.Text;
            string ma_hd  = txt_MaHD.Text == "" ? null : txt_MaHD.Text;
            string ho_nv  = txt_Ho.Text == "" ? null : txt_Ho.Text;
            string ten_nv = txt_Ten.Text == "" ? null : txt_Ten.Text;

            try
            {
                dtDSHopDong = oHopDong.Search_Dung_HD(ma_hd, ma_nv, ho_nv, ten_nv);
                if (dtDSHopDong != null)
                {
                    UCs.DSCNVC.eParentUC = DSCNVC.ParentUC.DungHopDong;
                    Forms.Popup frPopup = new Forms.Popup(new UCs.DSCNVC(dtDSHopDong), "QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC");
                    frPopup.ShowDialog();

                    if (strMaNV != null || strMaNV != "")
                    {
                        txt_MaHD.Text     = txt_MaHD_2.Text = strMaHD_Display;
                        txt_MaNV.Text     = txt_MaNV_2.Text = strMaNV;
                        txt_Ho.Text       = strHo;
                        txt_Ten.Text      = strTen;
                        txt_LoaiHD.Text   = strLoaiHD;
                        txt_NgayKy.Text   = strNgayKy;
                        txt_TuNgay.Text   = strNgayHieuLuc;
                        txt_DenNgay.Text  = strNgayHetHan;
                        txt_HoTenNV.Text  = (strHo + " " + strTen).Trim();
                        txt_DonVi.Text    = strDonVi;
                        txt_ChucDanh.Text = strChucDanh;
                        txt_ChucVu.Text   = strChucVu;
                    }
                }
                else
                {
                    MessageBox.Show("Không tìm thấy nhân viên/hợp đồng phù hợp.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch { }
        }
Beispiel #18
0
        private void lb_TimNV_Click(object sender, EventArgs e)
        {
            hitOK    = false;
            m_ma_nv  = new string[0];
            m_ho_ten = new string[0];

            int dv_id = 0;

            for (int i = 0; i < tableLP_ComboTuDV.RowCount; i++)
            {
                ComboBox cbo_DonVi = (ComboBox)tableLP_ComboTuDV.Controls[i];
                if (cbo_DonVi.Text != "")
                {
                    dv_id = Convert.ToInt16(cbo_DonVi.SelectedValue);
                }
                else
                {
                    MessageBox.Show("Vui lòng chọn một đơn vị.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            if (dv_id != 0)
            {
                DataTable dtCNVC = oCNVC.Search_CNVC_by_DonVi(dv_id);

                Forms.Popup frPopup = new Forms.Popup(new UCs.DSCNVC(dtCNVC), "QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC");
                HDQD.UCs.DSCNVC.eParentUC = DSCNVC.ParentUC.MA;
                frPopup.ShowDialog();
            }
            if (hitOK)
            {
                listB_DSNV.Items.Clear();

                //Set_CNVCs_to_LB(m_ma_nv, m_ho_ten, row_count);
                foreach (string item in m_ho_ten)
                {
                    listB_DSNV.Items.Add(item);
                }
            }
        }
Beispiel #19
0
        private void btn_Tim_Click(object sender, EventArgs e)
        {
            string ma_nv = txt_MaNV.Text == "" ? null : txt_MaNV.Text;
            string ma_hd = txt_MaHD.Text == "" ? null : txt_MaHD.Text;
            string ho_nv = txt_Ho.Text == "" ? null : txt_Ho.Text;
            string ten_nv = txt_Ten.Text == "" ? null : txt_Ten.Text;

            try
            {
                dtDSHopDong = oHopDong.Search_Dung_HD(ma_hd, ma_nv, ho_nv, ten_nv);
                if (dtDSHopDong != null)
                {
                    UCs.DSCNVC.eParentUC = DSCNVC.ParentUC.DungHopDong;
                    Forms.Popup frPopup = new Forms.Popup(new UCs.DSCNVC(dtDSHopDong), "QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC");
                    frPopup.ShowDialog();

                    if (strMaNV != null || strMaNV != "")
                    {
                        txt_MaHD.Text = txt_MaHD_2.Text = strMaHD_Display;
                        txt_MaNV.Text = txt_MaNV_2.Text = strMaNV;
                        txt_Ho.Text = strHo;
                        txt_Ten.Text = strTen;
                        txt_LoaiHD.Text = strLoaiHD;
                        txt_NgayKy.Text = strNgayKy;
                        txt_TuNgay.Text = strNgayHieuLuc;
                        txt_DenNgay.Text = strNgayHetHan;
                        txt_HoTenNV.Text = (strHo + " " + strTen).Trim();
                        txt_DonVi.Text = strDonVi;
                        txt_ChucDanh.Text = strChucDanh;
                        txt_ChucVu.Text = strChucVu;
                    }
                }
                else
                {
                    MessageBox.Show("Không tìm thấy nhân viên/hợp đồng phù hợp.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch { }
        }
Beispiel #20
0
        private void btn_Tim_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txt_MaNV.Text) || (!string.IsNullOrWhiteSpace(txt_Ho.Text) && !string.IsNullOrWhiteSpace(txt_Ten.Text)))
            {
                oCNVC.Ho   = txt_Ho.Text.Trim();
                oCNVC.Ten  = txt_Ten.Text.Trim();
                oCNVC.MaNV = string.IsNullOrWhiteSpace(txt_MaNV.Text.Trim()) ? null : txt_MaNV.Text.Trim();
                DataTable dt;

                dt = oCNVC.SearchDataForQD(true);

                if (dt.Rows.Count > 0)
                {
                    Forms.Popup frPopup = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC", new HDQD.UCs.DSCNVC(dt));
                    frPopup.ShowDialog();
                    if (HDQD.Program.ma_nv != "")
                    {
                        gb_Filter.Enabled = gb_Info.Enabled = true;
                        oCNVC.MaNV        = txt_MaNV.Text = HDQD.Program.ma_nv;
                        txt_Ho.Text       = HDQD.Program.ho;
                        txt_Ten.Text      = HDQD.Program.ten;

                        GetThamNienData();
                        RegenerateChart();
                    }
                }
                else
                {
                    MessageBox.Show("Nhân viên này khòng còn hợp đồng hoặc không tồn tại trong hệ thống.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else
            {
                MessageBox.Show("Xin vui lòng cung cấp mã nhân viên hoặc họ tên", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #21
0
        private void lbl_ThemDanToc_Click(object sender, EventArgs e)
        {
            UCs.ThemDanToc oThemDanToc = new ThemDanToc("QLNS_ThongTinNV_Phu");
            oThemDanToc.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm dân tộc", oThemDanToc);
            fPopup.ShowDialog();
            if (nNewDanTocID > 0)
            {
                Label lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                    case "lbl_ThemDanToc":
                        com = comb_DanToc;
                        break;

                   
                    default:
                        break;
                }
                int? x = null;

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

                dtDanToc = oDanToc.GetData();

                com.DataSource = dtDanToc;
                com.DisplayMember = "ten_dan_toc";
                com.ValueMember = "id";

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewDanTocID = 0;
            }
        }
Beispiel #22
0
        private void lbl_ThemTinhNoiSinh_Click(object sender, EventArgs e)
        {
            UCs.ThemTinhTP oThemTinhTP = new ThemTinhTP();
            oThemTinhTP.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tỉnh thành phố", oThemTinhTP);
            fPopup.ShowDialog();
            if (nNewTinhTPID > 0)
            {
                Label lb = (Label)sender;
                int? x = null;
                if (lb.Name == "lbl_ThemTinhNoiSinh")
                {
                    if (comB_QueTinh.SelectedValue != Convert.DBNull && comB_QueTinh.SelectedValue != null)
                        x = Convert.ToInt16(comB_QueTinh.SelectedValue);
                    else
                        x = null;
                }
                else if (lb.Name == "lbl_ThemTinhQue")
                {
                    if (comB_NoiSinhTinh.SelectedValue != Convert.DBNull && comB_NoiSinhTinh.SelectedValue != null)
                        x = Convert.ToInt16(comB_NoiSinhTinh.SelectedValue);
                    else
                        x = null;
                }

                dtTinhTP = oTinhTP.GetData();
                DataTable dtTinhTP2 = dtTinhTP.Copy();

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

                comB_QueTinh.DataSource = dtTinhTP2;
                comB_QueTinh.DisplayMember = "ten_tinh_tp";
                comB_QueTinh.ValueMember = "id";

                if (QLNS_HienThiThongTin.bAddFlag)  // dang them thi chi can load vao thoi
                {
                    comB_NoiSinhTinh.SelectedValue = nNewTinhTPID;
                    comB_QueTinh.SelectedValue = nNewTinhTPID;
                }
                else
                {                    
                    if (lb.Name == "lbl_ThemTinhNoiSinh")
                    {
                        comB_NoiSinhTinh.SelectedValue = nNewTinhTPID;
                        comB_QueTinh.SelectedValue = x;
                    }
                    else if (lb.Name == "lbl_ThemTinhQue")
                    {
                        comB_QueTinh.SelectedValue = nNewTinhTPID;
                        comB_NoiSinhTinh.SelectedValue = x;
                    }

                }
                nNewTinhTPID = 0;

                
            }
        }
Beispiel #23
0
        private void lbl_ChọnTinhQue_Click(object sender, EventArgs e)
        {
            ds_tinh_tp = "";

            UCs.QLNS_DSTinh oDSTinhTP = new QLNS_DSTinh();
            oDSTinhTP.Dock = DockStyle.Fill;
            fPopup = new Forms.Popup("Danh sách tỉnh thành phố", oDSTinhTP);
            fPopup.ShowDialog();

            txt_QueQuanTinh.Text = ds_tinh_tp;
        }
Beispiel #24
0
        private void btn_Tim_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txt_MaNV.Text) || (!string.IsNullOrWhiteSpace(txt_Ho.Text) && !string.IsNullOrWhiteSpace(txt_Ten.Text)))
            {
                oCNVC.Ho = txt_Ho.Text.Trim();
                oCNVC.Ten = txt_Ten.Text.Trim();
                oCNVC.MaNV = string.IsNullOrWhiteSpace(txt_MaNV.Text.Trim()) ? null : txt_MaNV.Text.Trim();
                DataTable dt;

                dt = oCNVC.SearchDataForQD(true);

                if (dt.Rows.Count > 0)
                {

                    Forms.Popup frPopup = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC", new HDQD.UCs.DSCNVC(dt));
                    frPopup.ShowDialog();
                    if (HDQD.Program.ma_nv != "")
                    {
                        gb_Filter.Enabled = gb_Info.Enabled = true;
                        oCNVC.MaNV = txt_MaNV.Text = HDQD.Program.ma_nv;
                        txt_Ho.Text = HDQD.Program.ho;
                        txt_Ten.Text = HDQD.Program.ten;

                        GetThamNienData();
                        RegenerateChart();
                    }
                }
                else
                {
                    MessageBox.Show("Nhân viên này khòng còn hợp đồng hoặc không tồn tại trong hệ thống.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else
            {
                MessageBox.Show("Xin vui lòng cung cấp mã nhân viên hoặc họ tên", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #25
0
        private void dtgv_HopDong_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dtgv_HopDong.CurrentRow != null)
            {
                #region Old
                /*
                DataGridViewRow row = dtgv_HopDong.CurrentRow;
                Business.HDQD.CNVC_HopDong m_oHopDong = new Business.HDQD.CNVC_HopDong();
                m_oHopDong.ID = Convert.ToInt16(row.Cells["id"].Value.ToString());
                m_oHopDong.Ma_NV = row.Cells["ma_nv"].Value.ToString();
                m_oHopDong.Ma_Hop_Dong = row.Cells["ma_hop_dong"].Value.ToString();
                m_oHopDong.Ma_Loai_HD = Convert.ToInt16(row.Cells["ma_loai_hd"].Value.ToString());
                m_oHopDong.Loai_Hop_Dong = row.Cells["loai_hop_dong"].Value.ToString();
                m_oHopDong.Co_Thoi_Han = Convert.ToBoolean(row.Cells["co_thoi_han"].Value.ToString());
                if (row.Cells["ngay_ky"].Value.ToString() != "")
                    m_oHopDong.Ngay_Ky = Convert.ToDateTime(row.Cells["ngay_ky"].Value.ToString());
                if (row.Cells["ngay_hieu_luc"].Value.ToString() != "")
                    m_oHopDong.Ngay_Hieu_Luc = Convert.ToDateTime(row.Cells["ngay_hieu_luc"].Value.ToString());
                if (row.Cells["ngay_het_han"].Value.ToString() != "")
                    m_oHopDong.Ngay_Het_Han = Convert.ToDateTime(row.Cells["ngay_het_han"].Value.ToString());
                if (row.Cells["chuc_vu_chinh_id"].Value.ToString() != "")
                    m_oHopDong.Chuc_Vu_ID = Convert.ToInt16(row.Cells["chuc_vu_chinh_id"].Value.ToString());
                m_oHopDong.Chuc_Vu = row.Cells["ten_chuc_vu"].Value.ToString();
                if (row.Cells["chuc_danh_chinh_id"].Value.ToString() != "")
                    m_oHopDong.Chuc_Danh_ID = Convert.ToInt16(row.Cells["chuc_danh_chinh_id"].Value.ToString());
                m_oHopDong.Chuc_Danh = row.Cells["ten_chuc_danh"].Value.ToString();
                if (row.Cells["don_vi_chinh_id"].Value.ToString() != "")
                    m_oHopDong.Don_Vi_ID = Convert.ToInt16(row.Cells["don_vi_chinh_id"].Value.ToString());
                m_oHopDong.Don_Vi = row.Cells["ten_don_vi"].Value.ToString();
                m_oHopDong.Tinh_Trang = Convert.ToBoolean(row.Cells["tinh_trang"].Value.ToString());
                m_oHopDong.Ghi_Chu = row.Cells["ghi_chu"].Value.ToString();

                HDQD.UCs.HopDong hopdong = new HDQD.UCs.HopDong(m_oHopDong);
                //UCs.HopDong hopdong = new HopDong(oHopDong);
                Forms.Popup popup = new Forms.Popup("QUẢN LÝ NHÂN SỰ - HỢP ĐỒNG", hopdong);
                popup.Show();*/
                #endregion
               

                DataGridViewRow row = dtgv_HopDong.CurrentRow;
                oHopDong = new Business.HDQD.CNVC_HopDong();
                oHopDong.ID = Convert.ToInt16(row.Cells["id"].Value.ToString());
                oHopDong.Ma_NV = row.Cells["ma_nv"].Value.ToString();
                oHopDong.Ma_Tuyen_Dung = row.Cells["ma_hop_dong"].Value.ToString();
                oHopDong.La_QD_Tiep_Nhan = false;
                oHopDong.Ma_Loai_HD = Convert.ToInt16(row.Cells["ma_loai_hd"].Value.ToString());
                oHopDong.Loai_Hop_Dong = row.Cells["loai_hop_dong"].Value.ToString();
                oHopDong.Co_Thoi_Han = Convert.ToBoolean(row.Cells["co_thoi_han"].Value.ToString());
                if (row.Cells["ngay_ky"].Value.ToString() != "")
                    oHopDong.Ngay_Ky = Convert.ToDateTime(row.Cells["ngay_ky"].Value.ToString());
                if (row.Cells["ngay_hieu_luc"].Value.ToString() != "")
                    oHopDong.Ngay_Hieu_Luc = Convert.ToDateTime(row.Cells["ngay_hieu_luc"].Value.ToString());
                if (row.Cells["ngay_het_han"].Value.ToString() != "")
                    oHopDong.Ngay_Het_Han = Convert.ToDateTime(row.Cells["ngay_het_han"].Value.ToString());
                if (row.Cells["chuc_vu_chinh_id"].Value.ToString() != "")
                    oHopDong.Chuc_Vu_ID = Convert.ToInt16(row.Cells["chuc_vu_chinh_id"].Value.ToString());
                oHopDong.Chuc_Vu = row.Cells["ten_chuc_vu"].Value.ToString();

                if (row.Cells["chuc_danh_chinh_id"].Value.ToString() != "")
                    oHopDong.Chuc_Danh_ID = Convert.ToInt16(row.Cells["chuc_danh_chinh_id"].Value.ToString());
                oHopDong.Chuc_Danh = row.Cells["ten_chuc_danh"].Value.ToString();

                if (row.Cells["don_vi_chinh_id"].Value.ToString() != "")
                    oHopDong.Don_Vi_ID = Convert.ToInt16(row.Cells["don_vi_chinh_id"].Value.ToString());
                oHopDong.Don_Vi = row.Cells["ten_don_vi"].Value.ToString();
                oHopDong.Tinh_Trang = Convert.ToBoolean(row.Cells["tinh_trang"].Value.ToString());
                oHopDong.Ghi_Chu = row.Cells["ghi_chu"].Value.ToString();

                if (row.Cells["tham_nien_nang_bac"].Value.ToString() != "")
                    oHopDong.Tham_nien_nang_bac = Convert.ToBoolean(row.Cells["tham_nien_nang_bac"].Value.ToString());
                else
                    oHopDong.Tham_nien_nang_bac = false;
                if (row.Cells["tham_nien_gd"].Value.ToString() != "")
                    oHopDong.Tham_nien_nha_giao = Convert.ToBoolean(row.Cells["tham_nien_gd"].Value.ToString());
                else
                    oHopDong.Tham_nien_nha_giao = false;

                if (row.Cells["dong_bao_hiem"].Value.ToString() != "")
                    oHopDong.Dong_bao_hiem = Convert.ToBoolean(row.Cells["dong_bao_hiem"].Value.ToString());
                else
                    oHopDong.Dong_bao_hiem = false;

                #region Luong Info
                oHopDong.Khoan_or_HeSo = Convert.ToBoolean(row.Cells["tinh_trang"].Value.ToString());
                if (row.Cells["luong_khoan"].Value.ToString() != "")
                    oHopDong.Luong_Khoan = Convert.ToDouble(row.Cells["luong_khoan"].Value.ToString());
                if (row.Cells["ngach_bac_heso_id"].Value.ToString() != "")
                    oHopDong.BacHeSo_ID = Convert.ToInt16(row.Cells["ngach_bac_heso_id"].Value.ToString());
                if (row.Cells["phan_tram_huong"].Value.ToString() != "")
                    oHopDong.PhanTramHuong = Convert.ToDouble(row.Cells["phan_tram_huong"].Value.ToString());
                #endregion

                oHopDong.Co_Phu_Cap = Convert.ToBoolean(row.Cells["co_phu_cap"].Value.ToString());

                HDQD.UCs.HopDong hopdong = new HDQD.UCs.HopDong(oHopDong); 
                Forms.Popup popup = new Forms.Popup("QUẢN LÝ NHÂN SỰ - HỢP ĐỒNG", hopdong);
                popup.Show();
            }
        }
Beispiel #26
0
        private void btn_Nhap_Click(object sender, EventArgs e)
        {
            if (CheckInputData())
            {
                try
                {
                    oKiemNhiem               = new Business.HDQD.KiemNhiem();
                    oKiemNhiem.MaQuyetDinh   = thongTinQuyetDinh1.txt_MaQD.Text.Trim();
                    oKiemNhiem.Ten           = thongTinQuyetDinh1.txt_TenQD.Text.Trim();
                    oKiemNhiem.LoaiQuyetDinh = Convert.ToInt32(thongTinQuyetDinh1.comB_Loai.SelectedValue.ToString());
                    oKiemNhiem.NgayKy        = thongTinQuyetDinh1.dTP_NgayKy.Value;
                    oKiemNhiem.NgayHieuLucQD = thongTinQuyetDinh1.dTP_NgayHieuLuc.Value;
                    if (thongTinQuyetDinh1.dTP_NgayHetHan.Checked)
                    {
                        oKiemNhiem.NgayHetHanQD = thongTinQuyetDinh1.dTP_NgayHetHan.Value;
                    }
                    else
                    {
                        oKiemNhiem.NgayHetHanQD = null;
                    }
                    oKiemNhiem.MoTa = thongTinQuyetDinh1.rTB_MoTa.Text.Trim();
                    oKiemNhiem.Path = null;

                    #region Bo Nhiem Cong Tac
                    qtr_ctac_id  = new List <int>();
                    ma_nv        = new List <string>();
                    don_vi_id    = new List <int>();
                    chuc_vu_id   = new List <int>();
                    chuc_danh_id = new List <int>();
                    tu_ngay      = new List <DateTime>();
                    den_ngay     = new List <DateTime>();

                    foreach (DataRow dr in dtDSBoNhiem.Rows)
                    {
                        DateTime?m_dt_dv_denngay       = null;
                        DateTime?m_dt_dieudong_denngay = null;
                        bool     m_cb_dieudong_denngay = false;

                        if (dr["den_ngay"].ToString() == "")
                        {
                            m_dt_dieudong_denngay = null;
                            m_cb_dieudong_denngay = false;
                        }
                        else
                        {
                            m_dt_dieudong_denngay = Convert.ToDateTime(dr["den_ngay"].ToString());
                            m_cb_dieudong_denngay = true;
                        }

                        int m_selected_donvi = Convert.ToInt32(dr["don_vi_id"].ToString());
                        var result           = (from c in dtDonVi.AsEnumerable()
                                                where c.Field <int>("id") == m_selected_donvi
                                                select new { den_ngay = c.Field <DateTime?>("den_ngay") }
                                                ).ToList();
                        DataTable dt = ToDataTable(result);
                        if (dt.Rows[0]["den_ngay"].ToString() != "")
                        {
                            m_dt_dv_denngay = Convert.ToDateTime(dt.Rows[0]["den_ngay"].ToString());
                        }
                        else
                        {
                            m_dt_dv_denngay = null;
                        }

                        if (m_dt_dieudong_denngay > m_dt_dv_denngay || (m_dt_dieudong_denngay == null && m_dt_dv_denngay != null)) //insert multiple don vi
                        {
                            #region Insert multiple Don vi
                            DataTable dt_donvi_new = oDonVi.GetDonVi_New(m_selected_donvi);
                            if (dt_donvi_new.Rows.Count > 0)
                            {
                                string loai_qd = (from c in dt_donvi_new.AsEnumerable()
                                                  select c.Field <string>("ten_loai_qd")).ElementAt(0).ToString();
                                string ten_qd = (from c in dt_donvi_new.AsEnumerable()
                                                 select c.Field <string>("ten_qd")).ElementAt(0).ToString();
                                string ma_qd = (from c in dt_donvi_new.AsEnumerable()
                                                select c.Field <string>("ma_quyet_dinh")).ElementAt(0).ToString();
                                DateTime ngay_hieu_luc_qd = (from c in dt_donvi_new.AsEnumerable()
                                                             select c.Field <DateTime>("ngay_hieu_luc_qd")).ElementAt(0);

                                MessageBox.Show("Loại quyết định: " + loai_qd + "\nMã quyết định: " + ma_qd + "\nTên quyết định: " + ten_qd + "\nNgày hiệu lực: " + ngay_hieu_luc_qd.ToString("d", CultureInfo.CreateSpecificCulture("vi-VN")) + "\nVui lòng chọn đơn vị phù hợp.",
                                                "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                                int    m_qtr_congtac_id_ori = Convert.ToInt32(dr["qtr_ctac_id"].ToString());
                                string m_ma_nv_ori          = dr["ma_nv"].ToString();

                                qtr_ctac_id.Add(m_qtr_congtac_id_ori);
                                ma_nv.Add(m_ma_nv_ori);
                                don_vi_id.Add(Convert.ToInt32(dr["don_vi_id"].ToString()));
                                chuc_vu_id.Add(Convert.ToInt32(dr["chuc_vu_id"].ToString()));
                                chuc_danh_id.Add(Convert.ToInt32(dr["chuc_danh_id"].ToString()));
                                tu_ngay.Add(Convert.ToDateTime(dr["tu_ngay"].ToString()).Date);
                                den_ngay.Add(ngay_hieu_luc_qd.AddDays(-1));

                                Forms.Popup frPopup = new Forms.Popup(new UCs.DonViCu(dt_donvi_new, m_cb_dieudong_denngay, m_dt_dieudong_denngay, m_qtr_congtac_id_ori, m_ma_nv_ori), "Danh sách đơn vị");
                                frPopup.ShowDialog();
                            }


                            #endregion
                        }
                        else if (m_dt_dieudong_denngay <= m_dt_dv_denngay || m_dt_dv_denngay == null) //insert 1 don vi
                        {
                            qtr_ctac_id.Add(Convert.ToInt32(dr["qtr_ctac_id"].ToString()));
                            ma_nv.Add(dr["ma_nv"].ToString());
                            don_vi_id.Add(Convert.ToInt32(dr["don_vi_id"].ToString()));
                            chuc_vu_id.Add(Convert.ToInt32(dr["chuc_vu_id"].ToString()));
                            chuc_danh_id.Add(Convert.ToInt32(dr["chuc_danh_id"].ToString()));

                            tu_ngay.Add(Convert.ToDateTime(dr["tu_ngay"].ToString()).Date);

                            if (dr["den_ngay"].ToString() == "")
                            {
                                den_ngay.Add(Convert.ToDateTime("01/01/1901").Date);
                            }
                            else
                            {
                                den_ngay.Add(Convert.ToDateTime(dr["den_ngay"].ToString()).Date);
                            }
                        }
                    }

                    #endregion

                    if (MessageBox.Show("Bạn thực sự muốn thêm quyết định bổ nhiệm cho (các) nhân viên này?", "Hỏi", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        if (oKiemNhiem.AddDieuDong(qtr_ctac_id.ToArray(), ma_nv.ToArray(), don_vi_id.ToArray(), chuc_vu_id.ToArray(), chuc_danh_id.ToArray(), tu_ngay.ToArray(), den_ngay.ToArray()))
                        {
                            MessageBox.Show("Thêm thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            //ResetInterface();
                        }
                        else
                        {
                            MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Có lỗi xảy ra.\n" + ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("Vui lòng nhập đầy đủ thông tin.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #27
0
        private void lbl_ThemLoaiFile_Click(object sender, EventArgs e)
        {
            HDQD.UCs.ThemLoaiFile oThemLoaiFile = new HDQD.UCs.ThemLoaiFile("QLNS_TapTin");
            oThemLoaiFile.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm nhóm tập tin", oThemLoaiFile);
            fPopup.ShowDialog();

            Load_Bind_Combo();
        }
Beispiel #28
0
 private void lb_Them_ChuBien_Click(object sender, EventArgs e)
 {
     Forms.Popup f = new Forms.Popup("QUẢN LÝ NHÂN SỰ - THÊM CHỦ BIÊN", new NCKH_ThemNguoi());
     f.ShowDialog();
 }
Beispiel #29
0
 private void lb_BoiDuong_TapTin_Click(object sender, EventArgs e)
 {
     HDQD.UCs.DSTapTin oDSTapTin = new HDQD.UCs.DSTapTin("QLNS_BoiDuong", CNVC_DaoTaoBoiDuong.oFile_BoiDuong);
     oDSTapTin.txt_MaTapTin.Enabled = false;
     Form f = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH TẬP TIN", oDSTapTin);
     f.ShowDialog();
 }
Beispiel #30
0
        private void lbl_ThemQuocGia_Click(object sender, EventArgs e)
        {
            UCs.ThemQuocGia oThemQuocGia = new ThemQuocGia("QLNS_ThongTinNV");
            oThemQuocGia.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm quốc gia", oThemQuocGia);
            fPopup.ShowDialog();
            if (nNewQuocGiaID > 0)
            {
                int? x = null;

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

                dtQuocGia = oQuocGia.GetData();

                comB_QuocGia.DataSource = dtQuocGia;
                comB_QuocGia.DisplayMember = "ten_quoc_gia";
                comB_QuocGia.ValueMember = "id";

                if (x!= null)
                {
                    comB_QuocGia.SelectedValue = x;
                }
                nNewQuocGiaID = 0;


            }
        }
Beispiel #31
0
 private void lbl_ThemLoaiFile_Click(object sender, EventArgs e)
 {
     UCs.ThemLoaiFile oThemLoaiFile = new ThemLoaiFile("DSTapTin");
     oThemLoaiFile.Dock = DockStyle.Fill;
     Forms.Popup fPopup = new Forms.Popup(oThemLoaiFile, "Thêm nhóm tập tin");
     fPopup.ShowDialog();
     if (cb_LoaiTT.SelectedItem != null)
     {
         int selectingidx = Convert.ToInt16(cb_LoaiTT.SelectedValue);
     }
     Get_LoadFileGroupTable();
     
 }
Beispiel #32
0
        private void lbl_ThemQuocGia_Click(object sender, EventArgs e)
        {
            UCs.ThemQuocGia oThemQuocGia = new ThemQuocGia("QLNS_ThongTinNV_Phu");
            oThemQuocGia.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm quốc gia", oThemQuocGia);
            fPopup.ShowDialog();
            if (nNewQuocGiaID > 0)
            {
                Label lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                    case "lbl_ThemQueQuan_QuocGia":
                        com = comB_QueQuan_QuocGia;
                        break;

                    case "lbl_ThemNoiSinh_QuocGia":
                        com = comB_NoiSinh_QuocGia;
                        break;

                    case "lbl_ThemQuocGia_HoKhau":
                        com = comB_HoKhau_QuocGia;
                        break;

                    case "lb_ThemQuocTich_QuocGia":
                        com = comB_QuocTich;
                        break;
                        

                    default:
                        break;
                }
                int? x = null;

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

                dtQuocGia = oQuocGia.GetData();

                FillQuocGiaComb();

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewQuocGiaID = 0;
            }
        }
Beispiel #33
0
        private void btn_Them_Click(object sender, EventArgs e)
        {
            if (comB_Loai.Text != "")
            {
                #region comment do o su dung index nua
                //int index = Convert.ToInt16(comB_Loai.SelectedValue);
                //HDQD.Forms.Popup f;
                //switch (index)
                //{
                //    case 5: //tách đơn vị
                //        f = new Forms.Popup(new HDQD.UCs.M_A(true), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TÁCH ĐƠN VỊ");
                //        f.ShowDialog();
                //        break;
                //    case 9: //gộp đơn vị
                //        f = new Forms.Popup(new HDQD.UCs.M_A(false), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH GỘP ĐƠN VỊ");
                //        f.ShowDialog();
                //        break;
                //    case 1:
                //    case 2:
                //    case 3:
                //        f = new Forms.Popup(new HDQD.UCs.BoNhiem(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH BỔ NHIỆM");
                //        f.ShowDialog();
                //        break;
                //    case 4:
                //        f = new Forms.Popup(new HDQD.UCs.DoiThongTinDV(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH ĐỔI THÔNG TIN ĐƠN VỊ");
                //        f.ShowDialog();
                //        break;
                //    case 6:
                //    case 7:
                //        f = new Forms.Popup(new HDQD.UCs.ThoiBoNhiem(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH THÔI BỔ NHIỆM");
                //        f.ShowDialog();
                //        break;
                //    case 8:
                //        f = new Forms.Popup(new HDQD.UCs.QuyetDinhPhuCap(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH CHUNG");
                //        f.ShowDialog();
                //        break;

                //    default:
                //        break;
                //}
                #endregion

                string           SelectedText = Convert.ToString(comB_Loai.Text);
                HDQD.Forms.Popup f;
                if (SelectedText == "Kiêm nhiệm" || SelectedText == "Bổ nhiệm" || SelectedText == "Điều động" ||
                    SelectedText == "Đi du học" || SelectedText == "Nghỉ thai sản" || SelectedText == "Nghỉ không lương" ||
                    SelectedText == "Đi du lịch" || SelectedText == "Thôi việc" || SelectedText == "Nghỉ hưu")
                {
                    f = new Forms.Popup(new HDQD.UCs.QDChung(SelectedText), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH " + SelectedText.ToUpper());
                    f.ShowDialog();
                }
                else if (SelectedText == "Đổi thông tin đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.DoiThongTinDV(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH ĐỔI THÔNG TIN ĐƠN VỊ");
                    f.ShowDialog();
                }
                else if (SelectedText == "Tách đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.M_A(true), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TÁCH ĐƠN VỊ");
                    f.ShowDialog();
                }
                else if (SelectedText == "Gộp đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.M_A(false), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH GỘP ĐƠN VỊ");
                    f.ShowDialog();
                }
                else if (SelectedText == "Tiếp nhận")
                {
                    f = new Forms.Popup(new HDQD.UCs.TiepNhan(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TIẾP NHẬN");
                    f.ShowDialog();
                }
                else if (SelectedText == "Quyết định chung")
                {
                    f = new Forms.Popup(new HDQD.UCs.QDChung(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH CHUNG");
                    f.ShowDialog();
                }
                else if (SelectedText == "Thành lập đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.ThanhLapDonVi(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH THÀNH LẬP ĐƠN VỊ");
                    f.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("Vui lòng chọn một loại quyết định", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #34
0
 private void btn_Them_Click(object sender, EventArgs e)
 {
     UCs.HopDong hopdong = new HopDong();
     Forms.Popup popup   = new Forms.Popup(hopdong, "QUẢN LÝ NHÂN SỰ - HỢP ĐỒNG");
     popup.ShowDialog();
 }
Beispiel #35
0
 private void btn_Them_Click(object sender, EventArgs e)
 {
     UCs.HopDong hopdong = new HopDong();
     Forms.Popup popup = new Forms.Popup(hopdong, "QUẢN LÝ NHÂN SỰ - HỢP ĐỒNG");
     popup.ShowDialog();
 }
Beispiel #36
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;
            }
        }
Beispiel #37
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;
            }
        }
Beispiel #38
0
        private void lbl_ThemQuocGia_Click(object sender, EventArgs e)
        {
            UCs.ThemQuocGia oThemQuocGia = new ThemQuocGia("QLNS_DaoTaoBoiDuong");
            oThemQuocGia.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm quốc gia", oThemQuocGia);
            fPopup.ShowDialog();
            if (nNewQuocGiaID > 0)
            {
                Label lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                    case "lbl_ThemQuocGia_DaoTao":
                        com = comB_QuocGia_DaoTao;
                        break;

                    case "lbl_ThemQuocGia_BoiDuong":
                        com = comB_QuocGia_BoiDuong;
                        break;

                    default:
                        break;
                }
                int? x = null;

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

                dtQuocGia = oQuocGia.GetData();

                com.DataSource = dtQuocGia;
                com.DisplayMember = "ten_quoc_gia";
                com.ValueMember = "id";

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewQuocGiaID = 0;
            }
        }
Beispiel #39
0
        private void lbl_ThemTonGiao_Click(object sender, EventArgs e)
        {
            UCs.ThemTonGiao oThemTonGiao = new ThemTonGiao("QLNS_ThongTinNV_Phu");
            oThemTonGiao.Dock = DockStyle.Fill;
            Forms.Popup fPopup = new Forms.Popup("Thêm tôn giáo", oThemTonGiao);
            fPopup.ShowDialog();
            if (nNewTonGiaoID > 0)
            {
                Label lbl = ((Label)sender);
                ComboBox com = null;
                switch (lbl.Name)
                {
                    case "lbl_ThemTonGiao":
                        com = comb_TonGiao;
                        break;


                    default:
                        break;
                }
                int? x = null;

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

                dtTonGiao = oTonGiao.GetData();

                com.DataSource = dtTonGiao;
                com.DisplayMember = "ten_ton_giao";
                com.ValueMember = "id";

                if (x != null)
                {
                    com.SelectedValue = x;
                }
                nNewTonGiaoID = 0;
            }
        }
Beispiel #40
0
        private void btn_Tim_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txt_MaNV.Text) || (!string.IsNullOrWhiteSpace(txt_Ho.Text) && !string.IsNullOrWhiteSpace(txt_Ten.Text)))
            {
                oCNVC.Ho = txt_Ho.Text.Trim();
                oCNVC.Ten = txt_Ten.Text.Trim();
                oCNVC.MaNV = string.IsNullOrWhiteSpace(txt_MaNV.Text.Trim()) ? null : txt_MaNV.Text.Trim();
                DataTable dt;

                try
                {
                    dt = oCNVC.SearchDataForQD(true);

                    if (dt != null && dt.Rows.Count > 0)
                    {

                        Forms.Popup frPopup = new Forms.Popup("QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC", new HDQD.UCs.DSCNVC(dt));
                        frPopup.ShowDialog();
                        Get_BindResult();
                    }
                    else
                    {
                        MessageBox.Show("Nhân viên này khòng còn hợp đồng hoặc không tồn tại trong hệ thống.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                catch (Exception)
                {
                    
                }
                
            }
            else
            {
                MessageBox.Show("Xin vui lòng cung cấp mã nhân viên hoặc họ tên", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #41
0
        private void btn_Them_Click(object sender, EventArgs e)
        {
            if (CheckInputData())
            {
                oHopdong = new Business.HDQD.CNVC_HopDong();

                DateTime dtp_donvi_denngay = DateTime.ParseExact(txt_DenNgay_DV.Text, "dd/MM/yyyy", null);
                if (dtp_DenNgay.Checked == false || dtp_DenNgay.Value > dtp_donvi_denngay)
                {
                    #region Insert multiple donvi
                    int selected_donvi = Convert.ToInt32(comB_DonVi.SelectedValue);

                    DataTable dt_donvi_new = oDonvi.GetDonVi_New(selected_donvi);

                    if (dt_donvi_new.Rows.Count > 0)
                    {
                        string loai_qd = (from c in dt_donvi_new.AsEnumerable()
                                          select c.Field <string>("ten_loai_qd")).ElementAt(0).ToString();
                        string ten_qd = (from c in dt_donvi_new.AsEnumerable()
                                         select c.Field <string>("ten_qd")).ElementAt(0).ToString();
                        string ma_qd = (from c in dt_donvi_new.AsEnumerable()
                                        select c.Field <string>("ma_quyet_dinh")).ElementAt(0).ToString();
                        DateTime ngay_hieu_luc_qd = (from c in dt_donvi_new.AsEnumerable()
                                                     select c.Field <DateTime>("ngay_hieu_luc_qd")).ElementAt(0);

                        MessageBox.Show("Loại quyết định: " + loai_qd + "\nMã quyết định: " + ma_qd + "\nTên quyết định: " + ten_qd + "\nNgày hiệu lực: " + ngay_hieu_luc_qd.ToString("d", CultureInfo.CreateSpecificCulture("vi-VN")) + "\nVui lòng chọn đơn vị phù hợp.",
                                        "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                        int m_chuc_vu_ori   = -1;
                        int m_chuc_danh_ori = -1;
                        if (comB_ChucVu.Text != "")
                        {
                            m_chuc_vu_ori = Convert.ToInt32(comB_ChucVu.SelectedValue.ToString());
                        }
                        else
                        {
                            m_chuc_vu_ori = -1;
                        }

                        if (comB_ChucDanh.Text != "")
                        {
                            m_chuc_danh_ori = Convert.ToInt32(comB_ChucDanh.SelectedValue.ToString());
                        }
                        else
                        {
                            m_chuc_danh_ori = -1;
                        }

                        Forms.Popup frPopup = new Forms.Popup(new UCs.DonViCu(dt_donvi_new, dtp_DenNgay.Checked, dtp_DenNgay.Value, selected_donvi, m_chuc_vu_ori, m_chuc_danh_ori), "Danh sách đơn vị");
                        frPopup.ShowDialog();

                        if (nSelectedDonViID.Count() == nSelectedChucDanhID.Count() && nSelectedDonViID.Count() == nSelectedChucVuID.Count())
                        {
                            GatherInfo();
                            if (nChange_DenNgay == true)
                            {
                                oHopdong.Ngay_Het_Han = ndtp_DenNgay_Change;
                            }
                            try
                            {
                                if (MessageBox.Show("Bạn thực sự muốn thêm hợp đồng cho nhân viên này?", "Hỏi", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                                {
                                    if (oHopdong.Add_HopDongOld(nSelectedDonViID, nSelectedChucVuID, nSelectedChucDanhID))
                                    {
                                        MessageBox.Show("Thêm thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                        ResetInterface();
                                    }
                                    else
                                    {
                                        MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                    }
                                }
                            }
                            catch (Exception)
                            {
                                MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                        else
                        {
                            MessageBox.Show("Có lỗi xảy ra! Vui lòng kiểm tra lại thông tin.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                    }
                    else
                    {
                        try
                        {
                            if (MessageBox.Show("Không thể tìm thấy đơn vị mới hơn đơn vị được chọn, và thời gian hợp đồng kết thúc lớn hơn thời gian đơn vị ngừng hoạt động. Bạn có muốn thay đổi thời gian hợp đồng kết thúc bằng thời gian đơn vị ngừng hoạt động?", "Hỏi", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                            {
                                GatherInfo();
                                oHopdong.Ngay_Het_Han = dtp_donvi_denngay; //update ngay het han = ngay het han cua don vi
                                oHopdong.Don_Vi_ID    = Convert.ToInt16(comB_DonVi.SelectedValue);

                                if (comB_ChucDanh.Text != "")
                                {
                                    oHopdong.Chuc_Danh_ID = Convert.ToInt16(comB_ChucDanh.SelectedValue);
                                }
                                else
                                {
                                    oHopdong.Chuc_Danh_ID = null;
                                }

                                if (comB_ChucVu.Text != "")
                                {
                                    oHopdong.Chuc_Vu_ID = Convert.ToInt16(comB_ChucVu.SelectedValue);
                                }
                                else
                                {
                                    oHopdong.Chuc_Vu_ID = null;
                                }

                                try
                                {
                                    if (MessageBox.Show("Bạn thực sự muốn thêm hợp đồng cho nhân viên này?", "Hỏi", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                                    {
                                        if (oHopdong.Add_wLuong_PhuCap())
                                        {
                                            MessageBox.Show("Thêm thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                            ResetInterface();
                                        }
                                        else
                                        {
                                            MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                        }
                                    }
                                }
                                catch (Exception)
                                {
                                    MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show("Có lỗi xảy ra!" + ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }

                    #endregion
                }
                else //Insert 1 donvi
                {
                    GatherInfo();
                    oHopdong.Don_Vi_ID = Convert.ToInt16(comB_DonVi.SelectedValue);

                    if (comB_ChucDanh.Text != "")
                    {
                        oHopdong.Chuc_Danh_ID = Convert.ToInt16(comB_ChucDanh.SelectedValue);
                    }
                    else
                    {
                        oHopdong.Chuc_Danh_ID = null;
                    }

                    if (comB_ChucVu.Text != "")
                    {
                        oHopdong.Chuc_Vu_ID = Convert.ToInt16(comB_ChucVu.SelectedValue);
                    }
                    else
                    {
                        oHopdong.Chuc_Vu_ID = null;
                    }

                    try
                    {
                        if (MessageBox.Show("Bạn thực sự muốn thêm hợp đồng cho nhân viên này?", "Hỏi", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                        {
                            if (oHopdong.Add_wLuong_PhuCap())
                            {
                                MessageBox.Show("Thêm thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                ResetInterface();
                            }
                            else
                            {
                                MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                    }
                    catch (Exception)
                    {
                        MessageBox.Show("Thao tác thêm thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            else
            {
                MessageBox.Show("Có lỗi xảy ra! Vui lòng kiểm tra lại thông tin.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #42
0
 private void lb_Them_ChuBien_Click(object sender, EventArgs e)
 {
     Forms.Popup f = new Forms.Popup("QUẢN LÝ NHÂN SỰ - THÊM CHỦ BIÊN", new NCKH_ThemNguoi());
     f.ShowDialog();
 }
        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;
            }
        }
Beispiel #44
0
        private void btn_Them_Click(object sender, EventArgs e)
        {
            if (comB_Loai.Text != "")
            {

                #region comment do o su dung index nua
                //int index = Convert.ToInt16(comB_Loai.SelectedValue);
                //HDQD.Forms.Popup f;
                //switch (index)
                //{
                //    case 5: //tách đơn vị
                //        f = new Forms.Popup(new HDQD.UCs.M_A(true), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TÁCH ĐƠN VỊ");
                //        f.ShowDialog();
                //        break;
                //    case 9: //gộp đơn vị
                //        f = new Forms.Popup(new HDQD.UCs.M_A(false), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH GỘP ĐƠN VỊ");
                //        f.ShowDialog();
                //        break;
                //    case 1:
                //    case 2:
                //    case 3:
                //        f = new Forms.Popup(new HDQD.UCs.BoNhiem(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH BỔ NHIỆM");
                //        f.ShowDialog();
                //        break;
                //    case 4:
                //        f = new Forms.Popup(new HDQD.UCs.DoiThongTinDV(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH ĐỔI THÔNG TIN ĐƠN VỊ");
                //        f.ShowDialog();
                //        break;
                //    case 6:
                //    case 7:
                //        f = new Forms.Popup(new HDQD.UCs.ThoiBoNhiem(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH THÔI BỔ NHIỆM");
                //        f.ShowDialog();
                //        break;
                //    case 8:
                //        f = new Forms.Popup(new HDQD.UCs.QuyetDinhPhuCap(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH CHUNG");
                //        f.ShowDialog();
                //        break;

                //    default:
                //        break;
                //} 
                #endregion

                string SelectedText = Convert.ToString(comB_Loai.Text);
                HDQD.Forms.Popup f;
                if (SelectedText == "Kiêm nhiệm" || SelectedText == "Bổ nhiệm" || SelectedText == "Điều động"
                        || SelectedText == "Đi du học" || SelectedText == "Nghỉ thai sản" || SelectedText == "Nghỉ không lương"
                        || SelectedText == "Đi du lịch" || SelectedText == "Thôi việc" || SelectedText == "Nghỉ hưu")
                {
                    f = new Forms.Popup(new HDQD.UCs.QDChung(SelectedText), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH " + SelectedText.ToUpper());
                    f.ShowDialog();
                }
                else if (SelectedText == "Đổi thông tin đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.DoiThongTinDV(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH ĐỔI THÔNG TIN ĐƠN VỊ");
                    f.ShowDialog();
                }
                else if (SelectedText == "Tách đơn vị") 
                {
                    f = new Forms.Popup(new HDQD.UCs.M_A(true), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TÁCH ĐƠN VỊ");
                    f.ShowDialog();
                }
                else if (SelectedText == "Gộp đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.M_A(false), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH GỘP ĐƠN VỊ");
                    f.ShowDialog();
                }
                else if (SelectedText == "Tiếp nhận")
                {
                    f = new Forms.Popup(new HDQD.UCs.TiepNhan(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TIẾP NHẬN");
                    f.ShowDialog();
                }
                else if (SelectedText == "Quyết định chung")
                {
                    f = new Forms.Popup(new HDQD.UCs.QDChung(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH CHUNG");
                    f.ShowDialog();
                }
                else if (SelectedText == "Thành lập đơn vị")
                {
                    f = new Forms.Popup(new HDQD.UCs.ThanhLapDonVi(), "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH THÀNH LẬP ĐƠN VỊ");
                    f.ShowDialog();
                }

            }
            else
                MessageBox.Show("Vui lòng chọn một loại quyết định", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #45
0
        private void dtgv_DSHD_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dtgv_DSHD.CurrentRow != null)
            {
                DataGridViewRow row = dtgv_DSHD.CurrentRow;
                oHopDong                 = new Business.HDQD.CNVC_HopDong();
                oHopDong.ID              = Convert.ToInt16(row.Cells["id"].Value.ToString());
                oHopDong.Ma_NV           = row.Cells["ma_nv"].Value.ToString();
                oHopDong.Ma_Tuyen_Dung   = row.Cells["ma_hop_dong"].Value.ToString();
                oHopDong.La_QD_Tiep_Nhan = false;
                oHopDong.Ma_Loai_HD      = Convert.ToInt16(row.Cells["ma_loai_hd"].Value.ToString());
                oHopDong.Loai_Hop_Dong   = row.Cells["loai_hop_dong"].Value.ToString();
                oHopDong.Co_Thoi_Han     = Convert.ToBoolean(row.Cells["co_thoi_han"].Value.ToString());
                if (row.Cells["ngay_ky"].Value.ToString() != "")
                {
                    oHopDong.Ngay_Ky = Convert.ToDateTime(row.Cells["ngay_ky"].Value.ToString());
                }
                if (row.Cells["ngay_hieu_luc"].Value.ToString() != "")
                {
                    oHopDong.Ngay_Hieu_Luc = Convert.ToDateTime(row.Cells["ngay_hieu_luc"].Value.ToString());
                }
                if (row.Cells["ngay_het_han"].Value.ToString() != "")
                {
                    oHopDong.Ngay_Het_Han = Convert.ToDateTime(row.Cells["ngay_het_han"].Value.ToString());
                }
                if (row.Cells["chuc_vu_chinh_id"].Value.ToString() != "")
                {
                    oHopDong.Chuc_Vu_ID = Convert.ToInt16(row.Cells["chuc_vu_chinh_id"].Value.ToString());
                }
                oHopDong.Chuc_Vu = row.Cells["ten_chuc_vu"].Value.ToString();

                if (row.Cells["chuc_danh_chinh_id"].Value.ToString() != "")
                {
                    oHopDong.Chuc_Danh_ID = Convert.ToInt16(row.Cells["chuc_danh_chinh_id"].Value.ToString());
                }
                oHopDong.Chuc_Danh = row.Cells["ten_chuc_danh"].Value.ToString();

                if (row.Cells["don_vi_chinh_id"].Value.ToString() != "")
                {
                    oHopDong.Don_Vi_ID = Convert.ToInt16(row.Cells["don_vi_chinh_id"].Value.ToString());
                }
                oHopDong.Don_Vi     = row.Cells["ten_don_vi"].Value.ToString();
                oHopDong.Tinh_Trang = Convert.ToBoolean(row.Cells["tinh_trang"].Value.ToString());
                oHopDong.Ghi_Chu    = row.Cells["ghi_chu"].Value.ToString();

                if (row.Cells["tham_nien_nang_bac"].Value.ToString() != "")
                {
                    oHopDong.Tham_nien_nang_bac = Convert.ToBoolean(row.Cells["tham_nien_nang_bac"].Value.ToString());
                }
                else
                {
                    oHopDong.Tham_nien_nang_bac = false;
                }
                if (row.Cells["tham_nien_gd"].Value.ToString() != "")
                {
                    oHopDong.Tham_nien_nha_giao = Convert.ToBoolean(row.Cells["tham_nien_gd"].Value.ToString());
                }
                else
                {
                    oHopDong.Tham_nien_nha_giao = false;
                }

                if (row.Cells["dong_bao_hiem"].Value.ToString() != "")
                {
                    oHopDong.Dong_bao_hiem = Convert.ToBoolean(row.Cells["dong_bao_hiem"].Value.ToString());
                }
                else
                {
                    oHopDong.Dong_bao_hiem = false;
                }

                #region Luong Info
                oHopDong.Khoan_or_HeSo = Convert.ToBoolean(row.Cells["tinh_trang"].Value.ToString());
                if (row.Cells["luong_khoan"].Value.ToString() != "")
                {
                    oHopDong.Luong_Khoan = Convert.ToDouble(row.Cells["luong_khoan"].Value.ToString());
                }
                if (row.Cells["ngach_bac_heso_id"].Value.ToString() != "")
                {
                    oHopDong.BacHeSo_ID = Convert.ToInt16(row.Cells["ngach_bac_heso_id"].Value.ToString());
                }
                if (row.Cells["phan_tram_huong"].Value.ToString() != "")
                {
                    oHopDong.PhanTramHuong = Convert.ToDouble(row.Cells["phan_tram_huong"].Value.ToString());
                }
                #endregion

                oHopDong.Co_Phu_Cap = Convert.ToBoolean(row.Cells["co_phu_cap"].Value.ToString());

                UCs.HopDong hopdong = new HopDong(oHopDong);
                Forms.Popup popup   = new Forms.Popup(hopdong, "QUẢN LÝ NHÂN SỰ - HỢP ĐỒNG");
                popup.Show();
            }
        }
Beispiel #46
0
        private void Show_QD_TiepNhan(DataGridViewRow p_row)
        {
            try
            {
                string ma_qd = p_row.Cells["ma_quyet_dinh"].Value.ToString();
                Business.HDQD.CNVC_HopDong oHopDong = new Business.HDQD.CNVC_HopDong();
                DataTable dt = oHopDong.Search_QD_TiepNhan(ma_qd);

                if (dt.Rows.Count > 0)
                {
                    oHopDong.ID = Convert.ToInt16(dt.Rows[0]["id"].ToString());
                    oHopDong.Ma_NV = dt.Rows[0]["ma_nv"].ToString();
                    string cnvc_ho = dt.Rows[0]["ho"].ToString();
                    string cnvc_ten = dt.Rows[0]["ten"].ToString();

                    oHopDong.Ma_Tuyen_Dung = dt.Rows[0]["ma_hop_dong"].ToString();
                    oHopDong.La_QD_Tiep_Nhan = true;
                    oHopDong.Ten_Quyet_Dinh = p_row.Cells["ten"].Value.ToString();
                    oHopDong.Loai_QD_ID = Convert.ToInt16(p_row.Cells["loai_qd_id"].Value.ToString());
                    if (p_row.Cells["ngay_ky"].Value.ToString() != "")
                        oHopDong.Ngay_Ky = Convert.ToDateTime(p_row.Cells["ngay_ky"].Value.ToString());
                    if (p_row.Cells["ngay_hieu_luc"].Value.ToString() != "")
                        oHopDong.Ngay_Hieu_Luc = Convert.ToDateTime(p_row.Cells["ngay_hieu_luc"].Value.ToString());
                    if (p_row.Cells["ngay_het_han"].Value.ToString() != "")
                        oHopDong.Ngay_Het_Han = Convert.ToDateTime(p_row.Cells["ngay_het_han"].Value.ToString());
                    oHopDong.MoTa_QD = p_row.Cells["mo_ta"].Value.ToString();

                    oHopDong.Co_Thoi_Han = Convert.ToBoolean(dt.Rows[0]["co_thoi_han"].ToString());
                    
                    if (dt.Rows[0]["chuc_vu_chinh_id"].ToString() != "")
                        oHopDong.Chuc_Vu_ID = Convert.ToInt16(dt.Rows[0]["chuc_vu_chinh_id"].ToString());
                    oHopDong.Chuc_Vu = dt.Rows[0]["ten_chuc_vu"].ToString();

                    if (dt.Rows[0]["chuc_danh_chinh_id"].ToString() != "")
                        oHopDong.Chuc_Danh_ID = Convert.ToInt16(dt.Rows[0]["chuc_danh_chinh_id"].ToString());
                    oHopDong.Chuc_Danh = dt.Rows[0]["ten_chuc_danh"].ToString();

                    if (dt.Rows[0]["don_vi_chinh_id"].ToString() != "")
                        oHopDong.Don_Vi_ID = Convert.ToInt16(dt.Rows[0]["don_vi_chinh_id"].ToString());
                    oHopDong.Don_Vi = dt.Rows[0]["ten_don_vi"].ToString();
                    oHopDong.Tinh_Trang = Convert.ToBoolean(dt.Rows[0]["tinh_trang"].ToString());
                    oHopDong.Ghi_Chu = dt.Rows[0]["ghi_chu"].ToString();

                    if (dt.Rows[0]["tham_nien_nang_bac"].ToString() != "")
                        oHopDong.Tham_nien_nang_bac = Convert.ToBoolean(dt.Rows[0]["tham_nien_nang_bac"].ToString());
                    else
                        oHopDong.Tham_nien_nang_bac = false;

                    if (dt.Rows[0]["tham_nien_gd"].ToString() != "")
                        oHopDong.Tham_nien_nha_giao = Convert.ToBoolean(dt.Rows[0]["tham_nien_gd"].ToString());
                    else
                        oHopDong.Tham_nien_nha_giao = false;

                    #region Luong Info
                    oHopDong.Khoan_or_HeSo = Convert.ToBoolean(dt.Rows[0]["tinh_trang"].ToString());
                    if (dt.Rows[0]["luong_khoan"].ToString() != "")
                        oHopDong.Luong_Khoan = Convert.ToDouble(dt.Rows[0]["luong_khoan"].ToString());
                    if (dt.Rows[0]["ngach_bac_heso_id"].ToString() != "")
                        oHopDong.BacHeSo_ID = Convert.ToInt16(dt.Rows[0]["ngach_bac_heso_id"].ToString());
                    if (dt.Rows[0]["phan_tram_huong"].ToString() != "")
                        oHopDong.PhanTramHuong = Convert.ToDouble(dt.Rows[0]["phan_tram_huong"].ToString());
                    #endregion

                    oHopDong.Co_Phu_Cap = Convert.ToBoolean(dt.Rows[0]["co_phu_cap"].ToString());

                    UCs.TiepNhan tiepnhan = new TiepNhan(oHopDong, cnvc_ho, cnvc_ten);
                    Forms.Popup popup = new Forms.Popup(tiepnhan, "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TIẾP NHẬN");
                    popup.Show();
                }
            }
            catch { }
            


        }
Beispiel #47
0
        private void Show_QD_TiepNhan(DataGridViewRow p_row)
        {
            try
            {
                string ma_qd = p_row.Cells["ma_quyet_dinh"].Value.ToString();
                Business.HDQD.CNVC_HopDong oHopDong = new Business.HDQD.CNVC_HopDong();
                DataTable dt = oHopDong.Search_QD_TiepNhan(ma_qd);

                if (dt.Rows.Count > 0)
                {
                    oHopDong.ID    = Convert.ToInt16(dt.Rows[0]["id"].ToString());
                    oHopDong.Ma_NV = dt.Rows[0]["ma_nv"].ToString();
                    string cnvc_ho  = dt.Rows[0]["ho"].ToString();
                    string cnvc_ten = dt.Rows[0]["ten"].ToString();

                    oHopDong.Ma_Tuyen_Dung   = dt.Rows[0]["ma_hop_dong"].ToString();
                    oHopDong.La_QD_Tiep_Nhan = true;
                    oHopDong.Ten_Quyet_Dinh  = p_row.Cells["ten"].Value.ToString();
                    oHopDong.Loai_QD_ID      = Convert.ToInt16(p_row.Cells["loai_qd_id"].Value.ToString());
                    if (p_row.Cells["ngay_ky"].Value.ToString() != "")
                    {
                        oHopDong.Ngay_Ky = Convert.ToDateTime(p_row.Cells["ngay_ky"].Value.ToString());
                    }
                    if (p_row.Cells["ngay_hieu_luc"].Value.ToString() != "")
                    {
                        oHopDong.Ngay_Hieu_Luc = Convert.ToDateTime(p_row.Cells["ngay_hieu_luc"].Value.ToString());
                    }
                    if (p_row.Cells["ngay_het_han"].Value.ToString() != "")
                    {
                        oHopDong.Ngay_Het_Han = Convert.ToDateTime(p_row.Cells["ngay_het_han"].Value.ToString());
                    }
                    oHopDong.MoTa_QD = p_row.Cells["mo_ta"].Value.ToString();

                    oHopDong.Co_Thoi_Han = Convert.ToBoolean(dt.Rows[0]["co_thoi_han"].ToString());

                    if (dt.Rows[0]["chuc_vu_chinh_id"].ToString() != "")
                    {
                        oHopDong.Chuc_Vu_ID = Convert.ToInt16(dt.Rows[0]["chuc_vu_chinh_id"].ToString());
                    }
                    oHopDong.Chuc_Vu = dt.Rows[0]["ten_chuc_vu"].ToString();

                    if (dt.Rows[0]["chuc_danh_chinh_id"].ToString() != "")
                    {
                        oHopDong.Chuc_Danh_ID = Convert.ToInt16(dt.Rows[0]["chuc_danh_chinh_id"].ToString());
                    }
                    oHopDong.Chuc_Danh = dt.Rows[0]["ten_chuc_danh"].ToString();

                    if (dt.Rows[0]["don_vi_chinh_id"].ToString() != "")
                    {
                        oHopDong.Don_Vi_ID = Convert.ToInt16(dt.Rows[0]["don_vi_chinh_id"].ToString());
                    }
                    oHopDong.Don_Vi     = dt.Rows[0]["ten_don_vi"].ToString();
                    oHopDong.Tinh_Trang = Convert.ToBoolean(dt.Rows[0]["tinh_trang"].ToString());
                    oHopDong.Ghi_Chu    = dt.Rows[0]["ghi_chu"].ToString();

                    if (dt.Rows[0]["tham_nien_nang_bac"].ToString() != "")
                    {
                        oHopDong.Tham_nien_nang_bac = Convert.ToBoolean(dt.Rows[0]["tham_nien_nang_bac"].ToString());
                    }
                    else
                    {
                        oHopDong.Tham_nien_nang_bac = false;
                    }

                    if (dt.Rows[0]["tham_nien_gd"].ToString() != "")
                    {
                        oHopDong.Tham_nien_nha_giao = Convert.ToBoolean(dt.Rows[0]["tham_nien_gd"].ToString());
                    }
                    else
                    {
                        oHopDong.Tham_nien_nha_giao = false;
                    }

                    #region Luong Info
                    oHopDong.Khoan_or_HeSo = Convert.ToBoolean(dt.Rows[0]["tinh_trang"].ToString());
                    if (dt.Rows[0]["luong_khoan"].ToString() != "")
                    {
                        oHopDong.Luong_Khoan = Convert.ToDouble(dt.Rows[0]["luong_khoan"].ToString());
                    }
                    if (dt.Rows[0]["ngach_bac_heso_id"].ToString() != "")
                    {
                        oHopDong.BacHeSo_ID = Convert.ToInt16(dt.Rows[0]["ngach_bac_heso_id"].ToString());
                    }
                    if (dt.Rows[0]["phan_tram_huong"].ToString() != "")
                    {
                        oHopDong.PhanTramHuong = Convert.ToDouble(dt.Rows[0]["phan_tram_huong"].ToString());
                    }
                    #endregion

                    oHopDong.Co_Phu_Cap = Convert.ToBoolean(dt.Rows[0]["co_phu_cap"].ToString());

                    UCs.TiepNhan tiepnhan = new TiepNhan(oHopDong, cnvc_ho, cnvc_ten);
                    Forms.Popup  popup    = new Forms.Popup(tiepnhan, "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH TIẾP NHẬN");
                    popup.Show();
                }
            }
            catch { }
        }
Beispiel #48
0
        private void Show_QD_Chung(DataGridViewRow p_row)
        {
            try
            {
                string ma_qd = p_row.Cells["ma_quyet_dinh"].Value.ToString();
                
                UCs.QDChung qdchung = new QDChung(ma_qd, true);
                Forms.Popup popup = new Forms.Popup(qdchung, "QUẢN LÝ NHÂN SỰ - QUYẾT ĐỊNH CHUNG");
                popup.Show();
                
            }
            catch { }



        }
Beispiel #49
0
 private void btn_ThietLap_Click(object sender, EventArgs e)
 {
     Forms.Popup frPopup = new Forms.Popup(ucDinhNghiaCT, "QUẢN LÝ NHÂN SỰ - ĐỊNH NGHĨA CÔNG THỨC TÍNH PHỤ CẤP");
     if (ucDinhNghiaCT.lstDisplayString.Count > 0)
     {
         
     }
     frPopup.ShowDialog();
     if (ucDinhNghiaCT.lstValueString.Count > 0)
     {
         rtb_CongThuc.Text = string.Join(" ", ucDinhNghiaCT.lstDisplayString.ToArray());
     }
 }
Beispiel #50
0
        private void lb_TimNV_Click(object sender, EventArgs e)
        {
            hitOK = false;
            m_ma_nv = new string[0];
            m_ho_ten = new string[0];

            int dv_id = 0;
            for (int i = 0; i < tableLP_ComboTuDV.RowCount; i++)
            {
                ComboBox cbo_DonVi = (ComboBox)tableLP_ComboTuDV.Controls[i];
                if (cbo_DonVi.Text != "")
                    dv_id = Convert.ToInt16(cbo_DonVi.SelectedValue);
                else
                {
                    MessageBox.Show("Vui lòng chọn một đơn vị.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            if (dv_id != 0)
            {
                DataTable dtCNVC = oCNVC.Search_CNVC_by_DonVi(dv_id);

                Forms.Popup frPopup = new Forms.Popup(new UCs.DSCNVC(dtCNVC), "QUẢN LÝ NHÂN SỰ - DANH SÁCH CNVC");
                HDQD.UCs.DSCNVC.eParentUC = DSCNVC.ParentUC.MA;
                frPopup.ShowDialog();
            }
            if (hitOK)
            {
                listB_DSNV.Items.Clear();

                //Set_CNVCs_to_LB(m_ma_nv, m_ho_ten, row_count);
                foreach (string item in m_ho_ten)
                {
                    listB_DSNV.Items.Add(item);
                }
            }

        }