Example #1
0
 protected override void OnPreRender(EventArgs e)
 {
     if (!this.HideSearchPanel && this.webServiceListSource == null)
     {
         throw new ArgumentException("Please specify a ServiceUrl for PickerContent or set HideSearchPanel to true");
     }
     if (this.webServiceListSource == null && this.FilterParameters != null && this.FilterParameters.Count > 0)
     {
         throw new ArgumentException("Please specify a ServiceUrl for PickerContent otherwise FilterParameters are not supported");
     }
     base.OnPreRender(e);
     this.detailsPanel.Visible   = !string.IsNullOrEmpty(this.DetailsProperty);
     this.searchPanel.Visible    = !this.HideSearchPanel;
     this.selectionPanel.Visible = this.ShowWellControl;
     if (!this.HideSearchPanel)
     {
         ComponentBinding componentBinding = new ComponentBinding(this.filterTextBox, "text");
         componentBinding.Name = "SearchText";
         this.webServiceListSource.FilterParameters.Add(componentBinding);
     }
     if (this.HasCustomizedFilter)
     {
         ClientControlBinding clientControlBinding = new ComponentBinding(this, "CustomizedFilters");
         clientControlBinding.Name = "CustomizedFilters";
         this.webServiceListSource.FilterParameters.Add(clientControlBinding);
     }
     foreach (Binding binding in this.FilterParameters)
     {
         QueryStringBinding queryStringBinding = binding as QueryStringBinding;
         if (queryStringBinding == null || queryStringBinding.HasValue || !queryStringBinding.Optional)
         {
             this.webServiceListSource.FilterParameters.Add(binding);
         }
     }
 }
Example #2
0
        private void SetupFilterBindings()
        {
            StaticBinding staticBinding = new StaticBinding();

            staticBinding.Name = "Identity";
            RecipientMessageTrackingReportId recipientMessageTrackingReportId = RecipientMessageTrackingReportId.Parse(this.deliveryReportProperties.ObjectIdentity);

            staticBinding.Value = recipientMessageTrackingReportId.MessageTrackingReportId;
            if (this.wrapperPanel == null)
            {
                this.wrapperPanel = (DockPanel)this.deliveryReportProperties.FindControl("wrapperPanel");
            }
            this.deliveryStatusDataSource = (WebServiceListSource)this.wrapperPanel.Controls[0].FindControl("deliveryStatusDataSource");
            this.deliveryStatusDataSource.FilterParameters.Add(staticBinding);
            ComponentBinding componentBinding = new ComponentBinding(this.recipientSummary, "Status");

            componentBinding.Name = "RecipientStatus";
            this.deliveryStatusDataSource.FilterParameters.Add(componentBinding);
            if (!string.IsNullOrEmpty(recipientMessageTrackingReportId.Recipient))
            {
                StaticBinding staticBinding2 = new StaticBinding();
                staticBinding2.Name  = "Recipients";
                staticBinding2.Value = recipientMessageTrackingReportId.Recipient;
                this.deliveryStatusDataSource.FilterParameters.Add(staticBinding2);
                return;
            }
            ComponentBinding componentBinding2 = new ComponentBinding(this.toAddress, "value");

            componentBinding2.Name = "Recipients";
            this.deliveryStatusDataSource.FilterParameters.Add(componentBinding2);
        }
        private void SetupFilterBindings()
        {
            BindingCollection    filterParameters     = this.dataSource.FilterParameters;
            ClientControlBinding clientControlBinding = new ComponentBinding(this.dcStartDate, "value");

            clientControlBinding.Name = "StartDate";
            ClientControlBinding clientControlBinding2 = new ComponentBinding(this.dcEndDate, "value");

            clientControlBinding2.Name = "EndDate";
            filterParameters.Add(clientControlBinding);
            filterParameters.Add(clientControlBinding2);
        }
Example #4
0
        protected override void OnPreRender(EventArgs e)
        {
            ClientControlBinding clientControlBinding = new ComponentBinding(this, "LinkedDomainController");

            clientControlBinding.Name = "LinkedDomainController";
            base.FilterParameters.Add(clientControlBinding);
            clientControlBinding      = new ComponentBinding(this, "UserName");
            clientControlBinding.Name = "UserName";
            base.FilterParameters.Add(clientControlBinding);
            clientControlBinding      = new ComponentBinding(this, "Password");
            clientControlBinding.Name = "Password";
            base.FilterParameters.Add(clientControlBinding);
            base.OnPreRender(e);
        }
