public ActionResult Index(bool?firstLoad, int?genusId)
        {
            var user = User.Identity;

            ViewBag.IsAuth = user.IsAuthenticated;
            ViewBag.Name   = user.Name;
            var sessionGenusId = SessionManager.GetGenusId();

            if (firstLoad.HasValue && firstLoad.Value == false && !genusId.HasValue)
            {
                ViewBag.firstLoad = "false";
            }
            if (genusId.HasValue && genusId.Value != sessionGenusId)
            {
                Genus genus = m_repo.GetGenus(genusId.Value);

                if (genus != null)
                {
                    SessionManager.Genus = genus;
                    sessionGenusId       = genus.Id;
                }
            }
            ViewBag.genusId         = new SelectList(m_repo.GetAllGenera(), "Id", "Value", sessionGenusId);
            ViewBag.SelectedGenusId = sessionGenusId.GetValueOrDefault();
            return(View());
        }
        // GET: CrossTypes
        public ActionResult Index()
        {
            var genera = m_repo.GetAllGenera();

            if (!genera.IsNullOrEmpty())
            {
                return(View(genera));
            }
            return(RedirectToAction("Index", "Home"));
        }
        // GET: Genus
        public ActionResult Index()
        {
            IEnumerable <Genus> genus = m_repo.GetAllGenera();

            if (genus.IsNullOrEmpty())
            {
                return(RedirectToAction("Create"));
            }
            return(View(genus.ToList()));
        }
        public ActionResult Accessions()
        {
            ViewBag.Genus = new SelectList(m_repo.GetAllGenera().Where(t => t.Retired == false).OrderBy(t => t.Name), "Id", "Value", SessionManager.GetGenusId());
            string year = DateTime.Now.Year.ToString();
            AccessionReportViewModel vm = r_repo.GetAccessionReportViewModel(SessionManager.GetGenusId(), year);

            return(View(vm));
        }