예제 #1
0
        public void BulkOption(bool isTran, BulkUpdateHandler bulkUp)
        {
            try
            {
                Open(isTran);
                using (IDbCommand comm = _conn.CreateCommand())
                {
                    try
                    {
                        comm.Connection = _conn;
                        if (isTran && _trans != null && isTran)
                        {
                            comm.Transaction = _trans;
                        }

                        comm.CommandTimeout = this.TimeOut;
                        if (bulkUp != null)
                        {
                            bulkUp(comm);                 //批量操作
                        }
                        if (isTran)
                        {
                            CommitTranscation();
                        }
                    }
                    catch (Exception ex)
                    {
                        throw;
                    }
                }
            }

            catch (SqlException ex)
            {
                //LogManage.WriteLog("脚本执行", ex);
                RollbackTranscation();
                throw;
            }
            catch (Exception ex)
            {
                RollbackTranscation();
                throw;
            }
            finally
            {
                CloseConnection();
            }
        }
예제 #2
0
 void IptBaseDb.BulkOption(bool transaction, BulkUpdateHandler bulkUp)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public void BulkOption(bool isTran, BulkUpdateHandler bulkUp)
 {
     throw new NotImplementedException();
 }