Example #5
0
        private void SetupFilterBindings()
        {
            BindingCollection filterParameters = this.messageTrackingsearchDataSource.FilterParameters;

            if (this.pickerMailboxToSearch != null)
            {
                filterParameters.Add(new ComponentBinding(this.pickerMailboxToSearch, "value")
                {
                    Name = "Identity"
                });
            }
            ClientControlBinding clientControlBinding = new ComponentBinding(this.fromAddress, "value");

            clientControlBinding.Name = "Sender";
            ClientControlBinding clientControlBinding2 = new ComponentBinding(this.toAddress, "value");

            clientControlBinding2.Name = "Recipients";
            ClientControlBinding clientControlBinding3 = new ClientControlBinding(this.subjectTextBox, "value");

            clientControlBinding3.Name = "Subject";
            filterParameters.Add(clientControlBinding);
            filterParameters.Add(clientControlBinding2);
            filterParameters.Add(clientControlBinding3);
        }
Example #6
0
 private void CreateClientBindings()
 {
     foreach (WebControl webControl in this.GetVisibleClientBoundControls(this))
     {
         string key   = webControl.Attributes["DataBoundProperty"];
         string text  = webControl.Attributes["ClientPropertyName"];
         string text2 = webControl.Attributes["MandatoryParam"];
         if (text2 != null && text2 != "false" && text2 != "true")
         {
             throw new NotSupportedException("MandatoryParam attribute value can either be 'true' or 'false'.");
         }
         bool    flag = text2 != null && Convert.ToBoolean(text2);
         Binding binding;
         if (webControl is Label && (text == null || text == "innerHTML"))
         {
             string text3 = webControl.Attributes["EncodeHtml"];
             if (text3 != null && text3 != "false" && text3 != "true")
             {
                 throw new NotSupportedException("EncodeHtml attribute value can either be 'true' or 'false'.");
             }
             bool flag2 = text3 == null || Convert.ToBoolean(text3);
             if (flag2)
             {
                 binding = new LabelBinding(webControl);
             }
             else
             {
                 binding = new NonEncodedLabelBinding(webControl);
             }
         }
         else
         {
             if (text == null)
             {
                 if (webControl is CheckBox && !(webControl is RadioButton))
                 {
                     text = "checked";
                 }
                 else
                 {
                     text = "value";
                 }
             }
             if (webControl is IScriptControl)
             {
                 if (webControl is AjaxUploader)
                 {
                     binding = new AjaxUploaderBinding(webControl, text);
                 }
                 else
                 {
                     binding = new ComponentBinding(webControl, text);
                 }
             }
             else if (webControl is DownloadedImage)
             {
                 DownloadedImage downloadedImage = (DownloadedImage)webControl;
                 binding = new ImageUrlBinding(downloadedImage, downloadedImage.ReadOnly);
             }
             else if (webControl is DropDownList)
             {
                 string text4 = webControl.Attributes["SortedDirection"];
                 if (text4 != null && text4 != SortDirection.Ascending.ToString() && text4 != SortDirection.Descending.ToString())
                 {
                     throw new NotSupportedException("SortedDirection attribute value can either be 'Ascending' or 'Descending'.");
                 }
                 if (text4 == null)
                 {
                     binding = new ComboBoxBinding(webControl, text);
                 }
                 else
                 {
                     binding = new SortedComboBoxBinding(webControl, text, (SortDirection)Enum.Parse(typeof(SortDirection), text4));
                 }
             }
             else if (webControl is RadioButton || webControl is RadioButtonList)
             {
                 binding = new RadioButtonBinding(webControl, text);
             }
             else if (text == "value")
             {
                 binding = new ValueBinding(webControl);
             }
             else
             {
                 binding = new ClientControlBinding(webControl, text);
             }
             if (flag || webControl is Label)
             {
                 binding = new MandatoryBinding(binding);
             }
             else if (webControl is RadioButtonList && this.HasAssociatedChildControls((RadioButtonList)webControl))
             {
                 binding = new MandatoryBinding(binding);
             }
             else if (Properties.IsReadOnly(webControl))
             {
                 binding = new NeverDirtyBinding(binding);
             }
         }
         if (this.UseSetObject || !(binding is NeverDirtyBinding))
         {
             this.Bindings.Bindings.Add(key, binding);
             if (this.allControlsDisabled && !(webControl is Label) && !(webControl is EllipsisLabel) && !(webControl is CollectionViewer) && !Properties.IsReadOnly(webControl))
             {
                 this.allControlsDisabled = false;
             }
         }
     }
 }