コード例 #1
0
        //-------------------------------------------------------------------
        // Synchronize the Entity List with the Entity ID passed in parameter
        //-------------------------------------------------------------------
        public void SynchronizeWithEntity(Int64 ID)
        {
            RoomPicker_Entity _en = RoomPicker_Entity.LoadByID(ID);

            treeList.Expand((from e in treeList.Objects.OfType <RoomPicker_Entity>().ToList() where e.ID == _en.ID select e).FirstOrDefault());
            treeList.SelectObject((from e in treeList.Objects.OfType <RoomPicker_Entity>().ToList() where e.ID == _en.ID select e).FirstOrDefault());
        }
コード例 #2
0
        //-------------------------------------------------------------------
        // Synchronize the Entity & Building List with the Building ID passed in parameter
        //-------------------------------------------------------------------
        public void SynchronizeWithBuilding(Int64 ID)
        {
            RoomPicker_Building _bd = RoomPicker_Building.LoadByID(ID);
            RoomPicker_Entity   _en = RoomPicker_Entity.LoadByID(_bd.FK_ENTITY);

            treeList.Expand((from e in treeList.Objects.OfType <RoomPicker_Entity>().ToList() where e.ID == _en.ID select e).FirstOrDefault());
            treeList.SelectObject((from e in treeList.Objects.OfType <RoomPicker_Entity>().ToList() where e.ID == _en.ID select e).FirstOrDefault());

            treeList.Expand((from b in treeList.GetChildren(treeList.SelectedObject).OfType <RoomPicker_Building>().ToList() where b.ID == _bd.ID select b).FirstOrDefault());
            treeList.SelectObject((from b in treeList.GetChildren(treeList.SelectedObject).OfType <RoomPicker_Building>().ToList() where b.ID == _bd.ID select b).FirstOrDefault());
        }
コード例 #3
0
        //-------------------------------------------------------------------
        // Synchronize the Entity, Building & Room List with the Room ID passed in parameter
        //-------------------------------------------------------------------
        public void SynchronizeWithRoom(Int64 ID)
        {
            RoomPicker_Room     _rm = RoomPicker_Room.LoadByID(ID);
            RoomPicker_Building _bd = RoomPicker_Building.LoadByID(_rm.FK_BUILDING);
            RoomPicker_Entity   _en = RoomPicker_Entity.LoadByID(_bd.FK_ENTITY);

            treeList.Expand((from e in treeList.Objects.OfType <RoomPicker_Entity>().ToList() where e.ID == _en.ID select e).FirstOrDefault());
            treeList.SelectObject((from e in treeList.Objects.OfType <RoomPicker_Entity>().ToList() where e.ID == _en.ID select e).FirstOrDefault());

            treeList.Expand((from b in treeList.GetChildren(treeList.SelectedObject).OfType <RoomPicker_Building>().ToList() where b.ID == _bd.ID select b).FirstOrDefault());
            treeList.SelectObject((from b in treeList.GetChildren(treeList.SelectedObject).OfType <RoomPicker_Building>().ToList() where b.ID == _bd.ID select b).FirstOrDefault());

            treeList.SelectObject((from r in treeList.GetChildren(treeList.SelectedObject).OfType <RoomPicker_Room>().ToList() where r.ID == _rm.ID select r).FirstOrDefault());

            //OnSelectionChanged(treeList, EventArgs.Empty);
        }