Exemplo n.º 1
0
        public string GetReminderEmail(WebinarReminderEmailTemplateBO objTemplate, string ContentInfo, bool isContentFromTemplate)
        {
            string fileContent = "";
            if (isContentFromTemplate)
            {
                if (File.Exists(ContentInfo))
                    fileContent = File.ReadAllText(ContentInfo);
            }
            else
                fileContent = ContentInfo;

            fileContent = fileContent.Replace("@@EVENTDATE", objTemplate.EventDate);
            fileContent = fileContent.Replace("@@EVENTIME", objTemplate.EventTime);
            fileContent = fileContent.Replace("@@REGISTRANTID", objTemplate.RegistrantID.ToString());
            fileContent = fileContent.Replace("@@TIMEZONE", objTemplate.TimeZoneName);
            fileContent = fileContent.Replace("@@WEBINARID", objTemplate.WebinarID.ToString());
            fileContent = fileContent.Replace("@@WEBINARTITLE", objTemplate.WebinarTitle);
            fileContent = fileContent.Replace("##REMINDERDAYS##", objTemplate.RemainingDays);
            fileContent = fileContent.Replace("##CALENDARREMINDER##", objTemplate.CalenderReminder);
            fileContent = fileContent.Replace("##AUDI_URL##", objTemplate.AudienceURL);
            fileContent = fileContent.Replace("@@REGEMAIL", objTemplate.RegistrantEmail);

            return fileContent;
        }
        private string getFormedEmailContent(string contentWithTags)
        {
            string rtn = "";
            List<WebinarBE> objWebBE = objWebinarDA.GetWebinarDetailDA(Convert.ToInt32(hWebinarID.Value));
            if (objWebBE.Count > 0)
            {
                WebinarReminderEmailTemplateBO objTpl = new WebinarReminderEmailTemplateBO();

                objTpl.EventDate = objWebBE[0].StartDate.ToShortDateString();
                objTpl.EventTime = objWebBE[0].StartTime;
                objTpl.TimeZoneName = objWebBE[0].TimeZoneID.ToString();  // need to call function to get zone name
                objTpl.WebinarID = objWebBE[0].WebinarID;
                objTpl.WebinarTitle = objWebBE[0].Title;
                objTpl.AudienceURL = "";
                objTpl.RemainingDays = "";
                TemplateMgmt objTemplate = new TemplateMgmt();
                rtn = objTemplate.GetReminderEmail(objTpl, contentWithTags, false);
            }
            return rtn;
        }