public ActionResult Index(int?status, string organization, string resource, bool?inspire) { List <MetadataEntry> metadataEntries = _metadataRepository.GetMetadataListWithLatestValidationResult(status, organization, resource, inspire, null); var myTimeZone = TimeZoneInfo.FindSystemTimeZoneById("W. Europe Standard Time"); ViewBag.KartkatalogUrl = System.Web.Configuration.WebConfigurationManager.AppSettings["KartkatalogUrl"]; var model = new ValidatorResultViewModel() { Organization = organization, Status = status, ResourceType = resource, Inspire = inspire, MetadataEntries = metadataEntries }; ViewBag.Organizations = new SelectList(_metadataRepository.GetAvailableOrganizations(), organization); IDictionary <int, string> statusOptions = new Dictionary <int, string> { { 1, "OK" }, { 0, "Feil" }, { -1, "Ikke validert" } }; ViewBag.StatusOptions = new SelectList(statusOptions, "Key", "Value", status); List <string> resourceTypes = new List <string>() { "service", "dataset", "series", "software", "unknown" }; ViewBag.ResourceTypes = new SelectList(resourceTypes, resource); IDictionary <bool, string> inspireOptions = new Dictionary <bool, string> { { true, "Inspire" }, { false, "Norge Digitalt" } }; ViewBag.InspireOptions = new SelectList(inspireOptions, "Key", "Value", inspire); return(View(model)); }
public ActionResult Index(string organization, string resource, bool?inspire, List <int> fields) { ViewBag.Organizations = new SelectList(_metadataRepository.GetAvailableOrganizations(), organization); List <string> resourceTypes = new List <string>() { "service", "dataset", "series", "software", "unknown" }; ViewBag.ResourceTypes = new SelectList(resourceTypes, resource); IDictionary <bool, string> inspireOptions = new Dictionary <bool, string> { { true, "Inspire" }, { false, "Norge Digitalt" } }; ViewBag.InspireOptions = new SelectList(inspireOptions, "Key", "Value", inspire); IDictionary <int, string> availableFields = new Dictionary <int, string> { { 1, "Kontaktinformasjon" }, { 2, "Sammendrag" }, { 3, "Formål" }, { 4, "Nøkkelord" } }; ViewBag.AvailableFields = new MultiSelectList(availableFields, "Key", "Value", fields); List <MetadataEntry> metadataEntries = _metadataRepository.GetMetadataList(organization, resource, inspire); var model = new ReportViewModel() { Organization = organization, ResourceType = resource, Inspire = inspire, MetadataEntries = metadataEntries, Fields = fields }; return(View(model)); }