public void GenerateAndSendGeneralChoice(ViewModel.SenderAndRecieverFivePersonsSingleChoice model, string contenttext, BackgroundImageEnum background, Mp3Enum song, FontsEnum font) { var item2 = new GenerateAndSendDataQuintupleDelegate(GeneralFunctions.GeneratePdfAndSendToRecipients.GenerateAndSendData); item.QuintupleGeneralChoiceEvent += item2; item.QuintupleGeneralChoiceEvent(model, contenttext, background, song, font); item.QuintupleGeneralChoiceEvent -= item2; }
public static void GenerateAndSendData(ViewModel.SenderAndRecieverFivePersonsSingleChoice model, string contenttext, BackgroundImageEnum background, Mp3Enum song, FontsEnum font) { var stringpath = ITextSharpPdfCreator.GeneratefileForCustomers.GeneratePdfFileForCustomer(ReturnPathString.ReturnUniqueFileName(), model.sender.firstname, model.sender.lastname, contenttext, background, song, font); SmtpMailService.SendCustomerMail.SendMailToCustomer(model.Recipient1.Email, stringpath, song); SmtpMailService.SendCustomerMail.SendMailToCustomer(model.Recipient2.Email, stringpath, song); SmtpMailService.SendCustomerMail.SendMailToCustomer(model.Recipient3.Email, stringpath, song); SmtpMailService.SendCustomerMail.SendMailToCustomer(model.Recipient4.Email, stringpath, song); SmtpMailService.SendCustomerMail.SendMailToCustomer(model.Recipient5.Email, stringpath, song); }