public AddSubcontractProcessMasterResponseDto AddSubcontractProcessMaster(AddSubcontractProcessMasterRequestDto addSubcontractProcessMasterRequestDto) { AddSubcontractProcessMasterResponseDto addSubcontractProcessMasterResponseDto; try { addSubcontractProcessMasterResponseDto = bSubcontractProcessMasterProvider.AddSubcontractProcessMaster(addSubcontractProcessMasterRequestDto); addSubcontractProcessMasterResponseDto.ServiceResponseStatus = 1; } catch (SSException applicationException) { addSubcontractProcessMasterResponseDto = new AddSubcontractProcessMasterResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { addSubcontractProcessMasterResponseDto = new AddSubcontractProcessMasterResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(addSubcontractProcessMasterResponseDto); }
public AddSubcontractProcessMasterResponseDto AddSubcontractProcessMaster(AddSubcontractProcessMasterRequestDto addSubcontractProcessMasterRequestDto) { var cModel = new AddSubcontractProcessMasterCM { ProcessDescription = addSubcontractProcessMasterRequestDto.ProcessDescription, CreatedBy = new Guid("783F190B-9B66-42AC-920B-E938732C1C01"), //Later needs to be remove CreatedDateTime = System.DateTime.UtcNow }; var response = subcontractProcessMasterRepository.AddSubcontractProcessMaster(cModel); return(new AddSubcontractProcessMasterResponseDto()); }