public void ajax_rsp_assign_sdt_attri(String CmpContext, bool IsMasterPage, String AttName, Object SdtObj) { if (isJsOutputEnabled) { if (!context.isSpaRequest() || (context.isSpaRequest() && String.IsNullOrEmpty(CmpContext))) { try { JObject obj = GetGxObject(AttValues, CmpContext, IsMasterPage); if (obj != null) { IGxJSONAble SdtObjJson = SdtObj as IGxJSONAble; if (SdtObjJson != null) { obj.Put(AttName, SdtObjJson.GetJSONObject()); } else { Array array = SdtObj as Array; if (array != null) { JArray jArray = new JArray(array); obj.Put(AttName, jArray); } } } } catch (Exception ex) { GXLogging.Error(log, "ajax_rsp_assign_sdt_attri error", ex); } } } }
public string getJSONContainerResponse(IGxJSONAble Container) { GXJObject jsonCmdWrapper = new GXJObject(context.IsMultipartRequest); try { jsonCmdWrapper.Put("gxHiddens", HiddenValues); jsonCmdWrapper.Put("gxContainer", Container.GetJSONObject()); } catch (JsonException) { } return(jsonCmdWrapper.ToString()); }
public static JArray GetParmsJArray(Object[] parms) { JArray inputs = new JArray(); for (int i = 0; i < parms.Length; i++) { Object parm = parms[i]; IGxJSONAble jparm = parm as IGxJSONAble; if (jparm != null) { inputs.Add(jparm.GetJSONObject()); } else { inputs.Add(parm); } } return(inputs); }
public void ajax_rsp_assign_hidden_sdt(String SdtName, Object SdtObj) { try { IGxJSONAble SdtObjJson = SdtObj as IGxJSONAble; if (SdtObjJson != null) { HiddenValues.Put(SdtName, SdtObjJson.GetJSONObject()); } else { Array array = SdtObj as Array; if (array != null) { JArray jArray = new JArray(array); HiddenValues.Put(SdtName, jArray); } } } catch (JsonException) { } }