public void CreateTrees(IPlotDataService dataService) { for (long i = 0; i < this.TreeCount; i++) { Tree t = dataService.CreateNewTreeEntry(this, (SampleGroup)null, (TreeDefaultValueDO)null, false); t.TreeCount = 1; t.CountOrMeasure = "M"; t.TreeNumber = i + 1; t.Save(); this.AddTree(t); } }
public void Tally(IPlotDataService dataService, IFixCNTTallyBucket tallyBucket) { var tree = dataService.CreateNewTreeEntry(this, tallyBucket.TallyPopulation.SampleGroup, tallyBucket.TallyPopulation.TreeDefaultValue, false); tallyBucket.TallyPopulation.TallyClass.SetTreeFieldValue(tree, tallyBucket); if (tree.TrySave()) { Trees.Add(tree); } NotifyTallyCountChanged(tallyBucket); }