当前位置: 首页>>代码示例>>C#>>正文


C# FilterDescriptor类代码示例

本文整理汇总了C#中FilterDescriptor的典型用法代码示例。如果您正苦于以下问题:C# FilterDescriptor类的具体用法?C# FilterDescriptor怎么用?C# FilterDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FilterDescriptor类属于命名空间,在下文中一共展示了FilterDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SelectInvoicesVm

        public SelectInvoicesVm(SelectInvoices selectInvoicesWindow, IPaymentService service)
            : base(service)
        {
            SelectInvoicesWindow = selectInvoicesWindow;
            CommitCommand = new DelegateCommand<object>(OnCommitExecute, CanCommitExecute);
            CancelCommand = new DelegateCommand<object>(OnCancelExecute, CanCancelExecute);
            Suppliers = new QueryableDataServiceCollectionView<SupplierDTO>(service.Context, service.Context.Suppliers);
            Currencies = new QueryableDataServiceCollectionView<CurrencyDTO>(service.Context, service.Context.Currencies);
            _supplierFilter = new FilterDescriptor("SupplierId", FilterOperator.IsEqualTo, 0);
            #region 发票
            Invoices = new QueryableDataServiceCollectionView<BaseInvoiceDTO>(service.Context, service.Context.Invoices);
            Invoices.FilterDescriptors.Add(_supplierFilter);
            Invoices.LoadedData += (e, o) =>
            {
                InvoiceList = new ObservableCollection<BaseInvoiceDTO>();
                Invoices.ToList().ForEach(InvoiceList.Add);

                SelectInvoices = new ObservableCollection<BaseInvoiceDTO>();
                if (!InvoiceList.Any()) return;
                _paymentNotice.PaymentNoticeLines.ToList().ForEach(p =>
                {
                    if (InvoiceList.Any(t => t.InvoiceId == p.InvoiceId))
                        SelectInvoices.Add(InvoiceList.FirstOrDefault(t => t.InvoiceId == p.InvoiceId));
                });
            };
            #endregion
        }
开发者ID:unicloud,项目名称:FRP,代码行数:27,代码来源:SelectInvoicesVm.cs

示例2: fillDonorsCombo

        private void fillDonorsCombo()
        {

            Operation.BeginOperation(this);

            this.Invoke((MethodInvoker)delegate
            {
                this.DonorsColumnComboBox.MultiColumnComboBoxElement.DropDownWidth = 500;

                this.DonorsColumnComboBox.AutoFilter = true;
                this.DonorsColumnComboBox.ValueMember = "ID";
                this.DonorsColumnComboBox.DisplayMember = "Name";
            });
            var q = TheDonorCmd.GetAllDonors();
            this.Invoke((MethodInvoker)delegate
            {
                DonorsColumnComboBox.DataSource = q;
                FilterDescriptor filter = new FilterDescriptor();
                filter.PropertyName = this.DonorsColumnComboBox.DisplayMember;
                filter.Operator = FilterOperator.Contains;
                this.DonorsColumnComboBox.EditorControl.MasterTemplate.FilterDescriptors.Add(filter);

            });
            Operation.EndOperation(this);

            th.Abort();

            


           
           

        }
开发者ID:ainma007,项目名称:UcasProject,代码行数:34,代码来源:FrmTheDonorsAndProjectAdd.cs

示例3: FillEmployeeCombo

        private void FillEmployeeCombo()
        {
            Operation.BeginOperation(this);

            this.Invoke((MethodInvoker)delegate
            {
                this.EmployeeComboBox.MultiColumnComboBoxElement.DropDownWidth = 500;

                this.EmployeeComboBox.AutoFilter = true;
                this.EmployeeComboBox.ValueMember = "ID";
                this.EmployeeComboBox.DisplayMember = "EmployeeName";
            });
            var q = EmployeeCmd.GetAll();
            this.Invoke((MethodInvoker)delegate
            {
                EmployeeComboBox.DataSource = q;
                this.EmployeeComboBox.AutoFilter = true;
                CompositeFilterDescriptor compositeFilter = new CompositeFilterDescriptor();
                FilterDescriptor empname = new FilterDescriptor("EmployeeName", FilterOperator.Contains, "");
                FilterDescriptor empNumber = new FilterDescriptor("EmployeejobNumber", FilterOperator.Contains, "");
                compositeFilter.FilterDescriptors.Add(empname);
                compositeFilter.FilterDescriptors.Add(empNumber);
                compositeFilter.LogicalOperator = FilterLogicalOperator.Or;

                this.EmployeeComboBox.EditorControl.FilterDescriptors.Add(compositeFilter);

            });
            Operation.EndOperation(this);


            th.Abort();

            
        }
开发者ID:ainma007,项目名称:UcasProject,代码行数:34,代码来源:FrmContractsAdd.cs

示例4: CreateFilterForColumn

		private IFilterDescriptor CreateFilterForColumn(GridViewDataColumn column)
		{
			FilterOperator filterOperator = GetFilterOperatorForType(column.DataType);
			FilterDescriptor descriptor = new FilterDescriptor(column.UniqueName, filterOperator, this.filterValue);
			descriptor.MemberType = column.DataType;

			return descriptor;
		}
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:8,代码来源:CustomFilterDescriptor.cs

示例5: settingfactorGridFilter

 private void settingfactorGridFilter()
 {
     FilterDescriptor filter = new FilterDescriptor();
     filter.PropertyName = "projname";
     filter.Operator = FilterOperator.IsEqualTo;
     filter.Value = null ;
     filter.IsFilterEditor = true;
     this.factorslist.FilterDescriptors.Add(filter);
 }
开发者ID:irania,项目名称:tirax,代码行数:9,代码来源:FactorManagement.cs

示例6: CreateMiddlewareInstance

 private IMiddlewarePlugin CreateMiddlewareInstance(string filterType)
 {
     var type = TypeHelper<Type>.GetTypeByFullName(filterType);
     var typeFilterAttribute = new TypeFilterAttribute(type) { Order = 0 };
     var filterDescriptor = new FilterDescriptor(typeFilterAttribute, 0);
     var instance = _serviceProvider.GetService(type);
     var iMiddlewarePlugin = (IMiddlewarePlugin)instance;
     return iMiddlewarePlugin;
 }
开发者ID:ghstahl,项目名称:vNext.Jan2016Web,代码行数:9,代码来源:AuthorizeMiddleware.cs

示例7: RadGridView1_SelectionChanged

 private void RadGridView1_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
 {
     AccountsdataServiceDataSource.FilterDescriptors.Remove(AccountsDetailsFilter);
     RadGridView Grid = (RadGridView)sender;
     RadControlsSilverlightClient.TDocs.AccountTypes a = (RadControlsSilverlightClient.TDocs.AccountTypes)Grid.SelectedItem;
     if (a != null)
     {
         AccountsDetailsFilter = new FilterDescriptor("typeID_fk", FilterOperator.IsEqualTo, a.accounttypeID_pk);
         AccountsdataServiceDataSource.FilterDescriptors.Add(AccountsDetailsFilter);
     }
 }
开发者ID:nicholasceliano,项目名称:Silverlight,代码行数:11,代码来源:AccountTypes.xaml.cs

示例8: StringificationTakesConvertersIntoAccount

		public void StringificationTakesConvertersIntoAccount()
		{
			var query = new FilterDescriptor<MyObject>().Term(t => t.MyEnum, MyEnum.Foo);
			var serialized = _serializationClient.Serializer.Serialize(query).Utf8String();
			serialized.JsonEquals(@"
				{
					""term"" : {
						""myEnum"" : ""Foo""
					}
				}").Should().BeTrue();
		}
开发者ID:radiosterne,项目名称:elasticsearch-net,代码行数:11,代码来源:CustomConvertersTests.cs

示例9: ListDocumentsVm

        public ListDocumentsVm(ICommonService service)
            : base(service)
        {
            _service = service;
            _context = service.Context;

            InitializeVM();

            _filter = new FilterDescriptor<DocumentDTO> {FilteringExpression = e => true};
            Documents.FilterDescriptors.Add(_filter);
        }
开发者ID:unicloud,项目名称:FRP,代码行数:11,代码来源:ListDocumentsVm.cs

示例10: ToString_TwoPartCompoundExpression_CreatesValidString

        public void ToString_TwoPartCompoundExpression_CreatesValidString()
        {
            var filter = new FilterDescriptor(
                LogicalOperators.Or,
                new MobileObservableCollection<IFilterDescriptor>
                    {
                        new FilterDescriptor("FirstName", FilterOperator.StartsWith, "a"),
                        new FilterDescriptor("LastName", FilterOperator.Contains, "ba"),
                    });

            Assert.AreEqual("(FirstName StartsWith {a}) OR (LastName Contains {ba})", filter.ToString());
        }
开发者ID:mparsin,项目名称:Elements,代码行数:12,代码来源:FilterDescriptorTests.cs

示例11: ConstructorWithParamsTest

        public void ConstructorWithParamsTest()
        {
            const FilterOperator Fo = FilterOperator.Any;

            var myValue = new object();

            var item = new FilterDescriptor("igogo", Fo, myValue);

            Assert.AreEqual("igogo", item.ColumnName);
            Assert.AreEqual(Fo, item.Operator);
            Assert.AreEqual(myValue, item.Value);
        }
开发者ID:mparsin,项目名称:Elements,代码行数:12,代码来源:FilterDescriptorTests.cs

示例12: showdone_ToggleStateChanged

 private void showdone_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args)
 {
     this.marketGrid.FilterDescriptors.Remove("done");
     if (!showdone.Checked)
     {
         FilterDescriptor filter = new FilterDescriptor();
         filter.PropertyName = "done";
         filter.Operator = FilterOperator.IsEqualTo;
         filter.Value = showdone.Checked;
         filter.IsFilterEditor = true;
         this.marketGrid.FilterDescriptors.Add(filter);
     }
 }
