示例#1
0
        public static IEnumerable <InOutLineMvoStateDto> ToInOutLineMvoStateDtoCollection(IEnumerable <InOutLineId> ids)
        {
            var states = new List <InOutLineMvoStateDto>();

            foreach (var id in ids)
            {
                var dto = new InOutLineMvoStateDto();
                dto.InOutLineId = new InOutLineIdDto(id);
                states.Add(dto);
            }
            return(states);
        }
示例#2
0
 public InOutLineMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = InOutLineMvosControllerUtils.ParseIdString(id);
         var state = (InOutLineMvoState)_inOutLineMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new InOutLineMvoStateDto(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); }
 }
示例#3
0
 public static CreateInOutLineMvoDto ToCreateInOutLineMvo(this InOutLineMvoStateDto state)
 {
     return(state.ToCreateInOutLineMvo <CreateInOutLineMvoDto>());
 }
示例#4
0
 public static MergePatchInOutLineMvoDto ToMergePatchInOutLineMvo(this InOutLineMvoStateDto state)
 {
     return(state.ToMergePatchInOutLineMvo <MergePatchInOutLineMvoDto>());
 }
示例#5
0
 public static DeleteInOutLineMvoDto ToDeleteInOutLineMvo(this InOutLineMvoStateDto state)
 {
     return(state.ToDeleteInOutLineMvo <DeleteInOutLineMvoDto>());
 }
示例#6
0
 public static IInOutLineMvoCommand ToCreateOrMergePatchInOutLineMvo(this InOutLineMvoStateDto state)
 {
     return(state.ToCreateOrMergePatchInOutLineMvo <CreateInOutLineMvoDto, MergePatchInOutLineMvoDto>());
 }