public decimal GetUSGallonsVolume(ManureMaterialType manureMaterialType, decimal amountToConvert, AnnualAmountUnits amountUnit) { if (manureMaterialType == ManureMaterialType.Liquid) { var converstionFactor = _repository .GetLiquidMaterialsConversionFactors() .Single(cf => cf.InputUnit == amountUnit); var usGallonsCoverted = converstionFactor.USGallonsOutput * amountToConvert; return(usGallonsCoverted); } return(0); }
public decimal GetCubicMetersVolume(ManureMaterialType manureMaterialType, decimal moistureWholePercent, decimal amountToConvert, AnnualAmountUnits amountUnit) { if (manureMaterialType == ManureMaterialType.Solid) { var converstionFactor = _repository .GetSolidMaterialsConversionFactors() .Single(cf => cf.InputUnit == amountUnit); var cubicMetersConverted = GetDensityFactoredConversionUsingMoisture(moistureWholePercent, converstionFactor.CubicMetersOutput) * amountToConvert; return(cubicMetersConverted); } return(0); }
public decimal GetTonsWeight(ManureMaterialType manureMaterialType, decimal moistureWholePercent, decimal amountToConvert, AnnualAmountUnits amountUnit) { if (manureMaterialType == ManureMaterialType.Solid) { var converstionFactor = _repository .GetSolidMaterialsConversionFactors() .Single(cf => cf.InputUnit == amountUnit); var tonsConverted = GetDensityFactoredConversionUsingMoisture(moistureWholePercent, converstionFactor.MetricTonsOutput) * amountToConvert; return(tonsConverted); } else { return(0); } }