public virtual Plot MakePlot(CuttingUnit cuttingUnit) { Plot newPlot; if (this.Is3PPNT) { newPlot = new Plot3PPNT(DAL) { CuttingUnit = cuttingUnit, Stratum = this, PlotNumber = GetNextPlotNumber(cuttingUnit.CuttingUnit_CN.Value) }; } else { newPlot = new Plot(this.DAL) { CuttingUnit = cuttingUnit, Stratum = this, PlotNumber = GetNextPlotNumber(cuttingUnit.CuttingUnit_CN.Value) }; } newPlot.Trees = new System.ComponentModel.BindingList <Tree>(); return(newPlot); }
public override Plot MakePlot(CuttingUnit cuttingUnit) { return(new FixCNTPlot(this.DAL) { CuttingUnit = cuttingUnit, Stratum = this, PlotNumber = GetNextPlotNumber(cuttingUnit.CuttingUnit_CN.Value), Trees = new System.ComponentModel.BindingList <Tree>(), }); }
public void Initialize(FMSC.ORM.Core.Datastore datastore, CuttingUnit cuttingUnit) { if (!String.IsNullOrEmpty(cuttingUnit.TallyHistory)) { var array = Deserialize(cuttingUnit.TallyHistory); _list = new List <TallyAction>(array); Inflate(datastore); OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1)); } }
public void Save(CuttingUnit cuttingUnit) { try { var xmlStr = Serialize(); if (!String.IsNullOrEmpty(xmlStr)) { cuttingUnit.TallyHistory = xmlStr; cuttingUnit.Save(); } } catch (Exception e) { throw new TallyHistoryPersistanceException("Unable to save tally history", e); } }