예제 #1
0
        public static IEnumerable <IOrderItemShipGrpInvReservationStateDto> ToOrderItemShipGrpInvReservationStateDtoCollection(IEnumerable <OrderItemShipGrpInvResId> ids)
        {
            var states = new List <IOrderItemShipGrpInvReservationStateDto>();

            foreach (var id in ids)
            {
                var dto = new OrderItemShipGrpInvReservationStateDtoWrapper();
                dto.OrderItemShipGrpInvResId = id;
                states.Add(dto);
            }
            return(states);
        }
예제 #2
0
 public IOrderItemShipGrpInvReservationStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = OrderItemShipGrpInvReservationsControllerUtils.ParseIdString(id);
         var state = _orderItemShipGrpInvReservationApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new OrderItemShipGrpInvReservationStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }