private void barbtnThemMoi_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            dlgCT_KhoiKienThuc dlg = new dlgCT_KhoiKienThuc(pKQHT_CT_KhoiKienThucInfo, EDIT_MODE.THEM, mMaxCTSo);

            dlg.ShowDialog();
            if (dlg.Tag.ToString() == "1")
            {
                try
                {
                    pKQHT_CT_KhoiKienThucInfo = dlg.pCTDT;
                    pKQHT_CT_KhoiKienThucInfo.KQHT_CT_KhoiKienThucID = oBKQHT_CT_KhoiKienThuc.Add(pKQHT_CT_KhoiKienThucInfo);
                    DataRow drNew = dtCTDT.NewRow();
                    oBKQHT_CT_KhoiKienThuc.ToDataRow(pKQHT_CT_KhoiKienThucInfo, ref drNew);
                    drNew["TenTrinhDo"] = dlg.cmbTrinhDo.Text;
                    DM_HeInfo pDM_HeInfo = new DM_HeInfo();
                    pDM_HeInfo.DM_HeID       = int.Parse(dlg.cmbTrinhDo.GetColumnValue("IDDM_He").ToString());
                    drNew["TenHe"]           = new cBDM_He().Get(pDM_HeInfo).Rows[0]["TenHe"].ToString();
                    drNew["TenKhoiKienThuc"] = dlg.cmbKhoiKienThuc.Text;
                    drNew["TenNganh"]        = dlg.ucmbNganh.cmb.Text;
                    drNew["TenChuyenNganh"]  = dlg.ucmbChuyenNganh.cmb.Text;
                    drNew["TenKhoaHoc"]      = dlg.cmbKhoaHoc.Text;
                    dtCTDT.Rows.Add(drNew);
                    //LoadCTDT();
                    dlgCTDTChonMonHoc dlgMon = new dlgCTDTChonMonHoc(pKQHT_CT_KhoiKienThucInfo.KQHT_CT_KhoiKienThucID, pKQHT_CT_KhoiKienThucInfo.TenCT_KhoiKienThuc, ref dtMonHoc);
                    dlgMon.ShowDialog();
                    // Ghi Log
                    GhiLog("Thêm chương trình khối kiến thức '" + pKQHT_CT_KhoiKienThucInfo.TenCT_KhoiKienThuc + "'", "Thêm", this.Tag.ToString());
                    ThemThanhCong();
                }
                catch (Exception ex)
                {
                    ThongBao(ex.Message);
                }
            }
        }
 private void btnMonHoc_Click(object sender, EventArgs e)
 {
     if (grvCTDT.FocusedRowHandle >= 0)
     {
         dlgCTDTChonMonHoc dlg = new dlgCTDTChonMonHoc(pKQHT_CT_KhoiKienThucInfo.KQHT_CT_KhoiKienThucID, pKQHT_CT_KhoiKienThucInfo.TenCT_KhoiKienThuc, ref dtMonHoc);
         dlg.ShowDialog();
         if (dlg.DialogResult == DialogResult.OK)
         {
             // Ghi Log
             GhiLog("Thêm môn học vào chương trình khối kiến thức '" + pKQHT_CT_KhoiKienThucInfo.TenCT_KhoiKienThuc + "'", "Thêm", this.Tag.ToString());
             //grvCTDT_FocusedRowChanged(null, null);
         }
     }
     else
     {
         ThongBao("Bạn chưa chọn chương trình khối kiến thức nào.");
     }
 }