예제 #1
0
        public IShipmentTypeState Get(string id, bool nullAllowed)
        {
            IShipmentTypeState state = CurrentSession.Get <ShipmentTypeState> (id);

            if (!nullAllowed && state == null)
            {
                state = new ShipmentTypeState();
                (state as ShipmentTypeState).ShipmentTypeId = id;
            }
            return(state);
        }
예제 #2
0
        public static IEnumerable <IShipmentTypeState> ToShipmentTypeStateCollection(IEnumerable <string> ids)
        {
            var states = new List <ShipmentTypeState>();

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