Skip to content

Commit

Permalink
Generalize Gen1 & Gen2 labels to accommodate NLSY97
Browse files Browse the repository at this point in the history
See #3
  • Loading branch information
wibeasley committed Jun 21, 2017
1 parent be4ec5a commit c239b25
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 69 deletions.
6 changes: 3 additions & 3 deletions BaseAssembly/Assign/RAuntNiece.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ public RAuntNiece ( LinksDataSet dsLinks, LinksDataSet.tblRelatedStructureRow dr
_dsLinks = dsLinks;
_idRelatedLeft = drLeft.ID;

if ( CommonCalculations.GenerationOfSubjectTag(drLeft.SubjectTag_S1) == Generation.Gen1 ) {
if ( CommonCalculations.GenerationOfSubjectTag(drLeft.SubjectTag_S1) == Sample.Nlsy79Gen1 ) {
_drBareAunt = _dsLinks.tblSubject.FindBySubjectTag(drLeft.SubjectTag_S1);
_drBareNiece = _dsLinks.tblSubject.FindBySubjectTag(drLeft.SubjectTag_S2);
}
else {
_drBareAunt = _dsLinks.tblSubject.FindBySubjectTag(drLeft.SubjectTag_S2);
_drBareNiece = _dsLinks.tblSubject.FindBySubjectTag(drLeft.SubjectTag_S1);
}
Trace.Assert(_drBareAunt.Generation == (byte)Generation.Gen1, "The generation should not be the same for a aunt-niece relationship.");
Trace.Assert(_drBareNiece.Generation == (byte)Generation.Gen2, "The generation should not be the same for a aunt-niece relationship.");
Trace.Assert(_drBareAunt.Generation == (byte)Sample.Nlsy79Gen1, "The generation should not be the same for a aunt-niece relationship.");
Trace.Assert(_drBareNiece.Generation == (byte)Sample.Nlsy79Gen2, "The generation should not be the same for a aunt-niece relationship.");

_multipleBirth = MultipleBirth.No;
_isMZ = Tristate.No;
Expand Down
4 changes: 2 additions & 2 deletions BaseAssembly/Assign/RGen2Cousins.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public RGen2Cousins ( LinksDataSet dsLinks, LinksDataSet.tblRelatedStructureRow

_drBare1 = _dsLinks.tblSubject.FindBySubjectTag(drLeft.SubjectTag_S1);
_drBare2 = _dsLinks.tblSubject.FindBySubjectTag(drLeft.SubjectTag_S2);
Trace.Assert(_drBare1.Generation == (byte)Generation.Gen2, "The generation should be Gen2.");
Trace.Assert(_drBare2.Generation == (byte)Generation.Gen2, "The generation should be Gen2.");
Trace.Assert(_drBare1.Generation == (byte)Sample.Nlsy79Gen2, "The generation should be Gen2.");
Trace.Assert(_drBare2.Generation == (byte)Sample.Nlsy79Gen2, "The generation should be Gen2.");

_multipleBirth = MultipleBirth.No;
_isMZ = Tristate.No;
Expand Down
2 changes: 1 addition & 1 deletion BaseAssembly/BabyDaddy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public string Go ( ) {
LinksDataSet.tblResponseDataTable dtExtendedResponse = Retrieve.ExtendedFamilyRelevantResponseRows(extendedID, _itemIDsString, minRowCount, _ds.tblResponse);
LinksDataSet.tblSubjectRow[] subjectsInExtendedFamily = Retrieve.SubjectsInExtendFamily(extendedID, _ds.tblSubject);
foreach ( LinksDataSet.tblSubjectRow drSubject in subjectsInExtendedFamily ) {
if ( (Generation)drSubject.Generation == Generation.Gen2 ) {
if ( (Sample)drSubject.Generation == Sample.Nlsy79Gen2 ) {
Int32 recordsAddedForLoop = ProcessSubjectGen2(drSubject, dtExtendedResponse);
Interlocked.Add(ref recordsAddedTotal, recordsAddedForLoop);
}
Expand Down
6 changes: 3 additions & 3 deletions BaseAssembly/CommonCalculations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ public static Int32 PermutationOf2 ( Int32 topValue ) {
return topValue * (topValue - 1);
}
//public static Int32 CombinationOf2 ( Int16 topValue ) { return PermutationOf2(topValue) / 2;//Integer division //}
public static Generation GenerationOfSubjectTag ( Int32 subjectTag ) {
public static Sample GenerationOfSubjectTag ( Int32 subjectTag ) {
double remainder = Math.IEEERemainder(subjectTag, 100);
if ( remainder == 0 )
return Generation.Gen1;
return Sample.Nlsy79Gen1;
else
return Generation.Gen2;
return Sample.Nlsy79Gen2;
}
public static Int16 MotherIDOfGen2Subject ( Int32 gen2SubjectID ) {
Trace.Assert(Constants.Gen2IDMin <= gen2SubjectID && gen2SubjectID <= Constants.Gen2IDMax, "The SubjectID should be valid for Generation 2.");
Expand Down
4 changes: 2 additions & 2 deletions BaseAssembly/CommonFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static Tristate TranslateYesNo ( YesNo yn ) {
//}
public static byte LastTwoDigitsOfGen2SubjectID ( LinksDataSet.tblSubjectRow drSubject ) {
if ( drSubject == null ) throw new ArgumentNullException("drSubject");
if ( drSubject.Generation != (byte)Generation.Gen2 ) throw new ArgumentOutOfRangeException("drSubject", drSubject.Generation, "This function is valid for only Gen2 subjects.");
if ( drSubject.Generation != (byte)Sample.Nlsy79Gen2 ) throw new ArgumentOutOfRangeException("drSubject", drSubject.Generation, "This function is valid for only Gen2 subjects.");
string subjectIDString = drSubject.SubjectID.ToString();
Int32 startIndex = subjectIDString.Length - 2;
return Convert.ToByte(subjectIDString.Substring(startIndex));
Expand All @@ -92,7 +92,7 @@ public static Int16[] CreateExtendedFamilyIDs ( LinksDataSet dsLinks ) {
internal static bool BothGen1 ( LinksDataSet.tblSubjectRow drSubject1, LinksDataSet.tblSubjectRow drSubject2 ) {
if ( drSubject1 == null ) throw new ArgumentNullException("drSubject1");
if ( drSubject2 == null ) throw new ArgumentNullException("drSubject2");
return drSubject1.Generation == (byte)Generation.Gen1 && drSubject2.Generation == (byte)Generation.Gen1;
return drSubject1.Generation == (byte)Sample.Nlsy79Gen1 && drSubject2.Generation == (byte)Sample.Nlsy79Gen1;
}
//internal static bool BothGen1 ( LinksDataSet.tblRelatedRow drRelated ) {
// if ( drRelated == null ) throw new ArgumentNullException("drRelated");
Expand Down
7 changes: 4 additions & 3 deletions BaseAssembly/EnumLookupTables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ public enum SurveySource : byte {
Gen2C = 2,
Gen2YA = 3,
}
public enum Generation : byte {
Gen1 = 1,
Gen2 = 2,
public enum Sample : byte {
Nlsy79Gen1 = 1,
Nlsy79Gen2 = 2,
Nlsy97 = 3,
}
public enum MultipleBirth : byte {// 'Keep these values sync'ed with tblLUMultipleBirth in the database.
No = 0,
Expand Down
2 changes: 1 addition & 1 deletion BaseAssembly/FatherOfGen2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public string Go ( ) {
LinksDataSet.tblResponseDataTable dtExtendedResponse = Retrieve.ExtendedFamilyRelevantResponseRows(extendedID, _itemIDsString, minRowCount, _ds.tblResponse);
LinksDataSet.tblSubjectRow[] subjectsInExtendedFamily = Retrieve.SubjectsInExtendFamily(extendedID, _ds.tblSubject);
foreach ( LinksDataSet.tblSubjectRow drSubject in subjectsInExtendedFamily ) {
if ( (Generation)drSubject.Generation == Generation.Gen2 ) {
if ( (Sample)drSubject.Generation == Sample.Nlsy79Gen2 ) {
Int32 recordsAddedForLoop = ProcessSubjectGen2(drSubject, dtExtendedResponse);
Interlocked.Add(ref recordsAddedTotal, recordsAddedForLoop);
}
Expand Down
6 changes: 3 additions & 3 deletions BaseAssembly/Mob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public static class Mob {
if ( drSubject == null ) throw new ArgumentNullException("drSubject");

const Int32 maxRows = 1;
switch ( (Generation)drSubject.Generation ) {
case Generation.Gen1:
switch ( (Sample)drSubject.Generation ) {
case Sample.Nlsy79Gen1:
const SurveySource sourceGen1 = SurveySource.Gen1;
Int32? monthGen1 = Nls.BaseAssembly.Retrieve.ResponseNullPossible(Constants.Gen1MobSurveyYearPreferred, Item.DateOfBirthMonth, sourceGen1, drSubject.SubjectTag, maxRows, dt);
Int32 yearGen1 = Int32.MinValue;
Expand All @@ -22,7 +22,7 @@ public static class Mob {
yearGen1 = Nls.BaseAssembly.Retrieve.Response(Constants.Gen1MobSurveyYearBackup, Item.DateOfBirthYearGen1, drSubject.SubjectTag, maxRows, dt);
}
return CalculateMobForGen1(monthGen1.Value, yearGen1);
case Generation.Gen2:
case Sample.Nlsy79Gen2:
if ( OverridesGen2.MissingMobInvalidSkip.Contains(drSubject.SubjectID) ) return null;

const SurveySource sourceGen2 = SurveySource.Gen2C;
Expand Down
4 changes: 2 additions & 2 deletions BaseAssembly/Outcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ public string Go( ) {
private Int32 ProcessSubject( LinksDataSet.tblSubjectRow drSubject, LinksDataSet.tblResponseDataTable dtExtended ) {
const Int32 minRowCount=0;
string itemString = "";
if( drSubject.Generation == (byte)Generation.Gen1 )
if( drSubject.Generation == (byte)Sample.Nlsy79Gen1 )
itemString = _itemIDsStringGen1;
else if( drSubject.Generation == (byte)Generation.Gen2 )
else if( drSubject.Generation == (byte)Sample.Nlsy79Gen2 )
itemString = _itemIDsStringGen2;
else
throw new InvalidOperationException("The execution should not have gotten here. The value of Generation was not recognized.");
Expand Down
8 changes: 4 additions & 4 deletions BaseAssembly/PairR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public PairR ( Int32 subjectTag1, Int32 subjectTag2, Int32 relatedID, float? r )
_isInterpolated = false;
}
public static PairR[] BuildRelatedPairsOfGen1Housemates ( DataColumn dcPass1, Int32 subjectTag1, Int32 subjectTag2, Int32 extendedID, LinksDataSet ds ) {
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag1) != Generation.Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag1 isn't Gen1.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag2) != Generation.Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag2 isn't Gen1.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag1) != Sample.Nlsy79Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag1 isn't Gen1.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag2) != Sample.Nlsy79Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag2 isn't Gen1.");
if ( dcPass1 == null ) throw new ArgumentNullException("dcPass1");
switch ( dcPass1.ColumnName ) {
case "RImplicitPass1":
Expand Down Expand Up @@ -77,8 +77,8 @@ public static PairR[] BuildRelatedPairsOfGen1Housemates ( DataColumn dcPass1, In
return pairs;
}
public static PairR[] BuildRelatedPairsOfGen2Sibs ( DataColumn dcPass1, Int32 subjectTag1, Int32 subjectTag2, Int32 extendedID, LinksDataSet ds ) {
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag1) != Generation.Gen2 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag1 isn't Gen2.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag2) != Generation.Gen2 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag2 isn't Gen2.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag1) != Sample.Nlsy79Gen2 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag1 isn't Gen2.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag2) != Sample.Nlsy79Gen2 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag2 isn't Gen2.");
if ( dcPass1 == null ) throw new ArgumentNullException("dcPass1");
switch ( dcPass1.ColumnName ) {
case "RImplicitPass1":
Expand Down
4 changes: 2 additions & 2 deletions BaseAssembly/PairShare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public PairShare ( Int32 subjectTag1, Int32 subjectTag2, Int32 relatedID, Trista
_isInterpolated = false;
}
public static PairShare[] BuildRelatedPairsOfGen1Housemates ( DataColumn dcPass1, Int32 subjectTag1, Int32 subjectTag2, Int32 extendedID, LinksDataSet ds ) {
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag1) != Generation.Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag1 isn't Gen1.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag2) != Generation.Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag2 isn't Gen1.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag1) != Sample.Nlsy79Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag1 isn't Gen1.");
if ( CommonCalculations.GenerationOfSubjectTag(subjectTag2) != Sample.Nlsy79Gen1 ) throw new ArgumentOutOfRangeException("The generation implied by subjectTag2 isn't Gen1.");
if ( dcPass1 == null ) throw new ArgumentNullException("dcPass1");
switch ( dcPass1.ColumnName ) {
case "ImplicitShareBiomomPass1":
Expand Down
2 changes: 1 addition & 1 deletion BaseAssembly/ParentsOfGen1Current.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public string Go ( ) {
LinksDataSet.tblResponseDataTable dtExtendedResponse = Retrieve.ExtendedFamilyRelevantResponseRows(extendedID, _itemIDsString, minRowCount, _ds.tblResponse);
LinksDataSet.tblSubjectRow[] subjectsInExtendedFamily = Retrieve.SubjectsInExtendFamily(extendedID, _ds.tblSubject);
foreach ( LinksDataSet.tblSubjectRow drSubject in subjectsInExtendedFamily ) {
if ( (Generation)drSubject.Generation == Generation.Gen1 ) {
if ( (Sample)drSubject.Generation == Sample.Nlsy79Gen1 ) {
Int32 recordsAddedForLoop = ProcessSubjectGen1(drSubject, dtExtendedResponse);
Interlocked.Add(ref recordsAddedTotal, recordsAddedForLoop);
}
Expand Down
2 changes: 1 addition & 1 deletion BaseAssembly/ParentsOfGen1Retro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public string Go ( ) {
LinksDataSet.tblResponseDataTable dtExtendedResponse = Retrieve.ExtendedFamilyRelevantResponseRows(extendedID, _itemIDsString, minRowCount, _ds.tblResponse);
LinksDataSet.tblSubjectRow[] subjectsInExtendedFamily = Retrieve.SubjectsInExtendFamily(extendedID, _ds.tblSubject);
foreach ( LinksDataSet.tblSubjectRow drSubject in subjectsInExtendedFamily ) {
if ( (Generation)drSubject.Generation == Generation.Gen1 ) {
if ( (Sample)drSubject.Generation == Sample.Nlsy79Gen1 ) {
Int32 recordsAddedForLoop = ProcessSubjectGen1(drSubject, dtExtendedResponse);
Interlocked.Add(ref recordsAddedTotal, recordsAddedForLoop);
}
Expand Down
4 changes: 2 additions & 2 deletions BaseAssembly/RelatedStructure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ private Int32 ProcessPair ( LinksDataSet.tblSubjectRow drSubject1, Int16 extende
}
private static RelationshipPath GetRelationshipPath ( LinksDataSet.tblSubjectRow drSubject1, LinksDataSet.tblSubjectRow drSubject2 ) {
Trace.Assert(drSubject1.ExtendedID == drSubject2.ExtendedID, "The two subject should be in the same extended family.");
if ( drSubject1.Generation == (byte)Generation.Gen1 && drSubject2.Generation == (byte)Generation.Gen1 ) {
if ( drSubject1.Generation == (byte)Sample.Nlsy79Gen1 && drSubject2.Generation == (byte)Sample.Nlsy79Gen1 ) {
return RelationshipPath.Gen1Housemates;
}
else if ( drSubject1.Generation == (byte)Generation.Gen2 && drSubject2.Generation == (byte)Generation.Gen2 ) {
else if ( drSubject1.Generation == (byte)Sample.Nlsy79Gen2 && drSubject2.Generation == (byte)Sample.Nlsy79Gen2 ) {
if ( CommonCalculations.Gen2SubjectsHaveCommonMother(drSubject1.SubjectID, drSubject2.SubjectID) ) return RelationshipPath.Gen2Siblings;
else return RelationshipPath.Gen2Cousins;
}
Expand Down
28 changes: 14 additions & 14 deletions BaseAssembly/Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@ public string Go ( ) {
sw.Start();
CheckVariableExistInImportedDataTables();
Int32 reponseRecordsAddedCount = 0;
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Links, Generation.Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen1Links);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Explicit, Generation.Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen1Explicit);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Implicit, Generation.Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen1Implicit);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2Links, Generation.Gen2, false, Constants.Gen2PassoverResponses, _dsImport.tblGen2Links);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2LinksFromGen1, Generation.Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen2LinksFromGen1);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2ImplicitFather, Generation.Gen2, false, Constants.Gen2PassoverResponses, _dsImport.tblGen2ImplicitFather);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2FatherFromGen1, Generation.Gen1, true, Constants.Gen1PassoverResponses, _dsImport.tblGen2FatherFromGen1);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Outcomes, Generation.Gen1, false, Constants.Gen1PassoverResponsesNoNegatives, _dsImport.tblGen1Outcomes);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2OutcomesHeight, Generation.Gen2, false, Constants.Gen2PassoverResponseNoNegatives, _dsImport.tblGen2OutcomesHeight);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2OutcomesWeight, Generation.Gen2, false, Constants.Gen2PassoverResponseNoNegatives, _dsImport.tblGen2OutcomesWeight);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2OutcomesMath, Generation.Gen2, false, Constants.Gen2PassoverResponseNoNegatives, _dsImport.tblGen2OutcomesMath);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Links, Sample.Nlsy79Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen1Links);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Explicit, Sample.Nlsy79Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen1Explicit);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Implicit, Sample.Nlsy79Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen1Implicit);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2Links, Sample.Nlsy79Gen2, false, Constants.Gen2PassoverResponses, _dsImport.tblGen2Links);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2LinksFromGen1, Sample.Nlsy79Gen1, false, Constants.Gen1PassoverResponses, _dsImport.tblGen2LinksFromGen1);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2ImplicitFather, Sample.Nlsy79Gen2, false, Constants.Gen2PassoverResponses, _dsImport.tblGen2ImplicitFather);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2FatherFromGen1, Sample.Nlsy79Gen1, true, Constants.Gen1PassoverResponses, _dsImport.tblGen2FatherFromGen1);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen1Outcomes, Sample.Nlsy79Gen1, false, Constants.Gen1PassoverResponsesNoNegatives, _dsImport.tblGen1Outcomes);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2OutcomesHeight, Sample.Nlsy79Gen2, false, Constants.Gen2PassoverResponseNoNegatives, _dsImport.tblGen2OutcomesHeight);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2OutcomesWeight, Sample.Nlsy79Gen2, false, Constants.Gen2PassoverResponseNoNegatives, _dsImport.tblGen2OutcomesWeight);
reponseRecordsAddedCount += TranslateExtractSource(ExtractSource.Gen2OutcomesMath, Sample.Nlsy79Gen2, false, Constants.Gen2PassoverResponseNoNegatives, _dsImport.tblGen2OutcomesMath);
sw.Stop();
return string.Format("{0:N0} response records were translated.\nElapsed time: {1}", reponseRecordsAddedCount, sw.Elapsed.ToString());
}
private Int32 TranslateExtractSource ( ExtractSource extractSource, Generation generation, bool femalesOnly, Int32[] passoverValues, DataTable dtImport ) {
private Int32 TranslateExtractSource ( ExtractSource extractSource, Sample generation, bool femalesOnly, Int32[] passoverValues, DataTable dtImport ) {
Int32 gen1ReponseRecordsAddedCount = 0;
LinksDataSet.tblVariableRow[] drsVariablesToTranslate = VariablesToTranslate(extractSource);
_dsLinks.tblResponse.BeginLoadData();

string subjectIDColumnName;
string genderColumnName;
switch ( generation ) {
case Generation.Gen1:
case Sample.Nlsy79Gen1:
subjectIDColumnName = Constants.Gen1SubjectIDColumn;
genderColumnName = Constants.Gen1GenderColumn;
break;
case Generation.Gen2:
case Sample.Nlsy79Gen2:
subjectIDColumnName = Constants.Gen2SubjectIDColumn;
genderColumnName = Constants.Gen2GenderColumn;
break;
Expand Down
Loading

0 comments on commit c239b25

Please sign in to comment.