Example #1
0
        public async Task <IHttpActionResult> Put(int id, VehicleToBodyStyleConfigInputModel model)
        {
            var changeRequestId = await _vehicleToBodyStyleConfigApplicationService.UpdateAsync(new VehicleToBodyStyleConfig()
            {
                Id                = model.Id,
                VehicleId         = model.Vehicle.Id,
                BodyStyleConfigId = model.BodyStyleConfig.Id
            }, id, "update-requestor");

            return(Ok(changeRequestId));
        }
Example #2
0
        public async Task <IHttpActionResult> Post(int id, VehicleToBodyStyleConfigInputModel vehicleToBodyStyleConfigInputModel)
        {
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = vehicleToBodyStyleConfigInputModel.Comment
            };
            var attachments     = SetUpAttachmentsModels(vehicleToBodyStyleConfigInputModel.Attachments);
            var changeRequestId = await _vehicleToBodyStyleConfigApplicationService.DeleteAsync(null, id, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }
Example #3
0
        public async Task <IHttpActionResult> Post(VehicleToBodyStyleConfigInputModel model)
        {
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _vehicleToBodyStyleConfigApplicationService.AddAsync(new VehicleToBodyStyleConfig()
            {
                Id = model.Id,
                BodyStyleConfigId = model.BodyStyleConfig.Id,
                VehicleId         = model.Vehicle.Id
            }, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }