Esempio n. 1
0
        public MetaTimeMachineEmptyResponse Empty([FromBody] MetaTimeMachineEditableRequest request)
        {
            MetaTimeMachineEmptyResponse response = new MetaTimeMachineEmptyResponse();

            response.Item = metaTimeMachineConvertor.toEmptyVo();

            response.Status = 1;
            return(response);
        }
Esempio n. 2
0
        public MetaTimeMachineEditableResponse Editable([FromBody] MetaTimeMachineEditableRequest request)
        {
            MetaTimeMachineEditableResponse response = new MetaTimeMachineEditableResponse();

            if (request.Id <= 0)
            {
                response.Status = -1;
                return(response);
            }

            MetaTimeMachineEntity entity = metaTimeMachineRepository.GetById(request.Id);

            if (entity == null)
            {
                response.Status = 404;
                return(response);
            }

            response.Item = metaTimeMachineConvertor.toMoreVo(entity);

            response.Status = 1;
            return(response);
        }