public ActionResult PetSpecie()
        {
            if (Session["Authen"] == null)
            {
                return(RedirectToAction("Login", "Home"));
            }
            IEnumerable <Specie> species = _SpecieRepo.GetAll();

            return(View(species));
        }
Beispiel #2
0
        public IEnumerable <SelectListItem> GetComboSpecies()
        {
            var list = _specieRepository.GetAll().Select(s => new SelectListItem
            {
                Text  = s.Name,
                Value = s.Id.ToString()
            }).OrderBy(l => l.Text).ToList();

            list.Insert(0, new SelectListItem
            {
                Text  = "(Select a specie...)",
                Value = "0"
            });

            return(list);
        }
        public ActionResult MemberPet(int id)
        {
            if (Session["Authen"] == null)
            {
                return(RedirectToAction("Login", "Home"));
            }

            MemberPetViewModel memberPet = new MemberPetViewModel
            {
                member  = _MemberRepo.GetByID(id),
                pets    = _PetRepo.GetByMemberID(id),
                species = _SpecieRepo.GetAll()
            };

            return(View(memberPet));
        }
        // GET: Species
        public IActionResult Index()
        {
            var specie = _specieRepository.GetAll().ToList();

            return(View(specie));
        }
Beispiel #5
0
        /// <summary>
        /// Obtiene los valores estadisticos: cantidad de humanos y mutantes y el ratio
        /// </summary>
        /// <returns></returns>
        public async Task <Stats> GetValueStatistics()
        {
            var specie = await _especieRepository.GetAll();

            return(AnalyzEstatistics.EstatisticsSpecie(specie.Select(SpecieMapper.Map)));
        }