Example #1
0
        public static IEnumerable <IInventoryPostingRuleState> ToInventoryPostingRuleStateCollection(IEnumerable <string> ids)
        {
            var states = new List <InventoryPostingRuleState>();

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

            if (!nullAllowed && state == null)
            {
                state = new InventoryPostingRuleState();
                (state as InventoryPostingRuleState).InventoryPostingRuleId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IInventoryPostingRuleState>(state, new Type[] {  }, _readOnlyPropertyNames));
            }
            return(state);
        }