public VersesData(NewDataSet.storyRow theStoryRow, NewDataSet projFile) { NewDataSet.versesRow[] theVersesRows = theStoryRow.GetversesRows(); NewDataSet.versesRow theVersesRow; if (theVersesRows.Length == 0) { theVersesRow = projFile.verses.AddversesRow(theStoryRow); } else { theVersesRow = theVersesRows[0]; } foreach (NewDataSet.verseRow aVerseRow in theVersesRow.GetverseRows()) { Add(new VerseData(aVerseRow, projFile)); } // the zeroth verse is special for global connotes if ((Count > 0) && this[0].IsFirstVerse) { FirstVerse = this[0]; RemoveAt(0); } else { CreateFirstVerse(); } }
public CraftingInfoData(NewDataSet.storyRow theStoryRow) { NewDataSet.CraftingInfoRow[] aCIRs = theStoryRow.GetCraftingInfoRows(); if (aCIRs.Length == 1) { NewDataSet.CraftingInfoRow theCIR = aCIRs[0]; if (!theCIR.IsNonBiblicalStoryNull()) { IsBiblicalStory = !theCIR.NonBiblicalStory; } NewDataSet.StoryCrafterRow[] aSCRs = theCIR.GetStoryCrafterRows(); if (aSCRs.Length == 1) { StoryCrafterMemberID = aSCRs[0].memberID; } else { throw new ApplicationException(Properties.Resources.IDS_ProjectFileCorrupted); } NewDataSet.ProjectFacilitatorRow[] aPFRs = theCIR.GetProjectFacilitatorRows(); if (aPFRs.Length == 1) { ProjectFacilitatorMemberID = aPFRs[0].memberID; } if (!theCIR.IsStoryPurposeNull()) { StoryPurpose = theCIR.StoryPurpose; } if (!theCIR.IsResourcesUsedNull()) { ResourcesUsed = theCIR.ResourcesUsed; } NewDataSet.BackTranslatorRow[] aBTRs = theCIR.GetBackTranslatorRows(); if (aBTRs.Length == 1) { BackTranslatorMemberID = aBTRs[0].memberID; } NewDataSet.TestsRow[] aTsRs = theCIR.GetTestsRows(); if (aTsRs.Length == 1) { foreach (NewDataSet.TestRow aTR in aTsRs[0].GetTestRows()) { Testors.Add(aTR.memberID); } } } else { throw new ApplicationException(Properties.Resources.IDS_ProjectFileCorruptedNoCraftingInfo); } }
public StoryData(NewDataSet.storyRow theStoryRow, NewDataSet projFile, bool bHasIndependentConsultant) { Name = theStoryRow.name; guid = theStoryRow.guid; StageTimeStamp = (theStoryRow.IsstageDateTimeStampNull()) ? DateTime.Now : theStoryRow.stageDateTimeStamp; ProjStage = new StoryStageLogic(theStoryRow.stage, bHasIndependentConsultant); CraftingInfo = new CraftingInfoData(theStoryRow); Verses = new VersesData(theStoryRow, projFile); }