Exemplo n.º 1
0
 public void Update(UpdateHistoryEquipmentCommand command)
 {
     this.IdVideo        = command.IdVideo;
     this.IdEquipment    = command.IdEquipment;
     this.DateOfRegister = command.DateOfRegister;
     this.Action         = command.Action;
     this.Value          = command.Value;
 }
Exemplo n.º 2
0
        public HistoryEquipment Update(UpdateHistoryEquipmentCommand command)
        {
            var history = _repository.GetById(command.IdHistoryEquipment);

            history.Update(command);
            _repository.Update(history);

            if (Commit())
            {
                return(history);
            }

            return(null);
        }
Exemplo n.º 3
0
        public Task <HttpResponseMessage> Put(int id, [FromBody] dynamic body)
        {
            var command = new UpdateHistoryEquipmentCommand(
                idHistoryEquipment: id,
                idVideo: (int)body.idVideo,
                idEquipment: (int)body.idEquipment,
                value: (decimal)body.value,
                idCompany: (int)body.idCompany,
                plan: (string)body.plan
                );

            var history = _service.Update(command);

            return(CreateResponse(HttpStatusCode.OK, history));
        }