Exemple #1
0
        public async Task <IHttpActionResult> Put(int id, VehicleToBedConfigInputModel model)
        {
            var changeRequestId = await _vehicleToBedConfigApplicationService.UpdateAsync(new VehicleToBedConfig()
            {
                Id          = model.Id,
                VehicleId   = model.Vehicle.Id,
                BedConfigId = model.BedConfig.Id
            }, id, "update-requestor");

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

            return(Ok(changeRequestId));
        }
Exemple #3
0
        public async Task <IHttpActionResult> Post(VehicleToBedConfigInputModel model)
        {
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _vehicleToBedConfigApplicationService.AddAsync(new VehicleToBedConfig()
            {
                Id          = model.Id,
                BedConfigId = model.BedConfig.Id,
                VehicleId   = model.Vehicle.Id
            }, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }