//Закрывает историю public void Close() { try { if (_subHistory != null) { _subHistory.Dispose(); } if (_history != null) { _history.Dispose(); } if (_superHistory != null) { _superHistory.Dispose(); } if (_errorsRec != null) { _errorsRec.Dispose(); } if (HistoryDb != null) { HistoryDb.Dispose(); } _subHistory = null; _history = null; _superHistory = null; _errorsRec = null; HistoryDb = null; } catch { } }
//Закрытие public void Dispose() { if (_sub != null) { _sub.Dispose(); } if (_tabl != null) { _tabl.Dispose(); } if (_db != null && !_useDb) { _db.Dispose(); } }
//Закрытие public void Dispose() { try { if (_isEdit) { Recordset.Update(); } } catch { } try { Recordset.Close(); Recordset = null; } catch { } if (!_useDb) { DaoDb.Dispose(); } }
//Закрытие рекордсета, полная очистка ресурсов public void Dispose() { try { Command.Dispose(); } catch { } try { Reader.Close(); Reader.Dispose(); } catch { } try { if (DatabaseType == DatabaseType.SqlServer) { _connection.Close(); } } catch { } if (!_useDb && DatabaseType == DatabaseType.Access) { DaoDb.Dispose(); } }