protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Page.RouteData.Values["Id"] != null)
                {
                    setPlaceHolder(true);
                    WebinarDA objWebinarDA = new WebinarDA();
                    string URLkey = Page.RouteData.Values["Id"].ToString();
                    int WebinarID = objWebinarDA.getWebinarIDFromURLKey("REg", URLkey);
                    if (WebinarID != 0)
                    {
                        List<WebinarBE> objWebDetail = objWebinarDA.GetWebinarDetailDA(WebinarID);
                        if (objWebDetail.Count > 0)
                        {
                            lblWebinarTitle.Text = objWebDetail[0].Title;
                            lblWebinarDesc.Text = objWebDetail[0].Description;
                            //Pass values to DateTime user controls
                            MasterDA objMas = new MasterDA();
                            List<TimeZoneBE> tmzone = objMas.getTimeZoneName(objWebDetail[0].TimeZoneID);
                            if (tmzone.Count > 0)
                                plDateTime1.WebinarDateTime = objWebDetail[0].StartDate.ToLongDateString() + "<br>" + Convert.ToDateTime(objWebDetail[0].StartTime).ToLongTimeString() + "<br>" + tmzone[0].TimeZoneName;
                            else
                                plDateTime1.WebinarDateTime = objWebDetail[0].StartDate.ToLongDateString() + "<br>" + Convert.ToDateTime(objWebDetail[0].StartTime).ToLongTimeString();

                        }
                        List<WebinarTheme> objWT = objWebinarDA.getWebinarTheme(WebinarID);
                        if (objWT.Count > 0)
                        {
                            layoutCSS.Href = "~/Styles/layout/layout" + objWT[0].ThemeLayoutID.ToString() + ".css";
                            lblWebinarTitle.ForeColor = System.Drawing.ColorTranslator.FromHtml(objWT[0].PriThemeColor);
                            lblWebinarDesc.ForeColor = System.Drawing.ColorTranslator.FromHtml(objWT[0].SecThemeColor);
                            regPage.Style.Add("font-family",objWT[0].ThemeFontName);
                            regPage.Style.Add("font-size", "12px");
                            //Pass values to Logo user control
                            plLogos1.WebinarID = objWT[0].WebinarID;
                            //plLogos1.LogoID1 = objWT[0].LogoID1;
                            //plLogos1.LogoID2 = objWT[0].LogoID2;
                            plLogos1.HeaderType = objWT[0].HeaderType;
                            //Pass values to registration form user controls
                            plRegForm1.WebinarID = WebinarID.ToString();
                            //Pass values to Presenter user controls
                            plRegPresenter1.WebinarID = WebinarID.ToString();
                        }
                    }
                    else
                        setPlaceHolder(false);
                }
                else
                    setPlaceHolder(false);
            }
        }
 private string getFormedEmailContent(string contentWithTags, string emailType, int webinarID)
 {
     string rtn = "";
     WebinarAllEmailTagsBO objTpl = new WebinarAllEmailTagsBO();
     switch (emailType)
     {
         case "Attendee Followup":
             rtn = contentWithTags;
             break;
         case "Confirmation Email":
             rtn = contentWithTags;
             break;
         case "Non-Attendee Followup":
             rtn = contentWithTags;
             break;
         case "Registrant Reminder Email":
             List<WebinarBE> objWebBE = objWebinarDA.GetWebinarDetailDA(webinarID);
             if (objWebBE.Count > 0)
             {
                 MasterDA objMas = new MasterDA();
                 List<TimeZoneBE> tm =  objMas.getTimeZoneName(objWebBE[0].TimeZoneID);
                 objTpl.EventDate = objWebBE[0].StartDate.ToShortDateString();
                 objTpl.EventTime = objWebBE[0].StartTime;
                 objTpl.TimeZoneName = tm[0].ShortTimeZoneName;
                 objTpl.WebinarID = objWebBE[0].WebinarID;
                 objTpl.WebinarTitle = objWebBE[0].Title;
                 objTpl.AudienceURL =  "";
                 objTpl.RemainingDays = "";
             }
             break;
         case "Webinar Invitation":
             rtn = contentWithTags;
             break;
     }
     TemplateMgmt objTemplate = new TemplateMgmt();
     rtn = objTemplate.GetContentForAnyWebinarEmail(objTpl, contentWithTags, false, emailType);
     return rtn;
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Page.RouteData.Values["Id"] != null)
                {
                    WebinarDA objWebinarDA = new WebinarDA();
                    string URLkey = Page.RouteData.Values["Id"].ToString();

                    bool isPreview = false;
                   // URLkey.Split(new char[] { '_' });

                    if (URLkey.IndexOf("_") > 1)
                    {
                        isPreview = true;
                        ArrayList arr = objUtil.StringToArrayList(URLkey, new char[] { '_' });
                        if (arr.Count > 1)
                        {
                            ArrayList arr1 = objUtil.StringToArrayList(arr[0].ToString(), new char[] { '$' });
                            layoutCSS.Href = "~/Styles/layout/theme" + arr1[1].ToString() + ".css";
                        }
                        URLkey = arr[1].ToString();
                    }

                    int WebinarID = objWebinarDA.getWebinarIDFromURLKey("AUD", URLkey);
                    if (WebinarID != 0)
                    {
                        List<WebinarBE> objWebDetail = objWebinarDA.GetWebinarDetailDA(WebinarID);
                        if (objWebDetail.Count > 0)
                        {
                            lblWebinarTitle.Text = objWebDetail[0].Title;
                            lblWebinarDesc.Text = objWebDetail[0].Description;

                            if (DateTime.Compare(objWebDetail[0].StartDate, DateTime.Now) != -1)
                            {

                                MasterDA objMas = new MasterDA();
                                List<TimeZoneBE> tmzone = objMas.getTimeZoneName(objWebDetail[0].TimeZoneID);
                                if (tmzone.Count > 0)
                                    ltrInstruction.Text = "This presentation will begin on " + objWebDetail[0].StartDate.ToLongDateString() + " at " + Convert.ToDateTime(objWebDetail[0].StartTime).ToString("h:mm tt") + " " + tmzone[0].ShortTimeZoneName + ".<br />"
                                        + "<br />Audience members may arrive 15 minutes in advance of this time.";
                                else
                                    ltrInstruction.Text = "This presentation will begin on " + objWebDetail[0].StartDate.ToLongDateString() + " at " + Convert.ToDateTime(objWebDetail[0].StartTime).ToString("h:mm tt") + "<br />"
                                        + "<br />Audience members may arrive 15 minutes in advance of this time.";
                            }
                            else
                            {
                                ltrInstruction.Text = "This is past event...";
                                btnLaunch.Visible = false;
                            }

                            plRegPresenter1.WebinarID = WebinarID.ToString();

                            if (!isPreview)
                            {
                                List<WebinarTheme> objWebTheme = objWebinarDA.getWebinarTheme(WebinarID);
                                if (objWebTheme.Count > 0)
                                    layoutCSS.Href = "~/Styles/layout/theme" + objWebTheme[0].ThemeLayoutID.ToString() + ".css";
                            }

                            List<WebinarResource> objWRes = objWebinarDA.getRegFormResoures(WebinarID);
                            if (objWRes.Count > 0)
                            {
                                plLogos1.WebinarID = WebinarID;
                                if (objWRes[0].ResourceType.ToUpper() == "BANNER")
                                    dvTitle.Visible = false;
                            }
                            else
                                dvLogo.Visible = false;

                        }
                        //List<WebinarTheme> objWT = objWebinarDA.getWebinarTheme(WebinarID);
                        //if (objWT.Count > 0)
                        //{
                        //    //lblWebinarTitle.ForeColor = System.Drawing.ColorTranslator.FromHtml(objWT[0].PriThemeColor);
                        //    //lblWebinarDesc.ForeColor = System.Drawing.ColorTranslator.FromHtml(objWT[0].SecThemeColor);

                        //    plLogos1.LogoID1 = objWT[0].LogoID1;
                        //    plLogos1.LogoID2 = objWT[0].LogoID2;
                        //    plLogos1.HeaderType = objWT[0].HeaderType;
                        //    //Pass values to Presenter user controls

                        //}
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Page.RouteData.Values["Id"] != null)
                {
                    EBirdUtility objUtil = new EBirdUtility();

                    setPlaceHolder(true);
                    string URLkey = Page.RouteData.Values["Id"].ToString();
                    bool isPreview = false;
                    URLkey.Split(new char[] { '_' });

                    if (URLkey.IndexOf("_") > 1)
                    {
                        Response.Redirect("/Regpreview/" + URLkey);
                        Response.End();
                        isPreview = true;
                        if (isPreview == true)
                        {
                            btnRefCol1.Visible = false;
                            Predummy3.Visible = true;
                        }
                        else
                        {
                            btnRefCol1.Visible = true;
                            Predummy3.Visible = false;
                        }
                        ArrayList arr = objUtil.StringToArrayList(URLkey, new char[] { '_' });
                        if (arr.Count > 1)
                        {
                            ArrayList arr1 = objUtil.StringToArrayList(arr[0].ToString(), new char[] { '$' });
                            layoutCSS.Href = "~/Styles/layout/theme" + arr1[1].ToString() + ".css";

                            if (arr1[0].ToString().Substring(0, 1) == "1")
                                dvSummary.Visible = true;
                            else
                                dvSummary.Visible = false;

                            if (arr1[0].ToString().Substring(1, 1) == "1")
                                dvSpeaker.Visible = true;
                            else
                                dvSpeaker.Visible = false;
                        }
                        URLkey = arr[1].ToString();
                    }

                    int WebinarID = objWebinarDA.getWebinarIDFromURLKey("REg", URLkey);
                    hWebinarID.Value = WebinarID.ToString();
                    if (WebinarID != 0)
                    {
                        #region getting the pagelet setting
                        List<WebinarRegistration> objWebReg = objWebinarDA.getWebinarRegistration(WebinarID);
                        if (objWebReg.Count > 0)
                        {
                            if (!isPreview)
                            {
                                dvLogo.Visible = objWebReg[0].IncludeLogoBanner;
                                dvSpeaker.Visible = objWebReg[0].IncludeSpeakerBio;
                                dvSummary.Visible = objWebReg[0].IncludeSummary;
                            }
                            if (!dvSpeaker.Visible && !dvSummary.Visible)
                            {
                                phAll.Visible = false;
                                phOpt1.Visible = true;
                                //layoutCSS.Href = "~/Styles/layout1/layout2.css";

                                plPreEmail2.setSingleColumnAttributes();
                                dvPre.Attributes.Remove("class");
                                dvPre.Attributes.Add("class", "Regi-Top-Sec1N");
                            }

                            // Check registration status
                            if (objWebReg[0].isRegistrationEnabled)
                            {
                                plRegForm1.Visible = true;
                                plRegForm2.Visible = true;
                                lblRegStatus.Visible = false;
                            }
                            else
                            {
                                plRegForm1.Visible = false;
                                plRegForm2.Visible = false;
                                lblRegStatus.Visible = true;
                            }

                        }
                        #endregion

                        if (!isPreview)
                        {
                            List<WebinarTheme> objWebTheme = objWebinarDA.getWebinarTheme(WebinarID);
                            if (objWebTheme.Count > 0)
                            {
                                layoutCSS.Href = "~/Styles/layout/theme" + objWebTheme[0].ThemeLayoutID.ToString() + ".css";
                            }
                        }

                        string eventTime = "";

                        List<WebinarBE> objWebDetail = objWebinarDA.GetWebinarDetailDA(WebinarID);
                        if (objWebDetail.Count > 0)
                        {
                            List<WebinarResource> objWRes = objWebinarDA.getRegFormResoures(WebinarID);

                            if (objWRes.Count > 0)
                            {
                                if (objWRes[0].ResourceType.ToUpper() == "BANNER")
                                    dvTitle.Visible = false;
                            }
                            else
                                dvLogo.Visible = false;

                            lblWebinarTitle.Text = objWebDetail[0].Title;
                            if (dvSummary.Visible && objWebDetail[0].Description.Trim() != "")
                                lblWebinarDesc.Text = objWebDetail[0].Description;
                            else
                                dvSummary.Visible = false;
                            //Pass values to DateTime user controls
                            MasterDA objMas = new MasterDA();
                            List<TimeZoneBE> tmzone = objMas.getTimeZoneName(objWebDetail[0].TimeZoneID);
                            if (tmzone.Count > 0)
                                eventTime = objWebDetail[0].StartDate.ToLongDateString() + "<br>" + Convert.ToDateTime(objWebDetail[0].StartTime).ToString("h:mm tt") + " - " + Convert.ToDateTime(objWebDetail[0].EndTime).ToString("h:mm tt") + "<br>" + tmzone[0].ShortTimeZoneName;
                            else
                                eventTime = objWebDetail[0].StartDate.ToLongDateString() + "<br>" + Convert.ToDateTime(objWebDetail[0].StartTime).ToLongTimeString();

                            if (phOpt1.Visible)
                                plDateTime2.WebinarDateTime = eventTime;
                            else
                                plDateTime1.WebinarDateTime = eventTime;
                        }

                        //Pass values to Logo user control
                        if (dvLogo.Visible)
                            plLogos1.WebinarID = WebinarID;
                        //Pass values to registration form user controls
                        if (phOpt1.Visible)
                        {
                            plRegForm2.WebinarID = WebinarID.ToString();
                            plRegForm2.isPreview = (isPreview ? "1" : "0");
                        }
                        else
                        {
                            plRegForm1.WebinarID = WebinarID.ToString();
                            //plRegForm1.isPreview = isPreview;
                            plRegForm1.isPreview = (isPreview ? "1" : "0");
                        }
                        //Pass values to Presenter user controls
                        if (dvSpeaker.Visible)
                            plRegPresenter1.WebinarID = WebinarID.ToString();

                        //pass values to pre-registered user controls
                        plPreEmail1.WebinarID = WebinarID.ToString();
                        plPreEmail1.isPreview = (isPreview ? "1" : "0");
                    }
                    else
                        setPlaceHolder(false);
                }
                else
                    setPlaceHolder(false);
            }
        }