我有一个名为的基类BaseEvent和几个后代类:
public class BaseEvent {
// the some properties
// ...
}
[MapInheritance(MapInheritanceType.ParentTable)]
public class Film : BaseEvent {
// the some properties
// ...
}
[MapInheritance(MapInheritanceType.ParentTable)]
public class Concert : BaseEvent {
// the some properties
// ...
}
我有一个在运行时创建BaseEvent实例的代码:
BaseEvent event = new BaseEvent();
// assign values for a properties
// ...
baseEvent.XPObjectType = Database.XPObjectTypes.SingleOrDefault(
t => t.TypeName == "MyApp.Module.BO.Events.BaseEvent");
现在,此事件将显示在BaseEvent列表视图中。
我想做以下事情:当用户单击Edit按钮时,然后在列表视图查找字段中显示所有后代类型。并且当用户将记录更改保存ObjectType到所选值时。
我怎样才能做到这一点?
谢谢。
PS。这是 asp.net 应用程序。
