C# Класс Excavator.CSV.CSVComponent

Partial of CSVComponent that holds the People import methods
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
AnonymousGiverAliasId int?
HouseholdIdAttribute Rock.Web.Cache.AttributeCache
ImportPersonAliasId int?
ImportedBatches int?>.Dictionary
ImportedPeopleKeys List
IndividualIdAttribute Rock.Web.Cache.AttributeCache
IntegerFieldTypeId int
TextFieldTypeId int

Private Properties

Свойство Тип Описание
AddAccount FinancialAccount
AddPersonAttribute void
CreateFamilyGroup Group
FileIsKnown bool
FileTypeMatches bool
GetFileRootName string
GetRecordTypeFromFilename CSVInstance.RockDataType
LoadExistingData bool
LoadFamily int
LoadIndividuals int
LoadMetrics int
MapBatch int
MapContribution int
MapPledge int
SaveContributions void
SaveFamilies void
SaveFinancialBatches void
SaveIndividuals void
SaveMetrics void
SavePledges void

Открытые методы

Метод Описание
DetachAllInContext ( RockContext context ) : void

Detach all entity objects from the change tracker that is associated with the given RockContext. Any entity that is stored (for example in an Imported... variable) should be detached before the function ends. If it is explicitely attached and then not detached then when it is attached to another context an exception "An entity object cannot be referenced by multiple instances of IEntityChangeTracker" occurs. Taken from: http://stackoverflow.com/questions/2465933/how-to-clean-up-an-entity-framework-object-context

LoadSchema ( string fileName ) : bool

Loads the database for this instance. may be called multiple times, if uploading multiple CSV files.

TransformData ( string>.Dictionary settings ) : int

Previews the data. Overrides base class because we have potential for more than one imported file

Transforms the data from the dataset.

Защищенные методы

Метод Описание
GetPersonKeys ( int individualId = null ) : PersonKeys

Gets the person keys.

LoadPersonKeys ( RockContext lookupContext ) : void

Приватные методы

Метод Описание
AddAccount ( RockContext lookupContext, string fundName, string accountGL, int fundCampusId, int parentAccountId, bool isActive ) : FinancialAccount

Adds the account.

AddPersonAttribute ( Rock.Web.Cache.AttributeCache attribute, Person person, string attributeValue ) : void

Adds the person attribute.

CreateFamilyGroup ( string rowFamilyName, string rowFamilyKey ) : Group

Creates the family group.

FileIsKnown ( string fileName ) : bool

Checks if the file matches a known format.

FileTypeMatches ( CSVInstance filetype, string name ) : bool

Checks if the file matches a known format.

GetFileRootName ( string fileName ) : string

Gets the name of the file without the extension.

GetRecordTypeFromFilename ( string filename ) : CSVInstance.RockDataType

Gets the record type based on the filename.

LoadExistingData ( string importUser ) : bool

Checks the database for existing import data. returns false if an error occurred

LoadFamily ( CSVInstance csvData ) : int

Loads the family data.

LoadIndividuals ( CSVInstance csvData ) : int

Loads the individual data.

LoadMetrics ( CSVInstance csvData ) : int

Loads the family data.

MapBatch ( CSVInstance csvData ) : int

Maps the batch data.

MapContribution ( CSVInstance csvData ) : int

Maps the contribution.

MapPledge ( CSVInstance csvData ) : int

Maps the pledge.

SaveContributions ( List newTransactions ) : void

Saves the contributions.

SaveFamilies ( List newFamilyList, string>.Dictionary newGroupLocations ) : void

Saves all family changes.

SaveFinancialBatches ( List newBatches ) : void

Saves the financial batches.

SaveIndividuals ( List newFamilyList, List visitorList = null, List newNoteList = null ) : void

Saves the individuals.

SaveMetrics ( List metricValues ) : void

Saves all the metric values.

SavePledges ( List newPledges ) : void

Saves the pledges.

Описание методов

DetachAllInContext() публичный статический Метод

Detach all entity objects from the change tracker that is associated with the given RockContext. Any entity that is stored (for example in an Imported... variable) should be detached before the function ends. If it is explicitely attached and then not detached then when it is attached to another context an exception "An entity object cannot be referenced by multiple instances of IEntityChangeTracker" occurs. Taken from: http://stackoverflow.com/questions/2465933/how-to-clean-up-an-entity-framework-object-context
public static DetachAllInContext ( RockContext context ) : void
context Rock.Data.RockContext
Результат void

GetPersonKeys() защищенный статический Метод

Gets the person keys.
protected static GetPersonKeys ( int individualId = null ) : PersonKeys
individualId int The individual identifier.
Результат PersonKeys

LoadPersonKeys() защищенный статический Метод

protected static LoadPersonKeys ( RockContext lookupContext ) : void
lookupContext Rock.Data.RockContext
Результат void

LoadSchema() публичный Метод

Loads the database for this instance. may be called multiple times, if uploading multiple CSV files.
public LoadSchema ( string fileName ) : bool
fileName string
Результат bool

TransformData() публичный Метод

Previews the data. Overrides base class because we have potential for more than one imported file Transforms the data from the dataset.
public TransformData ( string>.Dictionary settings ) : int
settings string>.Dictionary
Результат int

Описание свойств

AnonymousGiverAliasId защищенное статическое свойство

The anonymous giver record
protected static int? AnonymousGiverAliasId
Результат int?

HouseholdIdAttribute защищенное статическое свойство

protected static AttributeCache,Rock.Web.Cache HouseholdIdAttribute
Результат Rock.Web.Cache.AttributeCache

ImportPersonAliasId защищенное статическое свойство

The person assigned to do the import
protected static int? ImportPersonAliasId
Результат int?

ImportedBatches защищенное статическое свойство

All imported batches. Used in Batches & Contributions
protected static Dictionary ImportedBatches
Результат int?>.Dictionary

ImportedPeopleKeys защищенное статическое свойство

All the people keys who've been imported
protected static List ImportedPeopleKeys
Результат List

IndividualIdAttribute защищенное статическое свойство

protected static AttributeCache,Rock.Web.Cache IndividualIdAttribute
Результат Rock.Web.Cache.AttributeCache

IntegerFieldTypeId защищенное статическое свойство

protected static int IntegerFieldTypeId
Результат int

TextFieldTypeId защищенное статическое свойство

protected static int TextFieldTypeId
Результат int