コード例 #1
0
        public static PersonAttribute SetupPersonAttribute(Person person)
        {
            var attribute = CheckInTestFactories.CreatePersonAttribute(person);

            attribute.AttributeType = DataType.Int;
            attribute.Save(CheckInTestConstants.USER_ID);
            person.SaveAttributes(CheckInTestConstants.ORG_ID, CheckInTestConstants.USER_ID);
            return(attribute);
        }
コード例 #2
0
        public static PersonAttribute SetupAbilityLevelAttribute(Person person)
        {
            var attribute = CheckInTestFactories.CreatePersonAttribute(person);

            attribute.AttributeType = DataType.Lookup;

            var abilityLevels = new LookupType(SystemGuids.ABILITY_LEVEL_LOOKUP_TYPE);
            var lookup        = (from al in abilityLevels.Values.OfType <Lookup>()
                                 orderby al.Order ascending
                                 select al).Last();

            attribute.IntValue = lookup.LookupID;
            attribute.Save(CheckInTestConstants.USER_ID);
            person.SaveAttributes(CheckInTestConstants.ORG_ID, CheckInTestConstants.USER_ID);
            return(attribute);
        }