Exemplo n.º 1
0
        protected virtual EmailArgs SendEmail()
        {
            var ea = new EmailArgs
            {
                Attachment = ExportToPdf("Attachment")
            };

            return(ea);
        }
Exemplo n.º 2
0
 private void tsbEmail_Click(object sender, EventArgs e)
 {
     using (Emailer.emailForm ef = new Emailer.emailForm())
     {
         ef.LoadAddress += new Emailer.emailForm.LoadAddressEventHandler(ef_LoadAddress);
         if (SendEmail != null)
         {
             var emailArgs = new EmailArgs();
             SendEmail(this, emailArgs);
             ef.Address    = emailArgs.Address;
             ef.Subject    = emailArgs.Subject;
             ef.Body       = emailArgs.Body;
             ef.Attachment = emailArgs.Attachment;
         }
         ef.ShowDialog();
         ef.Close();
     }
 }