Example #1
0
        public static IEnumerable <InOutStateDto> ToInOutStateDtoCollection(IEnumerable <string> ids)
        {
            var states = new List <InOutStateDto>();

            foreach (var id in ids)
            {
                var dto = new InOutStateDto();
                dto.DocumentNumber = id;
                states.Add(dto);
            }
            return(states);
        }
Example #2
0
 public InOutStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = id;
         var state = (InOutState)_inOutApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new InOutStateDto(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = InOutsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }