private void BindView()
        {
            this.SearchBaseTextField.StringValue = _dn;
            foreach (var item in VMDirConstants.ScopeList)
            {
                this.SearchScopeComboBox.Add(new NSString(item));
            }

            foreach (var item in VMDirConstants.ConditionList)
            {
                this.BfConditionComboBox.Add(new NSString(item));
            }

            var attrTypes = _serverDTO.Connection.SchemaManager.GetAttributeTypeManager();

            _attrList = attrTypes.Data.Select(x => x.Key).ToList();
            _attrList.Sort((x, y) => string.Compare(x, y, StringComparison.InvariantCultureIgnoreCase));
            foreach (var item in _attrList)
            {
                this.BfAttributeComboBox.Add(new NSString(item));
                this.AttrToReturnComboBox.Add(new NSString(item));
            }

            foreach (var item in VMDirConstants.OperatorList)
            {
                this.BfOperatorComboBox.Add(new NSString(item));
            }

            BfConditionComboBox.SelectItem(0);
            SearchScopeComboBox.SelectItem(2);
            BfAttributeComboBox.SelectItem(0);
            BfOperatorComboBox.SelectItem(0);
            AttrToReturnComboBox.SelectItem(0);
        }
        private void BindData()
        {
            if (_qdto.GetType() == typeof(BuildQueryDTO))
            {
                var dto = _qdto as BuildQueryDTO;
                SearchQueryTabView.SelectAt(0);
                SearchBaseTextField.StringValue = dto.SearchBase;
                SearchScopeComboBox.SelectItem((int)dto.SearchScope);
                BfOperatorComboBox.SelectItem((int)dto.Operator);
                BfAttributeComboBox.SelectItem(0);
                BfConditionComboBox.SelectItem(0);

                _searchCondDs.condList.Clear();
                foreach (var item in dto.CondList)
                {
                    _searchCondDs.condList.Add(new FilterDTO(item.Attribute, item.Condition, item.Value));
                }
                BfConditionsTableView.ReloadData();
                _attrToReturnDs.attrList.Clear();
                foreach (var item in dto.AttrToReturn)
                {
                    _attrToReturnDs.attrList.Add(item);
                }
                AttrToReturnTableView.ReloadData();
            }
            else if (_qdto.GetType() == typeof(TextQueryDTO))
            {
                var dto = _qdto as TextQueryDTO;
                SearchQueryTabView.SelectAt(1);
                SearchBaseTextField.StringValue = dto.SearchBase;
                SearchScopeComboBox.SelectItem((int)dto.SearchScope);
                TfSearchFilterTextView.Value = dto.GetFilterString();
                _attrToReturnDs.attrList.Clear();
                foreach (var item in dto.AttrToReturn)
                {
                    _attrToReturnDs.attrList.Add(item);
                }
                AttrToReturnTableView.ReloadData();
            }
        }