/// <summary> /// Load all object types defined in tblObjectTypes table (This is project independent /// </summary> public void Load() { using (EDBEntities eDB = new EDBEntities()) { foreach (var Rec in (from o in eDB.tblObjects join a in eDB.tblObjectAssociations on o.ID equals a.Object_ID join p in eDB.tblProperties on a.Association_ID equals p.ID join ap in eDB.tblAspects on p.Aspect equals ap.AspectName join t in eDB.tblTypes on o.ObjectType_ID equals t.ID where (o.Project_ID == Globals.Project_ID && ap.Project_ID == Globals.Project_ID && ap.HardIO == true) orderby o.ObjectName select new { ObjectName = o.ObjectName, Description = o.Description, PropertyName = p.PropertyName })) { HardIOModel hardIOItem = new HardIOModel { ObjectName = Rec.ObjectName, Description = Rec.Description, PropertyName = Rec.PropertyName }; HardIO.Add(hardIOItem); } } }
public void Refresh() { HardIO.Clear(); Load(); }