예제 #1
0
        public static IEnumerable <IInOutLineMvoStateDto> ToInOutLineMvoStateDtoCollection(IEnumerable <InOutLineId> ids)
        {
            var states = new List <IInOutLineMvoStateDto>();

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