コード例 #1
0
        private void themVaoCSDLxml123_3()
        {
            for (int i = 0; i < _FileNames.Count; i++)
            {
                string _FileName     = _FileNames[i];
                string _SafeFileName = _SafeFileNames[i];



                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;

                SqlConnection conn = DBUtils.GetDBConnection();


                conn.Open();
                try
                {
                    DBUtils.ExecuteNonQueryStoredProcedure_DULIEUXML123(tenProcedure, conn, _FileName);
                    conn.Close();
                    conn.Dispose();
                }
                catch (SqlException ex)
                {
                    MessageBox.Show("Error: " + ex.ToString());
                }
                finally
                {
                    MessageBox.Show("Release done");
                    conn.Close();
                    conn.Dispose();
                }
            }
            MessageBox.Show("xong");
        }