Search Results

Search found 2 results on 1 pages for 'user1260827'.

Page 1/1 | 1 

  • Get all descendants types of base class

    - by user1260827
    I have a base class called BaseEvent and several descendants classes: 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 ... } I have a code which create the BaseEvent instance at runtime: BaseEvent event = new BaseEvent(); //assign values for a properties ... baseEvent.XPObjectType = Database.XPObjectTypes.SingleOrDefault(t => t.TypeName == "MyApp.Module.BO.Events.BaseEvent"); Now, this event will be shows in BaseEvent list view. I want to do the following: when a user click Edit button then show in list view lookup field with all descendants types. And when user saves record change ObjectType to selected value. How can I do this? Thanks. PS. this is asp.net app.

    Read the article

  • "Grouping" dictionary by value

    - by user1260827
    I have a dictionary: Dictionary<int,int>. I want to get new dictionary where keys of original dictionary represent as List<int>. This is what I mean: var prices = new Dictionary<int,int>(); The prices contain the following data: 1 100 2 200 3 100 4 300 I want to get the IList<Dictionary<int,List<int>>>: int List<int> 100 1,3 200 2 300 4 How can I do this?

    Read the article

1