public ActionResult AddSubTaxa(int id)
        {
            TempData["context"] = "Add SubTaxa";
            AddSubTaxaViewModel addSubTaxaViewModel = new AddSubTaxaViewModel();
            Species             species             = null;

            try
            {
                TaxonomyService _taxonomyService = new TaxonomyService(AuthenticatedUserSession.Environment);
                species = _taxonomyService.GetSpecies(id);
                addSubTaxaViewModel.SpeciesName   = species.Name;
                addSubTaxaViewModel.GenusName     = species.GenusName;
                addSubTaxaViewModel.NameAuthority = species.NameAuthority;
                addSubTaxaViewModel.Protologue    = species.Protologue;
                addSubTaxaViewModel.ProtologueURL = species.ProtologueVirtualPath;
            }
            catch (Exception ex)
            {
            }
            return(View(BASE_PATH + "/AddSubTaxa.cshtml", addSubTaxaViewModel));
        }
        public ActionResult Edit(int id = 0)
        {
            Species species = null;
            SpeciesEditViewModel viewModel = null;

            TaxonomyService _taxonomyService = new TaxonomyService(AuthenticatedUserSession.Environment);

            try
            {
                if (id > 0)
                {
                    TempData["context"] = "Edit Species";
                    species             = _taxonomyService.GetSpecies(id);
                    viewModel           = new SpeciesEditViewModel();
                    viewModel.ID        = species.ID;
                    viewModel.CurrentTaxonomySpeciesID = species.CurrentTaxonomySpeciesID;
                    viewModel.NomenNumber              = species.NomenNumber;
                    viewModel.IsSpecificHybrid         = species.IsSpecificHybrid;
                    viewModel.SpeciesName              = species.SpeciesName;
                    viewModel.Name                     = species.Name;
                    viewModel.IsAcceptedName           = species.IsAcceptedName;
                    viewModel.Authority                = species.Authority;
                    viewModel.IsSubSpecificHybrid      = species.IsSubSpecificHybrid;
                    viewModel.SubSpeciesName           = species.SubSpeciesName;
                    viewModel.SubSpeciesAuthority      = species.SubSpeciesAuthority;
                    viewModel.IsVarietalHybrid         = species.IsVarietalHybrid;
                    viewModel.VarietyName              = species.VarietyName;
                    viewModel.VarietyAuthority         = species.VarietyAuthority;
                    viewModel.FormaName                = species.FormaName;
                    viewModel.FormaAuthority           = species.FormaAuthority;
                    viewModel.FormaRankType            = species.FormaRankType;
                    viewModel.GenusID                  = species.GenusID;
                    viewModel.GenusName                = species.GenusName;
                    viewModel.Protologue               = species.Protologue;
                    viewModel.NameAuthority            = species.NameAuthority;
                    viewModel.GenusID                  = species.GenusID;
                    viewModel.GenusName                = species.GenusName;
                    viewModel.Authority                = species.Authority;
                    viewModel.CreatedDate              = species.CreatedDate;
                    viewModel.CreatedByCooperatorID    = species.CreatedByCooperatorID;
                    viewModel.CreatedByCooperatorName  = species.CreatedByCooperatorName;
                    viewModel.ModifiedDate             = species.ModifiedDate;
                    viewModel.ModifiedByCooperatorID   = species.ModifiedByCooperatorID;
                    viewModel.ModifiedByCooperatorName = species.ModifiedByCooperatorName;
                    viewModel.Note                     = species.Note;
                    viewModel.Citations                = species.Citations;
                    viewModel.CommonNames              = species.CommonNames;
                    //viewModel.Usages = species.Usages;
                    //viewModel.RegulationMappings = species.RegulationMappings;
                }
                else
                {
                    TempData["context"] = "Add Species";
                    viewModel           = new SpeciesEditViewModel();
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex, ex.Message + ex.StackTrace);
                return(RedirectToAction("InternalServerError", "Error"));
            }
            return(View(BASE_PATH + "/Edit.cshtml", viewModel));
        }