Пример #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));
        }
Пример #3
0
 public ActionResult InsertDeadAnimals()
 {
     ViewBag.Batchtypeid = new SelectList(_db2.GetAllBatchTypes(), "BatchTypeid", "BatchTypeDesc");
     return(View());
 }
Пример #4
0
        //private readonly IBatchTypeBl _db;

        // public BatchTypeController(IBatchTypeBl db)
        //{
        //    this._db = db;
        //}


        //Get all batchtype
        public ActionResult GetAllBatchType()
        {
            return(View(_db.GetAllBatchTypes()));
        }
Пример #5
0
 public ActionResult InsertAnimals(AnimalView model)
 {
     ViewBag.Batchtypeid = new SelectList(_db2.GetAllBatchTypes(), "BatchTypeid", "BatchTypeDesc");
     return(View(ani.GetAnimalById2(model)));
 }
 public ActionResult AddFeedingScheme()
 {
     ViewBag.BatchTypeid = new SelectList(_bTypeBl.GetAllBatchTypes(), "BatchTypeid", "BatchTypeDesc");
     return(View());
 }