private void themVaoCSDLxml123()
        {
            for (int i = 0; i < _FileNames.Count; i++)
            {
                bool   flag          = true;
                string _FileName     = _FileNames[i];
                string _SafeFileName = _SafeFileNames[i];

                SQLiteHelper.setConnString(_FileName);

                //DataTable dt = SQLiteHelper.loadDatafromDB("Select * From xml123");
                DataTable dt = SQLiteHelper.loadDatafromDB("SELECT ID, XML1_ID, Ky_QT, CoSoKCB_ID, Ma_CSKCB, Ma_LK, MA_BN, Ho_Ten, Ngay_Sinh, Gioi_Tinh, Ma_The, Ma_DKBD, GT_The_Tu, GT_The_Den, Mien_Cung_CT, Ngay_Vao, Ngay_Ra, So_Ngay_DTri, Ma_LyDo_VVien, Ma_Benh, Ma_BenhKhac, Muc_Huong_XML1, T_TongChi, T_BNTT, T_BHTT, T_BNCCT, T_XN, T_CDHA, T_Thuoc, T_Mau, T_TTPT, T_VTYT, T_DVKT_TyLe, T_Thuoc_TyLe, T_VTYT_TyLe, T_Kham, T_Giuong, T_VChuyen, T_NgoaiDS, T_NguonKhac, Ma_Loai_KCB, ID_CP, Loai_CP, Ma_CP, Ma_Vat_Tu, Ma_Nhom, Ten_CP, DVT, So_Dang_Ky, Ham_Luong, Duong_Dung, So_Luong, So_Luong_BV, Don_Gia, Don_Gia_BV, Thanh_Tien, TyLe_TT, Ngay_YL, Ngay_KQ, T_NguonKhac_DTL, T_BNTT_DTL, T_BHTT_DTL, T_BNCCT_DTL, T_NgoaiDS_DTL, Muc_Huong_DTL, TT_Thau, Pham_Vi, Ma_Giuong, T_TranTT, Goi_VTYT, Ten_Vat_Tu, Ten_Khoa, Ma_Khoa, Ma_Khoa_XML1, Ten_Khoa_XML1, Ten_Benh, Ma_Bac_Si, Ma_Tinh, Ma_Tinh_The FROM xml123");

                string _MaCSKCB = (_SafeFileName.Split('.'))[0].ToString().Trim();
                khoitaoCSDL(_MaCSKCB);

                string tenProcedure = "Insert_xml123_" + _MaCSKCB;
                string tenTable     = "xml123_" + _MaCSKCB;
                string tenType      = "udt_xml123_" + _MaCSKCB;

                SqlConnection conn = DBUtils.GetDBConnection();
                conn.Open();
                try
                {
                    if (DBUtils.ExecuteNonQueryStoredProcedure_xml123(tenProcedure, dt, conn) > 0)
                    {
                        //MessageBox.Show("Tạo Table Thành Công");
                    }
                }
                catch (SqlException ex)
                {
                    //MessageBox.Show("Error: " + ex.ToString());
                    flag = false;
                }
                finally
                {
                    conn.Close();
                    conn.Dispose();
                }

                if (!flag)
                {
                    MessageBox.Show("CSKCB " + _MaCSKCB + " đã có trong CSDL");
                }
            }
        }
        private void themVaoCSDLxml123_2()
        {
            for (int i = 0; i < _FileNames.Count; i++)
            {
                string _FileName     = _FileNames[i];
                string _SafeFileName = _SafeFileNames[i];

                SQLiteHelper.setConnString(_FileName);
                int _tongSoDong = int.Parse(SQLiteHelper.loadDatafromDB("SELECT COUNT(ID) FROM xml123").Rows[0][0].ToString());
                //MessageBox.Show(_tongSoDong.ToString());

                string _MaCSKCB = (_SafeFileName.Split('.'))[0].ToString().Trim();

                /////
                //khoitaoCSDL_2(_MaCSKCB);
                khoitaoCSDL(_MaCSKCB);

                string tenProcedure = "Insert_xml123_" + _MaCSKCB;
                string tenTable     = "xml123_" + _MaCSKCB;
                string tenType      = "udt_xml123_" + _MaCSKCB;


                for (int j = 0; j < _tongSoDong; j = j + 100000)
                {
                    int _start = j;
                    int _end   = 100000;

                    if ((j + 100000) > _tongSoDong)
                    {
                        _start = j;
                        _end   = _tongSoDong - j;
                    }

                    SQLiteHelper.setConnString(_FileName);


                    DataTable     dt   = SQLiteHelper.loadDatafromDB("SELECT ID, XML1_ID, Ky_QT, CoSoKCB_ID, Ma_CSKCB, Ma_LK, MA_BN, Ho_Ten, Ngay_Sinh, Gioi_Tinh, Ma_The, Ma_DKBD, GT_The_Tu, GT_The_Den, Mien_Cung_CT, Ngay_Vao, Ngay_Ra, So_Ngay_DTri, Ma_LyDo_VVien, Ma_Benh, Ma_BenhKhac, Muc_Huong_XML1, T_TongChi, T_BNTT, T_BHTT, T_BNCCT, T_XN, T_CDHA, T_Thuoc, T_Mau, T_TTPT, T_VTYT, T_DVKT_TyLe, T_Thuoc_TyLe, T_VTYT_TyLe, T_Kham, T_Giuong, T_VChuyen, T_NgoaiDS, T_NguonKhac, Ma_Loai_KCB, ID_CP, Loai_CP, Ma_CP, Ma_Vat_Tu, Ma_Nhom, Ten_CP, DVT, So_Dang_Ky, Ham_Luong, Duong_Dung, So_Luong, So_Luong_BV, Don_Gia, Don_Gia_BV, Thanh_Tien, TyLe_TT, Ngay_YL, Ngay_KQ, T_NguonKhac_DTL, T_BNTT_DTL, T_BHTT_DTL, T_BNCCT_DTL, T_NgoaiDS_DTL, Muc_Huong_DTL, TT_Thau, Pham_Vi, Ma_Giuong, T_TranTT, Goi_VTYT, Ten_Vat_Tu, Ten_Khoa, Ma_Khoa, Ma_Khoa_XML1, Ten_Khoa_XML1, Ten_Benh, Ma_Bac_Si, Ma_Tinh, Ma_Tinh_The FROM xml123 LIMIT " + _start + ", " + _end);
                    SqlConnection conn = DBUtils.GetDBConnection();

                    //MessageBox.Show("j:" + _start.ToString() + "_end:" + _end.ToString() + "_sodong: " + dt.Rows.Count.ToString());

                    conn.Open();
                    try
                    {
                        DBUtils.ExecuteNonQueryStoredProcedure_xml123(tenProcedure, dt, conn);
                        //DBUtils.ExecuteNonQuery("DBCC FREEPROCCACHE", conn);

                        /*
                         *
                         * for (int k = 0; k < dt.Rows.Count; k++)
                         * {
                         *  DBUtils.ExecuteNonQueryStoredProcedure_xml123_2(tenProcedure, dt.Rows[k], conn);
                         * }*/

                        conn.Close();
                        conn.Dispose();
                        dt.Clear();
                        dt.Dispose();
                    }
                    catch (SqlException ex)
                    {
                        MessageBox.Show("Error: " + ex.ToString());
                    }
                    finally
                    {
                        //MessageBox.Show("Release done");
                        //conn.Close();
                        //conn.Dispose();
                        //dt.Clear();
                        //dt.Dispose();
                    }
                }


                /*
                 * int _start = 0;
                 * int _end = 100000;
                 * SQLiteHelper.setConnString(_FileName);
                 *
                 *
                 * DataTable dt = SQLiteHelper.loadDatafromDB("SELECT ID, XML1_ID, Ky_QT, CoSoKCB_ID, Ma_CSKCB, Ma_LK, MA_BN, Ho_Ten, Ngay_Sinh, Gioi_Tinh, Ma_The, Ma_DKBD, GT_The_Tu, GT_The_Den, Mien_Cung_CT, Ngay_Vao, Ngay_Ra, So_Ngay_DTri, Ma_LyDo_VVien, Ma_Benh, Ma_BenhKhac, Muc_Huong_XML1, T_TongChi, T_BNTT, T_BHTT, T_BNCCT, T_XN, T_CDHA, T_Thuoc, T_Mau, T_TTPT, T_VTYT, T_DVKT_TyLe, T_Thuoc_TyLe, T_VTYT_TyLe, T_Kham, T_Giuong, T_VChuyen, T_NgoaiDS, T_NguonKhac, Ma_Loai_KCB, ID_CP, Loai_CP, Ma_CP, Ma_Vat_Tu, Ma_Nhom, Ten_CP, DVT, So_Dang_Ky, Ham_Luong, Duong_Dung, So_Luong, So_Luong_BV, Don_Gia, Don_Gia_BV, Thanh_Tien, TyLe_TT, Ngay_YL, Ngay_KQ, T_NguonKhac_DTL, T_BNTT_DTL, T_BHTT_DTL, T_BNCCT_DTL, T_NgoaiDS_DTL, Muc_Huong_DTL, TT_Thau, Pham_Vi, Ma_Giuong, T_TranTT, Goi_VTYT, Ten_Vat_Tu, Ten_Khoa, Ma_Khoa, Ma_Khoa_XML1, Ten_Khoa_XML1, Ten_Benh, Ma_Bac_Si, Ma_Tinh, Ma_Tinh_The FROM xml123 LIMIT " + _start + ", " + _end);
                 *
                 *
                 *
                 *  SqlConnection conn = DBUtils.GetDBConnection();
                 *  conn.Open();
                 * try
                 * {
                 *
                 *  for (int j = 0; j < dt.Rows.Count; j++)
                 *  {
                 *      DBUtils.ExecuteNonQueryStoredProcedure_xml123_2(tenProcedure, dt.Rows[j], conn);
                 *  }
                 *  conn.Close();
                 *  conn.Dispose();
                 * }
                 * catch (SqlException ex)
                 * {
                 *  MessageBox.Show("Error: " + ex.ToString());
                 * }
                 * finally
                 * {
                 * }
                 *
                 */


                MessageBox.Show("xong");
            }
        }