public ActionResult MapBuilder(int?id)
        {
            if (!id.HasValue)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            MapBuilderViewModel vm = map_repo.GetMapBuilderViewModel(id.Value);

            if (vm == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            ViewBag.Years = vm.Years;

            Genus genus = vm.Map.Genus;

            ViewBag.GenusId = vm.Map.GenusId;
            ViewBag.Virus1  = genus.VirusLabel1;
            ViewBag.Virus2  = genus.VirusLabel2;
            ViewBag.Virus3  = genus.VirusLabel3;
            ViewBag.Virus4  = genus.VirusLabel4;

            return(View(vm));
        }
Exemple #2
0
        public ActionResult PhenotypeEntryYear(int?mapId)
        {
            if (!mapId.HasValue)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            MapBuilderViewModel vm = map_repo.GetMapBuilderViewModel(mapId.Value);

            ViewBag.Years = vm.Years;

            if (vm == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            return(View(vm));
        }