Exemplo n.º 1
0
        public IDocumentTypeState Get(string id, bool nullAllowed)
        {
            IDocumentTypeState state = CurrentSession.Get <DocumentTypeState> (id);

            if (!nullAllowed && state == null)
            {
                state = new DocumentTypeState();
                (state as DocumentTypeState).DocumentTypeId = id;
            }
            return(state);
        }
Exemplo n.º 2
0
        public static IEnumerable <IDocumentTypeState> ToDocumentTypeStateCollection(IEnumerable <string> ids)
        {
            var states = new List <DocumentTypeState>();

            foreach (var id in ids)
            {
                var s = new DocumentTypeState();
                s.DocumentTypeId = id;
                states.Add(s);
            }
            return(states);
        }