private CswNbtView _siLocationsListView(bool ReInit) { CswNbtView Ret = _getSystemView(CswEnumNbtSystemViewName.SILocationsList); if (null == Ret) { CswNbtNode ChemSwAdminRoleNode = _CswNbtResources.Nodes.makeRoleNodeFromRoleName(CswNbtObjClassRole.ChemSWAdminRoleName); Ret = new CswNbtView(_CswNbtResources); Ret.saveNew(CswEnumNbtSystemViewName.SILocationsList.ToString(), CswEnumNbtViewVisibility.Role, ChemSwAdminRoleNode.NodeId); Ret.Category = SiViewCategory; Ret.ViewMode = CswEnumNbtViewRenderingMode.List; ReInit = true; } if (ReInit) { Ret.Root.ChildRelationships.Clear(); CswNbtMetaDataObjectClass LocationOc = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.LocationClass); CswNbtViewRelationship LocationVr = Ret.AddViewRelationship(LocationOc, true); CswNbtMetaDataObjectClassProp LocationLocationOcp = LocationOc.getObjectClassProp(CswNbtObjClassLocation.PropertyName.Location); CswNbtViewProperty LocationLocationVp = Ret.AddViewProperty(LocationVr, LocationLocationOcp); LocationLocationVp.SortBy = true; Ret.save(); } return(Ret); }