Exemplo n.º 1
0
        public static IEnumerable <IMovementConfirmationState> ToMovementConfirmationStateCollection(IEnumerable <string> ids)
        {
            var states = new List <MovementConfirmationState>();

            foreach (var id in ids)
            {
                var s = new MovementConfirmationState();
                s.DocumentNumber = id;
                states.Add(s);
            }
            return(states);
        }
Exemplo n.º 2
0
        public IMovementConfirmationState Get(string id, bool nullAllowed)
        {
            IMovementConfirmationState state = CurrentSession.Get <MovementConfirmationState> (id);

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