Exemple #1
0
        private void SetupFilterBindings()
        {
            ClientControlBinding clientControlBinding = new ClientControlBinding(this.logonType, "value");

            clientControlBinding.Name = "LogonTypes";
            this.dataSource.FilterParameters.Add(clientControlBinding);
        }
        private void SetupFilterBindings()
        {
            BindingCollection    filterParameters     = this.listViewDataSource.FilterParameters;
            ClientControlBinding clientControlBinding = new ClientControlBinding(this.ddlDialPlan, "value");

            clientControlBinding.Name = "UMDialPlan";
            ClientControlBinding clientControlBinding2 = new ClientControlBinding(this.ddlGroupBy, "value");

            clientControlBinding2.Name = "GroupBy";
            ClientControlBinding clientControlBinding3 = new ClientControlBinding(this.ddlIPGateway, "value");

            clientControlBinding3.Name = "UMIPGateway";
            filterParameters.Add(clientControlBinding);
            filterParameters.Add(clientControlBinding2);
            filterParameters.Add(clientControlBinding3);
        }
Exemple #3
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);
        }
Exemple #4
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;
             }
         }
     }
 }