我使用 eXpressApp 框架来开发一个 Windows 应用程序。我想根据类中的枚举属性过滤查找视图属性编辑器。
这是我的代码:
类别类别:
private TranType tranType;
public TranType TranType
{
get
{
return tranType;
}
set
{
SetPropertyValue("TranType", ref tranType, value);
}
}
private string categoryName;
public string CategoryName
{
get
{
return categoryName;
}
set
{
SetPropertyValue("CategoryName", ref categoryName, value);
}
}
private Category parentCategory;
public Category ParentCategory
{
get
{
return parentCategory;
}
set
{
SetPropertyValue("ParentCategory", ref parentCategory, value);
}
}
转职类:
private Category category;
[DataSourceCriteria("TranType == TranType")]
public Category Category
{
get
{
return category;
}
set
{
SetPropertyValue("Category", ref category, value);
}
}
private static TranType myTranType;
[ImmediatePostData]
public TranType MyTranType
{
get
{
return myTranType;
}
set
{
SetPropertyValue("MyTranType", ref myTranType, value);
}
}
当用户选择时,每个Category
都有一个TranType
我想要的,例如TranType=Expense
,根据他们给定的查找过滤的类别TranType
。
谢谢你的帮助。