Exemple #1
0
        private async Task <ActionResult> ChangeTerm(Annotation annotation, TermQuery termQuery, AnnotationEditArgs editArgs)
        {
            ViewBag.Title = "Change Term";

            var model = new AnnotationEditViewModel();

            model.Args            = editArgs;
            model.Entity          = annotation;
            model.TermQuery       = termQuery;
            model.OntologyOptions = await FaToolDbEntities.GetOntologyOptions(model.TermQuery.OntologyId);

            return(View("ChangeTerm", model));
        }
Exemple #2
0
        private async Task <ActionResult> Edit(Annotation annotation, AnnotationEditArgs editArgs)
        {
            ViewBag.Title = "Edit Annotation";

            var model = new AnnotationEditViewModel();

            model.Args              = editArgs;
            model.Entity            = annotation;
            model.GoEvidenceOptions = EnumSources.GetGoEvidenceOptions(annotation.EvidenceCode);
            model.TermOptions       = await FaToolDbEntities.GetSelectedTerm(annotation.FK_Term);

            return(View("Edit", model));
        }
Exemple #3
0
        private async Task <ActionResult> SelectTerm(Annotation annotation, TermQuery termQuery, AnnotationEditArgs editArgs)
        {
            ViewBag.Title = "Select Term";

            var model = new AnnotationEditViewModel();

            model.Args            = editArgs;
            model.Entity          = annotation;
            model.TermQuery       = termQuery;
            model.OntologyOptions = await FaToolDbEntities.GetOntologyOptions(model.TermQuery.OntologyId);

            model.TermOptions = await FaToolDbEntities.GetTermOptions(termQuery, annotation.FK_Term);

            if (model.TermOptions.Any())
            {
                return(View("SelectTerm", model));
            }
            else
            {
                ModelState.AddModelError("TermQuery.SearchValue", "No Terms found.");
                return(View("ChangeTerm", model));
            }
        }