//Method to get number of animals currently in feeding lots private static int CalcAniFeeding(FeedingSchemeView model) { AnimalBusiness aniBl = new AnimalBusiness(); BatchTypeBl batchTypeBl = new BatchTypeBl(); var bDesc = batchTypeBl.GetAllBatchTypes().Find(x => x.BatchTypeid == model.BatchTypeid); return(aniBl.GetAllAnimals().Count(animalpar => animalpar.AniFeedingStatus == "FeedLot" && animalpar.BatchTypeDesc == bDesc.BatchTypeDesc)); }
//Method to get number of animals currently in feeding lots private static int CalcAniFeeding(FeedingSchemeView model) { AnimalBusiness aniBl = new AnimalBusiness(); BatchTypeBl batchTypeBl = new BatchTypeBl(); var bDesc = batchTypeBl.GetAllBatchTypes().Find(x=>x.BatchTypeid== model.BatchTypeid); return (aniBl.GetAllAnimals().Count(animalpar => animalpar.AniFeedingStatus == "FeedLot" && animalpar.BatchTypeDesc==bDesc.BatchTypeDesc)); }