private CswNbtView _getSiInspectionUserView(bool ReInit) { CswNbtView Ret = _getSystemView(CswEnumNbtSystemViewName.SIInspectionsbyUser); if (null == Ret) { CswNbtNode ChemSwAdminRoleNode = _CswNbtResources.Nodes.makeRoleNodeFromRoleName(CswNbtObjClassRole.ChemSWAdminRoleName); Ret = new CswNbtView(_CswNbtResources); Ret.saveNew(CswEnumNbtSystemViewName.SIInspectionsbyUser.ToString(), CswEnumNbtViewVisibility.Role, ChemSwAdminRoleNode.NodeId); Ret.Category = SiViewCategory; Ret.ViewMode = CswEnumNbtViewRenderingMode.List; ReInit = true; } if (ReInit) { Ret.Root.ChildRelationships.Clear(); CswNbtMetaDataObjectClass InspectionDesignOc = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.InspectionDesignClass); CswNbtViewRelationship InspectionDesignVr = Ret.AddViewRelationship(InspectionDesignOc, true); _addDefaultInspectionDesignViewPropsAndFilters(Ret, InspectionDesignVr, InspectionDesignOc); CswNbtMetaDataObjectClassProp InspectorOcp = InspectionDesignOc.getObjectClassProp(CswNbtObjClassInspectionDesign.PropertyName.Inspector); Ret.AddViewPropertyAndFilter(InspectionDesignVr, InspectorOcp, "me"); Ret.save(); } return(Ret); }
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); }