public void LoadCounts(CuttingUnitDO unit) { var counts = new List <CountTree>(); var tallySettings = DAL.From <TallySettings>() .Where("SampleGroup_CN = @p1") .GroupBy("CountTree.SampleGroup_CN", "CountTree.TreeDefaultValue_CN", "CountTree.Tally_CN") .Read(SampleGroup_CN); foreach (TallySettings ts in tallySettings) { CountTree count = DAL.From <CountTree>() .Where("CuttingUnit_CN = @p1 AND SampleGroup_CN = @p2 AND Tally_CN = @p3") .Read(unit.CuttingUnit_CN , ts.SampleGroup_CN , ts.Tally_CN).FirstOrDefault(); if (count == null) { count = new CountTree(DAL); count.CuttingUnit = unit; count.SampleGroup_CN = ts.SampleGroup_CN; count.TreeDefaultValue_CN = ts.TreeDefaultValue_CN; count.Tally_CN = ts.Tally_CN; count.Save(); } count.SampleGroup = this; counts.Add(count); } Counts = counts; }
public void OnTally(FSCruiser.Core.Models.CountTree count) { if (_viewLoading) { return; } this.DataEntryController.OnTally(count); this._BS_tallyHistory.MoveLast(); }
public TallyAction(Tree treeRecord, CountTree count) { TreeRecord = treeRecord; }
public TallyAction(CountTree count) : this() { Count = count; }