コード例 #1
0
        public static IEnumerable <IMovementLineMvoStateDto> ToMovementLineMvoStateDtoCollection(IEnumerable <MovementLineId> ids)
        {
            var states = new List <IMovementLineMvoStateDto>();

            foreach (var id in ids)
            {
                var dto = new MovementLineMvoStateDtoWrapper();
                dto.MovementLineId = id;
                states.Add(dto);
            }
            return(states);
        }
コード例 #2
0
 public IMovementLineMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = MovementLineMvosControllerUtils.ParseIdString(id);
         var state = _movementLineMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new MovementLineMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = MovementLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }