csharp FilteringCriterion #xaf

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp FilteringCriterion #xaf相关的知识,希望对你有一定的参考价值。

using System;
using DevExpress.Xpo;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Utils;
using System.ComponentModel;
using Fleetman.Module.BusinessObjects.CRM;
using DevExpress.ExpressApp.DC;

namespace Fleetman.Module.BusinessObjects.Common
{
    [DefaultClassOptions, ImageName("Action_Filter"),NavigationItem("Słowniki")]
    public class FilteringCriterion : BaseObject {
        public FilteringCriterion(Session session) : base(session) { }


        [RuleRequiredField("DescriptionIsRequiredinFilterCriteria", DefaultContexts.Save,
            CustomMessageTemplate ="Wpisz nazwę filtra")]
        public string Description {
            get { return GetPropertyValue<string>("Description"); }
            set { SetPropertyValue<string>("Description", value); }
        }
        [ValueConverter(typeof(TypeToStringConverter)), ImmediatePostData]
        [TypeConverter(typeof(LocalizedClassInfoTypeConverter))]
        public Type ObjectType {
            get { return GetPropertyValue<Type>("ObjectType"); }
            set {
                SetPropertyValue<Type>("ObjectType", value); 
                Criterion = String.Empty;
            }
        }
        [CriteriaOptions("ObjectType"), Size(SizeAttribute.Unlimited)]
        [EditorAlias(EditorAliases.PopupCriteriaPropertyEditor)]
        public string Criterion {
            get { return GetPropertyValue<string>("Criterion"); }
            set { SetPropertyValue<string>("Criterion", value); }
        }
        bool prywatny;
        public bool Prywatny
        {
            get => prywatny;
            set => SetPropertyValue(nameof(Prywatny), ref prywatny, value);
        }

        string criteriaToCopy;
        [Size(SizeAttribute.Unlimited)]
        public string CriteriaToCopy
        {
            get => criteriaToCopy;
            set => SetPropertyValue(nameof(CriteriaToCopy), ref criteriaToCopy, value);
        }

        //   [Association("FilteringCriterion-EmployeeRoleCollection")]
        [XafDisplayName("Dostępny tylko dla grup")]
        [Association("EmployeeRole-FilteringCriterionCollection")]
        public XPCollection<EmployeeRole> EmployeeRoleCollection
        {
            get
            {
                return GetCollection<EmployeeRole>(nameof(EmployeeRoleCollection));
            }
        }


    }
}

以上是关于csharp FilteringCriterion #xaf的主要内容,如果未能解决你的问题,请参考以下文章

csharp 例如-CSHARP-GroupDocs.Conversion.Examples.CSharp - 程序 - ConvertFilesToDifferentFormats.cs

csharp 例如-CSHARP-GroupDocs.Conversion.Examples.CSharp渲染,RenderPSDImageAsPath.cs

csharp 实例-CSHARP-GroupDocs.Conversion.Examples.CSharp变频-ConvertTopresentationAsPath.cs

csharp 实例-CSHARP-GroupDocs.Conversion.Examples.CSharp变频-ConvertTopresentationAsPath.cs

csharp 实例-CSHARP-GroupDocs.Conversion.Examples.CSharp变频-ConvertTopresentationAsPath.cs

csharp 例如-CSHARP-GroupDocs.Search.Examples.CSharp索引,AddDocumentToIndex.cs