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());
        }
示例#2
0
        internal string getJSONResponse(string cmpContext)
        {
            GXJObject jsonCmdWrapper = new GXJObject(context.IsMultipartRequest);

            try
            {
                if (commands.AllowUIRefresh)
                {
                    if (string.IsNullOrEmpty(cmpContext))
                    {
                        cmpContext = "MAIN";
                    }
                    context.SaveComponentMsgList(cmpContext);
                    Grids.Reverse();

                    jsonCmdWrapper.Put("gxProps", PropValues);
                    jsonCmdWrapper.Put("gxHiddens", HiddenValues);
                    jsonCmdWrapper.Put("gxValues", AttValues);
                    jsonCmdWrapper.Put("gxMessages", Messages);
                    jsonCmdWrapper.Put("gxComponents", WebComponents);
                    jsonCmdWrapper.Put("gxGrids", Grids);
                }
                foreach (DictionaryEntry LoadCommand in LoadCommands)
                {
                    appendAjaxCommand("load", (JObject)LoadCommand.Value);
                }
                if (commands.Count > 0)
                {
                    jsonCmdWrapper.Put("gxCommands", commands.JSONArray);
                }
            }
            catch (Exception ex)
            {
                GXLogging.Error(log, "getJSONResponse error", ex);
            }
            return(jsonCmdWrapper.ToString());
        }