开发者ID:irania,项目名称:tirax,代码行数:13,代码来源:MarketingManagement.cs

示例13: RadGridView1_SelectionChanged

        private void RadGridView1_SelectionChanged(object sender, SelectionChangeEventArgs e)
        {
            dataServiceDataSource.FilterDescriptors.Remove(DetailsFilter);
            RadGridView Grid = (RadGridView)sender;

            RadControlsSilverlightClient.TDocs.SignersView a = (RadControlsSilverlightClient.TDocs.SignersView)Grid.SelectedItem;
            if (a != null)
            {
                DetailsFilter = new FilterDescriptor("signerID_pk", FilterOperator.IsEqualTo, a.signerID_pk);
                dataServiceDataSource.FilterDescriptors.Add(DetailsFilter);
                signersDataForm.CurrentItem = dataServiceDataSource.DataView.CurrentItem;
            }
        }
开发者ID:nicholasceliano,项目名称:Silverlight,代码行数:13,代码来源:Signers.xaml.cs

示例14: AccountsView_SelectionChanged

 public void AccountsView_SelectionChanged(object sender, SelectionChangeEventArgs e)
 {
     RadWindow window = new RadWindow();
     TDocs.BADSInfo selectedItem = AccountsView.SelectedItem as TDocs.BADSInfo;
     FilterDescriptor fd = new FilterDescriptor("accountNumber", FilterOperator.IsEqualTo, selectedItem.accountNumber);
     entitlementsDataSource.FilterDescriptors.Add(fd);
     
     window.Content = new BADSSheet(selectedItem);
     window.Header = "Account Data Sheet";
     window.Height = 620;
     window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
     window.ShowDialog();
     entitlementsDataSource.FilterDescriptors.Remove(fd);
 }
开发者ID:nicholasceliano,项目名称:Silverlight,代码行数:14,代码来源:AccountDataSheet.xaml.cs

示例15: RadGridView1_SelectionChanged

 private void RadGridView1_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
 {
     ContactsdataServiceDataSource.FilterDescriptors.Remove(BankContactsDetailsFilter);
     AccountsdataServiceDataSource.FilterDescriptors.Remove(BankAccountsDetailsFilter);
     RadGridView Grid = (RadGridView)sender;
     RadControlsSilverlightClient.TDocs.Banks b = (RadControlsSilverlightClient.TDocs.Banks)Grid.SelectedItem;
     if (b != null)
     {
         BankContactsDetailsFilter = new FilterDescriptor("bankID_fk", FilterOperator.IsEqualTo, b.bankID_pk);
         ContactsdataServiceDataSource.FilterDescriptors.Add(BankContactsDetailsFilter);
         BankAccountsDetailsFilter = new FilterDescriptor("bankID_fk", FilterOperator.IsEqualTo, b.bankID_pk);
         AccountsdataServiceDataSource.FilterDescriptors.Add(BankAccountsDetailsFilter);
     }
 }
开发者ID:nicholasceliano,项目名称:Silverlight,代码行数:14,代码来源:Banks.xaml.cs


注:本文中的FilterDescriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。