Beispiel #1
0
        public static IEnumerable <IPicklistState> ToPicklistStateCollection(IEnumerable <string> ids)
        {
            var states = new List <PicklistState>();

            foreach (var id in ids)
            {
                var s = new PicklistState();
                s.PicklistId = id;
                states.Add(s);
            }
            return(states);
        }
        public IPicklistState Get(string id, bool nullAllowed)
        {
            IPicklistState state = CurrentSession.Get <PicklistState> (id);

            if (!nullAllowed && state == null)
            {
                state = new PicklistState();
                (state as PicklistState).PicklistId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IPicklistState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames));
            }
            return(state);
        }