getASpeciesSearch() public method

public getASpeciesSearch ( ) : IList
return IList
Beispiel #1
0
        // GET: /Report/GetSpeciesList
        public ActionResult GetSpeciesList(bool ajax, string kingdom)
        {
            IGenericRepository gen = new GenericRepository();
            ITaxonRepository taxon = new TaxonRepository();

            IList<AGeneralTaxon> lists = null;

            if (kingdom.Equals("animals"))
                lists = taxon.getASpeciesSearch();
            else {
                lists = taxon.getPSpeciesSearch();
            }

            // return Json(taxons.getCountries(3, UpdateUtils.PHYLUM, UpdateUtils.ANIMALS).ToList());
            return Json(lists);
        }
Beispiel #2
0
        //
        // GET: /Report/
        public ActionResult Index()
        {
            ITaxonRepository taxons = new TaxonRepository();
            IGenericRepository generics = new GenericRepository();
            ViewData["countries"] = new SelectList(taxons.getReportCountries(), "ID", "Description");
            ViewData["paragraphs"] = new SelectList(taxons.getReportParagraphActions(), "ID", "Description");
            ViewData["phases"] = new SelectList(generics.getAllPhase(), "ID", "PhaseDesc");
            ViewData["concerns"] = new SelectList(generics.getAllLevelofConcerns(), "ID", "Description");
            ViewData["species"] = new SelectList(taxons.getASpeciesSearch(), "RecID", "TaxonName");

            IList<UsersParagraphLink> users = generics.getAllUsersBySource();
            int usercount = users.Count;
            for (int j = 0; j < usercount; j++) {
                users[j].UserID = Membership.GetUser(new Guid(users[j].UserID)).UserName;

            }

            ViewData["actors"] =
                new SelectList(users, "UserID", "UserID");

            return View();
        }
        //
        // GET: /SearchReview/
        public ActionResult Search(bool? NoSearchResults)
        {
            IGenericRepository generics = new GenericRepository();
            ITaxonRepository taxon = new TaxonRepository();

            if ((NoSearchResults != null) && (bool)NoSearchResults)
            {
                //ViewData["nosearchresults"] = true;
                TempData["flash"] = "No Search Results found. Please try Again!";
            }

            IList<AGeneralTaxon> initList = new[] { new AGeneralTaxon { RecId = 1, TaxonName = "Select" } };
            //ViewData["searchcountry"] = new SelectList(generics.getAllCountries(), "CtyRecId", "CtyShort");

            IList<AGeneralTaxon> countriesList = taxon.getCountriesSearch(0, UpdateUtils.SPECIES,
                                                                          UpdateUtils.ALL_KINGDOM);

            int count = countriesList.Count;

            ViewData["searchcountry"] = new SelectList(taxon.getCountriesSearch(0, UpdateUtils.SPECIES, UpdateUtils.ALL_KINGDOM), "RecID", "TaxonName");

            ViewData["phase"] = new SelectList(generics.getAllPhase(),"ID","PhaseDesc");
            ViewData["acountries"] = new SelectList(initList, "RecID", "TaxonName");

            ViewData["agenus"] = new SelectList(taxon.getAGenusSearch(), "RecID", "TaxonName");
            ViewData["aspecies"] = new SelectList(taxon.getASpeciesSearch(), "RecID", "TaxonName");

            return View();
        }