Exemplo n.º 1
0
        public async Task <ActionResult> ContentsListForClassifier(string elementIdPrefix, [FromQuery(Name = "fieldID")] int fieldId)
        {
            var classifier = FieldService.Read(fieldId);

            ViewBag.ElementIdPrefix         = elementIdPrefix;
            ViewBag.ContentElementID        = string.Format("{0}_contentID", ViewBag.ElementIdPrefix);
            ViewBag.IsNullCheckBoxElementID = string.Format("{0}_isNullCheckBox", ViewBag.ElementIdPrefix);
            IEnumerable <QPSelectListItem> model = FieldService.GetAggregetableContentsForClassifier(classifier).Select(o => new QPSelectListItem {
                Value = o.Value, Text = o.Text
            }).ToList();

            return(await JsonHtml("ContentsListForClassifier", model));
        }