Пример #1
0
        protected void btnReview_Click(object sender, EventArgs e)
        {
            lblError1.Text = "";
            if (txtReviewerEmail.Text.Trim() != "")
            {
                if (objUtil.isEmailsValid(txtReviewerEmail.Text.Trim(), new char[] { ';' }))
                {
                    EmailBE objEmailBE = new EmailBE();
                    EmailDA objEmailDA = new EmailDA();
                    int emlReqID = 0;
                    objEmailBE.isToEmailRef = true;
                    objEmailBE.RequestStatus = "No-delay";
                    objEmailBE.RequestType = "Thank You for registering"; // "Webinar Registrant Emailing";
                    objEmailBE.Subject = "Thank You for registering content for review";         // txtSubject.Text;
                    objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
                    objEmailBE.ToEmail = "";
                    objEmailBE.FromEmail = Session["EmailID"].ToString();
                    objEmailBE.EmailContent = "<b>Following are the content for review</b><br><br>" + redtThankContent.Content;
                    emlReqID = objEmailDA.SaveEmailRequest(objEmailBE);
                    objEmailDA.SaveToEmail(new EmailTo
                                {
                                    EmailRequestID = emlReqID,
                                    ToEmails = txtReviewerEmail.Text.Trim(),
                                    ToType = ""
                                });

                    lblError1.Text = "Emailed to reviewer(s)";
                }
                else
                {
                    lblError1.Text = "One or more entered reviewer's email is invalid";
                }
            }
            else
                lblError1.Text = "Reviewer email(s) is missing";
        }
Пример #2
0
 private void UpdateToEmails(List<EmailAddressBO> objEmailAddress, string toType, int requestID)
 {
     StringBuilder strToEmail = new StringBuilder();
     EmailTo objEmailTo = new EmailTo();
     EmailDA objEmailDA = new EmailDA();
     for (int idx = 0; idx < objEmailAddress.Count; idx++)
     {
         strToEmail.Append(objEmailAddress[idx].EmailAddress + ",");
     }
     objEmailTo.EmailRequestID = requestID;
     objEmailTo.ToEmails = strToEmail.ToString();
     objEmailTo.ToType = toType;
     objEmailDA.SaveToEmail(objEmailTo);
 }