コード例 #1
0
//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));
        }
コード例 #2
0
        //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));
        }