/// <summary> /// Copy the supplement eaten into a TSupplementEaten[] /// </summary> /// <param name="Model"></param> /// <param name="aValue"></param> public static void MakeSuppEaten(TStockList Model, ref TSupplementEaten[] aValue) { int iCount; int iPadd; uint Idx; iCount = 0; for (iPadd = 0; iPadd <= Model.Paddocks.Count() - 1; iPadd++) { if (Model.Paddocks.byIndex(iPadd).SuppRemovalKG > 0.0) { iCount++; } } aValue = new TSupplementEaten[iCount]; Idx = 0; for (iPadd = 0; iPadd <= Model.Paddocks.Count() - 1; iPadd++) { if (Model.Paddocks.byIndex(iPadd).SuppRemovalKG > 0.0) { aValue[Idx] = new TSupplementEaten(); aValue[Idx].paddock = Model.Paddocks.byIndex(iPadd).sName; aValue[Idx].eaten = Model.Paddocks.byIndex(iPadd).SuppRemovalKG; Idx++; } } }
/// <summary> /// Copy the supplement eaten into a TSupplementEaten[] /// </summary> /// <param name="Model"></param> /// <param name="aValue"></param> public static void MakeSuppEaten(TStockList Model, ref TSupplementEaten[] aValue) { int iCount; int iPadd; uint Idx; iCount = 0; for (iPadd = 0; iPadd <= Model.Paddocks.Count() - 1; iPadd++) { if (Model.Paddocks.byIndex(iPadd).SuppRemovalKG > 0.0) iCount++; } aValue = new TSupplementEaten[iCount]; Idx = 0; for (iPadd = 0; iPadd <= Model.Paddocks.Count() - 1; iPadd++) if (Model.Paddocks.byIndex(iPadd).SuppRemovalKG > 0.0) { aValue[Idx] = new TSupplementEaten(); aValue[Idx].paddock = Model.Paddocks.byIndex(iPadd).sName; aValue[Idx].eaten = Model.Paddocks.byIndex(iPadd).SuppRemovalKG; Idx++; } }