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)); }
private async Task <ProteinSearchViewModel> CreateModel(ProteinSearchQuery psq, int pageIndex) { var model = new ProteinSearchViewModel(); model.Query = psq; model.SourceOrganisms = await FaToolDbEntities.GetSourceOrganismOptions(psq.SourceOrganismID); model.SearchOptions = EnumSources.GetProteinSearchOptions(psq.SearchOption); model.StatusDescription = string.Empty; model.Results = Enumerable.Empty <ProteinSearchResult>(); model.ResultsAction = Url.Action("Results", new { pageIndex = 0 }); model.NextResultsAction = Url.Action("Results", new { pageIndex = pageIndex + 1 }); model.PreviousResultsAction = Url.Action("Results", new { pageIndex = pageIndex - 1 }); return(model); }