public async Task <IActionResult> PublishTransfer()
        {
            var emails = await _emailDataService.GetEmailModels();

            if (emails == null)
            {
                return(NotFound());
            }

            var records = await _recordTempService.GetTempRecords();

            if (records == null)
            {
                return(NotFound());
            }

            /*
             * var htmlEmailMessage = _emailSendingService.GenerateHTMLEmail(records);
             * _emailSendingService.SendMail(htmlEmailMessage, "Jaunas stundu izmaiņas", true, emails);
             */
            foreach (var e in emails)
            {
                var em = new DeleteEmailModel
                {
                    Email       = e.Email,
                    CreatedDate = e.CreatedDate
                };
                var htmlEmailMessage = _emailSendingService.GenerateHTMLEmail(records, em);
                _emailSendingService.SendMail(htmlEmailMessage, "Jaunas stundu izmaiņas", true, em.Email);
            }

            var transfered = await _recordTempService.TransferChanges();

            if (transfered == false)
            {
                return(BadRequest());
            }

            return(Ok());
        }