protected void EmailButtonCancel_Click(object sender, EventArgs e) { EmailPanel.Visible = false; ClearForm(); if (Cancel != null) { Cancel(this, EventArgs.Empty); } EmailUpdatePanel.Update(); }
protected void EmailButtonOpen_Click(object sender, EventArgs e) { ClearForm(); EmailPanel.Visible = true; //ReplyField.Text = ((SoftwareSystemComponentState)Context.Items[SoftwareSystemComponentStateFacade.HttpContextKey]). // AuthorizedMember.GetValue().EmailAddress; SubjectField.Text = subject + " - " + DateTime.Now.ToShortDateString(); if (Open != null) { Open(this, EventArgs.Empty); } EmailUpdatePanel.Update(); }
protected void EmailButtonSend_Click(object sender, EventArgs e) { if (Page.IsValid) { // build the args EmailEventArgs args = new EmailEventArgs(); args.ReplyTo = new MailAddress(ReplyField.Text); foreach (string to in ToField.Text.Split(new char[] { ',', ';' })) { if (!"".Equals(to.Trim())) { args.AddRecipient(new MailAddress(to.Trim())); } } args.Subject = SubjectField.Text; args.Body = BodyField.Text.Replace(" ", " ").Replace(Environment.NewLine, "<br/>"); //****BUZID:12217 //args.AttachmentType = (HTMLAttachment.Checked) // ? EmailEventArgs.EmailAttachmentType.HTML // : EmailEventArgs.EmailAttachmentType.PDF; args.AttachmentType = EmailEventArgs.EmailAttachmentType.PDF; //**** args.AttachmentName = Subject + " - " + ((SoftwareSystemComponentState) Context.Items[SoftwareSystemComponentStateFacade.HttpContextKey]).Id + " - " + DateTime.Now.ToString("M-d-yyyy"); // clear the form ClearForm(); // hide the form EmailPanel.Visible = false; // broadcast the event if (Send != null) { Send(this, args); } EmailUpdatePanel.Update(); } }