Example #1
0
        //Edit BatchType

        public ActionResult Delete(int?id)
        {
            var _batchtypelog = new BatchTypeBl();
            var batchview     = _batchtypelog.GetAllBatchTypes().Find(x => x.BatchTypeid == id);

            return(View(batchview));
        }
//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));
        }
Example #3
0
        public ActionResult Delete(int id)
        {
            var repo          = new BatchTypeRepository();
            var _batchtypelog = new BatchTypeBl();
            var batchview     = _batchtypelog.GetBatchTypeById(id);

            _batchtypelog.Delete(batchview);
            return(RedirectToAction("GetAllBatchType"));
        }
Example #4
0
        //Single Batchtype
        public ActionResult Details(int id)
        {
            var batchtypelog = new BatchTypeBl();

            return(View(batchtypelog.GetBatchTypeById(id)));
        }