Example #1
0
        public string getFormedEmailContent(string contentWithTags, string emailType, int webinarID, string dateformat = "")
        {
            string rtn = "";
            WebinarAllEmailTagsBO objTpl = new WebinarAllEmailTagsBO();
            ReportDA objRpt = new ReportDA();
            List<GeneralWebinarTagsBO> objTags = new List<GeneralWebinarTagsBO>();

            objTags = objRpt.getGeneralWebinarTagValues(webinarID);

            switch (emailType)
            {
                case "Attendee Followup":
                    if (objTags.Count > 0)
                    {
                        objTpl.WebinarTitle = objTags[0].WebinarList.Title;
                        objTpl.AudienceURL = objTags[0].WebinarURLList.AudienceInterfaceURL;
                        objTpl.UserEmail = objTags[0].UserEmail;
                        if (objTags[0].Registrantlist.Fld1 == null)
                            objTpl.RegistrantFirstName = "Registrant Name";
                        else
                            if (objTags[0].Registrantlist.Fld1.Trim() == "")
                                objTpl.RegistrantFirstName = "Registrant Name";
                            else
                                objTpl.RegistrantFirstName = objTags[0].Registrantlist.Fld1;
                    }
                    break;
                case "Confirmation Email":
                    if (objTags.Count > 0)
                    {
                        objTpl.WebinarTitle = objTags[0].WebinarList.Title;
                        objTpl.EventDate = objTags[0].WebinarList.StartDate.ToString(dateformat.Replace("MM", "MMM"));
                        objTpl.EventTime = Convert.ToDateTime(objTags[0].WebinarList.StartTime).ToString("h:mm tt");
                        objTpl.AudienceURL = objTags[0].WebinarURLList.AudienceInterfaceURL;
                        if (objTags[0].Registrantlist.Fld1 == null)
                            objTpl.RegistrantFirstName = "Registrant Name";
                        else
                            if (objTags[0].Registrantlist.Fld1.Trim() == "")
                                objTpl.RegistrantFirstName = "Registrant Name";
                            else
                                objTpl.RegistrantFirstName = objTags[0].Registrantlist.Fld1;
                    }
                    break;
                case "Non-Attendee Followup":
                    if (objTags.Count > 0)
                    {
                        objTpl.WebinarTitle = objTags[0].WebinarList.Title;
                        objTpl.AudienceURL = objTags[0].WebinarURLList.AudienceInterfaceURL;
                        if (objTags[0].Registrantlist.Fld1 == null)
                            objTpl.RegistrantFirstName = "Registrant Name";
                        else
                            if (objTags[0].Registrantlist.Fld1.Trim() == "")
                                objTpl.RegistrantFirstName = "Registrant Name";
                            else
                                objTpl.RegistrantFirstName = objTags[0].Registrantlist.Fld1;
                    }
                    break;
                case "Registrant Reminder Email":
                    if (objTags.Count > 0)
                    {
                        objTpl.WebinarTitle = objTags[0].WebinarList.Title;
                        objTpl.EventDate = objTags[0].WebinarList.StartDate.ToString(dateformat.Replace("MM", "MMM"));
                        objTpl.EventTime = Convert.ToDateTime(objTags[0].WebinarList.StartTime).ToString("h:mm tt");
                        objTpl.AudienceURL = objTags[0].WebinarURLList.AudienceInterfaceURL;
                        objTpl.TimeZoneName = objTags[0].TimeZoneName;
                        objTpl.WebinarID = objTags[0].WebinarList.WebinarID;
                        objTpl.RemainingDays = "";
                        if (objTags[0].Registrantlist.Fld1 == null)
                            objTpl.RegistrantFirstName = "Registrant Name";
                        else
                            if (objTags[0].Registrantlist.Fld1.Trim() == "")
                                objTpl.RegistrantFirstName = "Registrant Name";
                            else
                                objTpl.RegistrantFirstName = objTags[0].Registrantlist.Fld1;
                    }
                    break;
                case "Webinar Invitation":
                    if (objTags.Count > 0)
                    {
                        objTpl.RegistrationURL = objTags[0].WebinarURLList.RegistrationURL;
                        objTpl.WebinarTitle = objTags[0].WebinarList.Title;
                        objTpl.EventDate = objTags[0].WebinarList.StartDate.ToString(dateformat.Replace("MM", "MMM"));
                        objTpl.EventTime = Convert.ToDateTime(objTags[0].WebinarList.StartTime).ToString("h:mm tt");
                        objTpl.Description = objTags[0].WebinarList.Description;
                        objTpl.EndTime = Convert.ToDateTime(objTags[0].WebinarList.EndTime).ToString("h:mm tt");
                        objTpl.TimeZoneName = objTags[0].TimeZoneShortName;
                        AudiUrl = objTags[0].WebinarURLList.AudienceInterfaceURL;
                    }
                    rtn = contentWithTags;
                    break;
                case "Webinar Cancellation":
                    if (objTags.Count > 0)
                    {
                        objTpl.WebinarTitle = objTags[0].WebinarList.Title;
                        objTpl.EventTime = Convert.ToDateTime(objTags[0].WebinarList.StartTime).ToString("h:mm tt");
                        objTpl.EventDate = objTags[0].WebinarList.StartDate.ToString(dateformat.Replace("MM", "MMM"));
                        if (objTags[0].Registrantlist.Fld1 == null)
                            objTpl.RegistrantFirstName = "Registrant Name";
                        else
                            if (objTags[0].Registrantlist.Fld1.Trim() == "")
                                objTpl.RegistrantFirstName = "Registrant Name";
                            else
                            objTpl.RegistrantFirstName = objTags[0].Registrantlist.Fld1;
                    }
                    break;
            }
            EBird.Framework.TemplateMgmt objTemplate = new EBird.Framework.TemplateMgmt();
            rtn = objTemplate.GetContentForAnyWebinarEmail(objTpl, contentWithTags, false, emailType, dateformat);
            return rtn;
        }
Example #2
0
 public string getCSSDefns(int themeID, string inStr)
 {
     string rtnStr = string.Empty;
     rtnStr = inStr;
     ReportDA objRpt = new ReportDA();
     List<themeCSSBO> objTheme = objRpt.getThemeCSSValues(themeID);
     if (objTheme.Count > 0)
     {
         rtnStr = rtnStr.Replace("##STYLE_BG##", objTheme[0].shade1);
         rtnStr = rtnStr.Replace("##STYLE_BORDER##", objTheme[0].shade2);
     }
     return rtnStr;
 }
Example #3
0
 public string getFormedEmailSubjectLine(string subjectWithTags, int webinarID)
 {
     string rtnStr = subjectWithTags;
     if (subjectWithTags.IndexOf("##") > 1)
     {
         List<GeneralWebinarTagsBO> objTags = new List<GeneralWebinarTagsBO>();
         ReportDA objRpt = new ReportDA();
         objTags = objRpt.getGeneralWebinarTagValues(webinarID);
         rtnStr = subjectWithTags.Replace("##EVENTTITLE##", objTags[0].WebinarList.Title);
     }
     return rtnStr;
 }