Пример #1
0
        private CswNbtView _getSiInspectionBaseView(CswEnumNbtSystemViewName ViewName, bool ReInit)
        {
            CswNbtView Ret = _getSystemView(ViewName);

            if (null == Ret)
            {
                CswNbtNode ChemSwAdminRoleNode = _CswNbtResources.Nodes.makeRoleNodeFromRoleName(CswNbtObjClassRole.ChemSWAdminRoleName);
                Ret = new CswNbtView(_CswNbtResources);
                Ret.saveNew(ViewName.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);

                Ret.save();
            }
            return(Ret);
        }
Пример #2
0
        public CswNbtActSystemViews(CswNbtResources CswNbtResources, CswEnumNbtSystemViewName ViewName, CswNbtMetaDataObjectClass EnforceObjectClassRelationship)
        {
            _CswNbtResources = CswNbtResources;
            _EnforceObjectClassRelationship = EnforceObjectClassRelationship;

            SystemView = _initView(ViewName, false);
        }
Пример #3
0
        private CswNbtView _initView(CswEnumNbtSystemViewName ViewName, bool ReInit)
        {
            CswNbtView RetView = null;

            if (ViewName == CswEnumNbtSystemViewName.SILocationsList)
            {
                RetView = _siLocationsListView(ReInit);
            }
            else if (ViewName == CswEnumNbtSystemViewName.SILocationsTree)
            {
                RetView = _siLocationsTreeView(ReInit);
            }
            else if (ViewName == CswEnumNbtSystemViewName.SIInspectionsbyUser)
            {
                RetView = _getSiInspectionUserView(ReInit);
            }
            else if (ViewName == CswEnumNbtSystemViewName.SIInspectionsbyBarcode)
            {
                RetView = _getSiInspectionBarcodeView(ReInit);
            }
            else if (ViewName != CswEnumNbtSystemViewName.Unknown)
            {
                RetView = _getSiInspectionBaseView(ViewName, ReInit);
            }
            return(RetView);
        }
Пример #4
0
        private CswNbtView _getSystemView(CswEnumNbtSystemViewName ViewName)
        {
            List <CswNbtView> Views = _CswNbtResources.ViewSelect.restoreViews(ViewName.ToString(), CswEnumNbtViewVisibility.Unknown, Int32.MinValue);
            CswNbtNode        ChemSwAdminRoleNode = _CswNbtResources.Nodes.makeRoleNodeFromRoleName(CswNbtObjClassRole.ChemSWAdminRoleName);

            return(Views.FirstOrDefault(View => View.Visibility == CswEnumNbtViewVisibility.Role &&
                                        View.VisibilityRoleId == ChemSwAdminRoleNode.NodeId));
        }
Пример #5
0
 public void reInitSystemView(CswEnumNbtSystemViewName ViewName)
 {
     SystemView = _initView(ViewName, true);
 }