Exemplo n.º 1
0
        public async Task <IHttpActionResult> Put(int id, VehicleToWheelBaseInputModel model)
        {
            var changeRequestId = await _vehicleToWheelBaseApplicationService.UpdateAsync(new VehicleToWheelBase()
            {
                Id          = model.Id,
                VehicleId   = model.Vehicle.Id,
                WheelBaseId = model.WheelBase.Id
            }, id, "update-requestor");

            return(Ok(changeRequestId));
        }
Exemplo n.º 2
0
        public async Task <IHttpActionResult> Post(int id, VehicleToWheelBaseInputModel vehicleToWheelBaseInputModel)
        {
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = vehicleToWheelBaseInputModel.Comment
            };
            var attachments     = SetUpAttachmentsModels(vehicleToWheelBaseInputModel.Attachments);
            var changeRequestId = await _vehicleToWheelBaseApplicationService.DeleteAsync(null, id, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }
Exemplo n.º 3
0
        public async Task <IHttpActionResult> Post(VehicleToWheelBaseInputModel model)
        {
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _vehicleToWheelBaseApplicationService.AddAsync(new VehicleToWheelBase()
            {
                Id          = model.Id,
                WheelBaseId = model.WheelBase.Id,
                VehicleId   = model.Vehicle.Id,
            }, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }