示例#1
0
 private void UpdateNavigateUrlIfRequired()
 {
     if (!this.isQuertyParametersInitializied && this.QueryParameters.Count > 0)
     {
         string text = base.NavigateUrl;
         if (string.IsNullOrEmpty(text))
         {
             throw new ArgumentException("NavigateUrl must be specified, QueryParameters is used.");
         }
         foreach (Binding binding in this.QueryParameters)
         {
             StaticBinding staticBinding = (StaticBinding)binding;
             if (staticBinding.HasValue || !staticBinding.Optional)
             {
                 if (staticBinding.Value is Identity)
                 {
                     text = EcpUrl.AppendQueryParameter(text, staticBinding.Name, ((Identity)staticBinding.Value).RawIdentity);
                 }
                 else
                 {
                     text = EcpUrl.AppendQueryParameter(text, staticBinding.Name, staticBinding.Value.ToString());
                 }
             }
         }
         base.NavigateUrl = text;
         this.isQuertyParametersInitializied = true;
     }
 }
 protected override void OnPreRender(EventArgs e)
 {
     base.OnPreRender(e);
     base.Attributes.Add("vm-WebServiceMethodName", this.WebServiceMethodName);
     base.Attributes.Add("vm-WebServiceParameterName", this.WebServiceParameterName.ToJsonString(null));
     base.Attributes.Add("vm-ShowErrors", this.ShowErrors.ToJsonString(null));
     base.Attributes.Add("vm-NextOnError", this.NextOnError.ToJsonString(null));
     base.Attributes.Add("vm-NextOnCancel", this.NextOnCancel.ToJsonString(null));
     base.Attributes.Add("vm-ParameterNamesList", this.ParameterNamesList);
     if (this.ServiceUrl != null)
     {
         base.Attributes.Add("vm-ServiceUrl", EcpUrl.ProcessUrl(this.ServiceUrl.ServiceUrl));
     }
 }
示例#3
0
        protected override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            IEnumerable <ScriptDescriptor> scriptDescriptors       = base.GetScriptDescriptors();
            ScriptControlDescriptor        scriptControlDescriptor = (ScriptControlDescriptor)scriptDescriptors.First <ScriptDescriptor>();

            scriptControlDescriptor.AddProperty("ServiceUrl", EcpUrl.ProcessUrl(this.ServiceUrl.ServiceUrl));
            scriptControlDescriptor.AddProperty("SupportAsyncGetList", this.SupportAsyncGetList, true);
            scriptControlDescriptor.AddProperty("ClientSort", this.ClientSort, true);
            if (this.RefreshCookieName != null)
            {
                scriptControlDescriptor.AddProperty("RefreshCookieName", this.RefreshCookieName);
            }
            if (!this.RefreshAfter.IsNullOrEmpty())
            {
                scriptControlDescriptor.AddProperty("RefreshAfter", this.RefreshAfter);
            }
            scriptControlDescriptor.AddComponentProperty("RefreshWebServiceMethod", this.RefreshWebServiceMethod.ClientID);
            return(scriptDescriptors);
        }