Example #1
0
        private async void SendMail(object x)
        {
            var companyToSend = Companies.Where(c => c.Selected).ToList();

            foreach (var item in companyToSend)
            {
                item.SelectedTypeEmail = "OnlyEmail";
                var sendAtt = item.SelectedTypeEmail.Equals("OnlyEmail") ? false : true;
                _fileWriter.WriteDocuments(item, sendAtt);
                //await _emailService.SendEmail(item, sendAtt);
                await _companyRepo.UpdateSendingDate(item);

                item.Selected = false;
            }
            OnPropertyChanged("Companies");
        }