public ActionResult GenericIndicator(int indicatorId) { var model = new IndicatorEdit { SelectedIndicatorId = indicatorId }; IList <IndicatorMetadataTextProperty> properties = _reader.GetIndicatorMetadataTextProperties(); model.TextValues = _reader.GetIndicatorTextValues(indicatorId, properties, null).ToList(); return(View("IndicatorEdit", model)); }
public ActionResult IndicatorNew() { // Get text properties of selected indicator var properties = _reader.GetIndicatorMetadataTextProperties(); var userId = _reader.GetUserByUserName(UserDetails.CurrentUser().Name).Id; var permissionIds = _reader.GetUserGroupPermissionsByUserId(userId).Select(x => x.ProfileId); var model = new ProfileIndex { Profiles = _reader.GetProfiles() .OrderBy(x => x.Name) .Where(x => permissionIds.Contains(x.Id)) }; var listOfProfiles = CommonUtilities.GetOrderedListOfProfiles(model.Profiles); ViewBag.listOfProfiles = listOfProfiles; var domains = new ProfileMembers(); var defaultProfile = listOfProfiles.FirstOrDefault(); ViewBag.listOfDomains = CommonUtilities.GetOrderedListOfDomainsWithGroupId(domains, defaultProfile, _profileRepository); ViewBag.selectedSex = new SelectList(_lookUpsRepository.GetSexes(), "SexID", "Description"); ViewBag.selectedAge = new SelectList(_lookUpsRepository.GetAges(), "AgeID", "Description"); var comparatorOptions = CommonUtilities.GetListOfComparators(ComparatorIds.NationalAndSubnational); ViewBag.selectedComparator = new SelectList(comparatorOptions, "Value", "Text"); ViewBag.selectedComparatorMethod = new SelectList(_reader.GetAllComparatorMethods(), "Id", "Name"); ViewBag.selectedYearType = new SelectList(_lookUpsRepository.GetYearTypes(), "Id", "Label"); ViewBag.selectedValueType = new SelectList(_lookUpsRepository.GetIndicatorValueTypes(), "Id", "Label"); ViewBag.selectedCIMethodType = new SelectList(_lookUpsRepository.GetConfidenceIntervalMethods(), "Id", "Name"); ViewBag.selectedUnitType = new SelectList(_lookUpsRepository.GetUnits(), "Id", "Label"); ViewBag.selectedDenominatorType = new SelectList(_lookUpsRepository.GetDenominatorTypes(), "Id", "Name"); return(View(properties)); }
public ActionResult BrowseIndicatorDataFullPage(int indicatorId) { IList <IndicatorMetadataTextProperty> properties = _reader.GetIndicatorMetadataTextProperties(); var values = _reader.GetIndicatorTextValues(indicatorId, properties, null).ToList(); return(View(new BrowseIndicatorDataFullPageViewModel { IndicatorId = indicatorId, IndicatorName = values.First(x => x.IndicatorMetadataTextProperty.PropertyId == IndicatorTextMetadataPropertyIds.Name).ValueGeneric })); }