Пример #1
0
        /// <summary>
        /// The processing.
        /// </summary>
        /// <param name="file">
        /// The file.
        /// </param>
        /// <param name="context">
        /// The context.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Processing(FileInfo file, IJobExecutionContext context)
        {
            var objBl = new SQLXMLBulkLoad4Class();

            objBl.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["NHibernateCfgFias.xml"].ConnectionString;
            objBl.BulkLoad         = true;
            objBl.KeepIdentity     = false;
            objBl.SchemaGen        = true;  // создать пустую таблицу в БД
            objBl.SGDropTables     = false; // если таблица существует, удалить её и создать заново

            DeleteData();
            Execute(objBl, file.FullName);

            return(true);
        }
Пример #2
0
        /// <summary>
        /// The execute.
        /// </summary>
        /// <param name="objBl">
        /// The obj bl.
        /// </param>
        /// <param name="fileName">
        /// The file Name.
        /// </param>
        protected override void Execute(SQLXMLBulkLoad4Class objBl, string fileName)
        {
            var xsd = string.Format("{0}Exchange\\xsd\\AS_ADDROBJ.xsd", AppDomain.CurrentDomain.BaseDirectory);

            objBl.Execute(xsd, fileName);
        }
Пример #3
0
 /// <summary>
 /// The execute.
 /// </summary>
 /// <param name="objBl">
 /// The obj bl.
 /// </param>
 /// <param name="fileName">
 /// The file Name.
 /// </param>
 protected abstract void Execute(SQLXMLBulkLoad4Class objBl, string fileName);