/// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        public override void ExecuteResult(ControllerContext context)
        {
            DirectResponse response = new DirectResponse();

            response.Result   = this.Result;
            response.IsUpload = this.IsUpload;

            response.Success      = ResourceManager.AjaxSuccess;
            response.ErrorMessage = ResourceManager.AjaxErrorMessage;

            if (!string.IsNullOrEmpty(this.ErrorMessage))
            {
                response.Success      = false;
                response.ErrorMessage = this.ErrorMessage;
            }
            else
            {
                if (!string.IsNullOrEmpty(this.Script))
                {
                    response.Script = this.Script;
                }

                if (this.ExtraParamsResponse.Count > 0)
                {
                    response.ExtraParamsResponse = this.ExtraParamsResponse.ToJson();
                }
            }

            response.Return();
        }
        public void ProcessRequest(HttpContext context)
        {
            System.Threading.Thread.Sleep(8000);
            DirectResponse r = new DirectResponse();

            r.Return();
        }
        public void ProcessRequest(HttpContext context)
        {
            DirectResponse r = new DirectResponse();

            X.Js.Call("Ext.toast", "The Server Time is: " + DateTime.Now.ToLongTimeString(), 2000);

            r.Return();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        public override void ExecuteResult(ControllerContext context)
        {
            DirectResponse response = new DirectResponse();

            response.Result   = this.Result;
            response.IsUpload = this.IsUpload;

            if (!string.IsNullOrEmpty(this.ErrorMessage))
            {
                response.Success      = false;
                response.ErrorMessage = this.ErrorMessage;
            }
            else
            {
                if (HttpContext.Current != null)
                {
                    var instanceScript = HttpContext.Current.Items[ResourceManager.INSTANCESCRIPT];
                    if (instanceScript != null)
                    {
                        this.Script = instanceScript.ToString() + (this.Script ?? "");
                    }
                }

                if (!string.IsNullOrEmpty(this.Script))
                {
                    response.Script = string.Concat("<string>", this.Script);
                }

                if (this.ExtraParamsResponse.Count > 0)
                {
                    response.ExtraParamsResponse = this.ExtraParamsResponse.ToJson();
                }
            }

            response.Return();
        }
Beispiel #5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        public override void ExecuteResult(ControllerContext context)
        {
            DirectResponse response = new DirectResponse();

            response.Result = this.Result;
			response.IsUpload = this.IsUpload;

            if (!string.IsNullOrEmpty(this.ErrorMessage))
            {
                response.Success = false;
                response.ErrorMessage = this.ErrorMessage;
            }
            else
            {                
                if (!string.IsNullOrEmpty(this.Script))
                {
                    response.Script = this.Script;
                }

                if (this.ExtraParamsResponse.Count > 0)
                {
                    response.ExtraParamsResponse = this.ExtraParamsResponse.ToJson();
                }
            }
            
            response.Return();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        public override void ExecuteResult(ControllerContext context)
        {
            DirectResponse response = new DirectResponse();

            response.Result = this.Result;
			response.IsUpload = this.IsUpload;

            if (!string.IsNullOrEmpty(this.ErrorMessage))
            {
                response.Success = false;
                response.ErrorMessage = this.ErrorMessage;
            }
            else
            {
                if (HttpContext.Current != null)
                {
                    var instanceScript = HttpContext.Current.Items[ResourceManager.INSTANCESCRIPT];
                    if (instanceScript != null)
                    {
                        this.Script = instanceScript.ToString()  + (this.Script ?? "");
                    }
                }
                
                if (!string.IsNullOrEmpty(this.Script))
                {
                    response.Script = string.Concat("<string>", this.Script);
                }

                if (this.ExtraParamsResponse.Count > 0)
                {
                    response.ExtraParamsResponse = this.ExtraParamsResponse.ToJson();
                }
            }
            
            response.Return();
        }