//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)); }
public ActionResult Delete(int id) { var repo = new BatchTypeRepository(); var _batchtypelog = new BatchTypeBl(); var batchview = _batchtypelog.GetBatchTypeById(id); _batchtypelog.Delete(batchview); return(RedirectToAction("GetAllBatchType")); }
//Single Batchtype public ActionResult Details(int id) { var batchtypelog = new BatchTypeBl(); return(View(batchtypelog.GetBatchTypeById(id))); }