Exemplo n.º 1
0
        private void _addDefaultInspectionDesignViewPropsAndFilters(CswNbtView View, CswNbtViewRelationship InspectionDesignVr, CswNbtMetaDataObjectClass InspectionDesignOc)
        {
            CswNbtViewProperty DueDateVp = View.AddViewPropertyByName(InspectionDesignVr, InspectionDesignOc, CswNbtObjClassInspectionDesign.PropertyName.DueDate);

            DueDateVp.SortBy = true;

            CswNbtViewProperty LocationVp = View.AddViewPropertyByName(InspectionDesignVr, InspectionDesignOc, CswNbtObjClassInspectionDesign.PropertyName.Location);

            LocationVp.SortBy = true;

            View.AddViewPropertyByName(InspectionDesignVr, InspectionDesignOc, "Barcode");

            CswNbtMetaDataObjectClassProp StatusOcp = InspectionDesignOc.getObjectClassProp(CswNbtObjClassInspectionDesign.PropertyName.Status);
            CswNbtViewProperty            StatusVp  = View.AddViewProperty(InspectionDesignVr, StatusOcp);
            string Completed     = CswEnumNbtInspectionStatus.Completed;
            string Cancelled     = CswEnumNbtInspectionStatus.Cancelled;
            string CompletedLate = CswEnumNbtInspectionStatus.CompletedLate;
            string Missed        = CswEnumNbtInspectionStatus.Missed;

            View.AddViewPropertyFilter(StatusVp, StatusOcp.getFieldTypeRule().SubFields.Default.Name, CswEnumNbtFilterMode.NotEquals, Completed, false);
            View.AddViewPropertyFilter(StatusVp, StatusOcp.getFieldTypeRule().SubFields.Default.Name, CswEnumNbtFilterMode.NotEquals, Cancelled, false);
            View.AddViewPropertyFilter(StatusVp, StatusOcp.getFieldTypeRule().SubFields.Default.Name, CswEnumNbtFilterMode.NotEquals, CompletedLate, false);
            View.AddViewPropertyFilter(StatusVp, StatusOcp.getFieldTypeRule().SubFields.Default.Name, CswEnumNbtFilterMode.NotEquals, Missed, false);
        }