public ActionResult GetOapSubTypes(int oapTypeId, string textField, string valueField)
 {
     return(GridViewExtension.GetComboBoxCallbackResult(p => {
         p.TextField = textField;
         p.ValueField = valueField;
         var oapSubTypes = OapHierarchyClient.GetAsync(oapTypeId).Result.Result.Data?.ChildrenHierarchies ?? new ObservableCollection <OapHierarchy>();
         p.BindList(oapSubTypes);
     }));
 }
Esempio n. 2
0
        public ActionResult OapSubType(int?oapTypeId, string oapTypeName)
        {
            if (!oapTypeId.HasValue)
            {
                return(new EmptyResult());
            }
            //Set View Data
            ViewData[CurrentTypeId]   = oapTypeId.Value;
            ViewData[CurrentTypeName] = oapTypeName;

            var response = OapHierarchyClient.GetAsync(oapTypeId ?? 0).Result;

            return(PartialView("OapTypesDetailsPartial", response.Result.Data.ChildrenHierarchies));
        }