コード例 #1
0
ファイル: StepController.cs プロジェクト: YBerragragui/Riafco
        public IHttpActionResult DeleteStepParagraph(int paragraphId)
        {
            StepParagraphRequest request = new StepParagraphRequest
            {
                StepParagraphDto = new StepParagraphDto {
                    ParagraphId = paragraphId
                },
                FindStepParagraphDto = FindStepParagraphDto.StepParagraphId
            };

            StepParagraphMessage message = new StepParagraphMessage();
            List <string>        errors  = ValidateDeleteStepParagraph(request);

            if (errors != null && errors.Any())
            {
                message.ErrorMessage     = StepMessageResource.ValidationErrors;
                message.ErrorType        = ErrorType.ValidationError;
                message.Errors           = new List <string>();
                message.OperationSuccess = false;
                message.Errors.AddRange(errors);
            }
            else
            {
                message = _serviceStepParagraphClient.DeleteStepParagraph(request);
            }
            return(Json(message));
        }
コード例 #2
0
        public IHttpActionResult DeleteStepParagraph(StepParagraphRequest request)
        {
            StepParagraphMessage message = serviceStepParagraphClient.DeleteStepParagraph(request);

            return(Json(message));
        }