Esempio n. 1
0
        public async Task <GenerateImageData2Response> Handle(GenerateImageData2Request request, CancellationToken cancellationToken)
        {
            var errorMessage = string.Empty;
            List <PrintTemplateData> response = new List <PrintTemplateData>();

            try
            {
                response = await _infoServiceWrapper.GenerateImageData2(request.AccountId, request.PrintTemplateId, request.ComputerName);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new GenerateImageData2Response
            {
                IsServiceCallSuccess = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                PrintTemplateData = response
            }));
        }