コード例 #1
0
        public static IEnumerable <IPhysicalInventoryState> ToPhysicalInventoryStateCollection(IEnumerable <string> ids)
        {
            var states = new List <PhysicalInventoryState>();

            foreach (var id in ids)
            {
                var s = new PhysicalInventoryState();
                s.DocumentNumber = id;
                states.Add(s);
            }
            return(states);
        }
コード例 #2
0
        public IPhysicalInventoryState Get(string id, bool nullAllowed)
        {
            IPhysicalInventoryState state = CurrentSession.Get <PhysicalInventoryState> (id);

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