Exemplo n.º 1
0
        public string getEmailRptHeader(int webinarID)
        {
            WebinarDA objWebinarDA = new WebinarDA();
            List<WebinarResource> objWRes = objWebinarDA.getRegFormResoures(webinarID);
            int Rec = objWRes.Count;
            StringBuilder sb = new StringBuilder("<table width='100%'><tr>");

            DocumentDA objDocDA = new DocumentDA();

            if (Rec > 0)
            {
                if (objWRes[0].ResourceType.ToUpper() == "BANNER")
                {
                    //sb.Append("<td><img src='" + Common.Constant.BaseURL + "Pages/logo/" + objWRes[0].DocID.ToString() + "'></td>");
                    sb.Append("<td><img src='" + objDocDA.GetDocumentPath(Convert.ToInt32(objWRes[0].DocID), true, true) + "'></td>");
                }
                else
                {
                    Rec = (int)(100 / objWRes.Count);
                    for (int idx = 0; idx < objWRes.Count; idx++)
                    {
                        if (idx == objWRes.Count-1)
                            sb.Append("<td valign=middle width='" + Rec.ToString() + "%' align='right'><img src='" + objDocDA.GetDocumentPath(Convert.ToInt32(objWRes[idx].DocID), true, true) + "'></td>");
                        else
                        {
                            if (idx % 2 != 0 && idx != 0)
                                sb.Append("<td valign=middle width='" + Rec.ToString() + "%' align='center'><img src='" + objDocDA.GetDocumentPath(Convert.ToInt32(objWRes[idx].DocID), true, true) + "'></td>");
                            else
                                sb.Append("<td valign=middle width='" + Rec.ToString() + "%' ><img src='" + objDocDA.GetDocumentPath(Convert.ToInt32(objWRes[idx].DocID), true, true) + "'></td>");
                        }
                    }
                }
            }
            sb.Append("</tr></table>");
            return sb.ToString();
        }
Exemplo n.º 2
0
        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

                        //}
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void GetLogoBanner()
        {
            WebinarDA objWebinarDA = new WebinarDA();
            List<WebinarResource> objWRes = objWebinarDA.getRegFormResoures(intWebinarID);
            int Rec = objWRes.Count;
            if (Rec > 0)
            {
                HtmlTableRow trImageRow = new HtmlTableRow();
                if (objWRes[0].ResourceType == "BANNER")
                {
                    //phBanner.Visible = true;
                    //imgBanner.Src = "~/handler/showImage.ashx?ID=" + objWRes[idx].DocID.ToString();

                    HtmlTableCell tdImageCell = new HtmlTableCell();
                    HyperLink imgLogo = new HyperLink();
                    imgLogo.ID = "id0";
                    imgLogo.ImageUrl = "~/handler/showImage.ashx?ID=" + objWRes[0].DocID.ToString();
                    imgLogo.ToolTip = objWRes[0].LogoUrlName.ToString();
                    imgLogo.NavigateUrl = objWRes[0].LogoUrl.ToString();
                    imgLogo.Target = "_blank";
                    tdImageCell.Controls.Add(imgLogo);
                    trImageRow.Cells.Add(tdImageCell);
                    tLogo.Rows.Add(trImageRow);
                }
                else
                {
                    //phLogo.Visible = true;
                    //Rec = (int) Math.Round(100 / objWRes.Count);
                    Rec = (int)(100 / objWRes.Count);
                    for (int idx = 0; idx < objWRes.Count; idx++)
                    {
                        HtmlTableCell tdImageCell = new HtmlTableCell();
                        HyperLink imgLogo = new HyperLink();
                        imgLogo.ID = "id" + idx.ToString();
                        imgLogo.ImageUrl = "~/handler/showImage.ashx?ID=" + objWRes[idx].DocID.ToString();
                        imgLogo.ToolTip = objWRes[idx].LogoUrlName.ToString();
                        imgLogo.NavigateUrl = objWRes[idx].LogoUrl.ToString();
                        imgLogo.Target = "_blank";
                        tdImageCell.Controls.Add(imgLogo);
                        trImageRow.Cells.Add(tdImageCell);
                        trImageRow.Cells[idx].VAlign = "middle";
                        trImageRow.Cells[idx].Width = Rec.ToString() + "%";
                        if (idx == objWRes.Count-1)
                            trImageRow.Cells[idx].Align = "right";
                        else
                        {
                            if (idx % 2 != 0 && idx != 0)
                              trImageRow.Cells[idx].Align = "center";
                            else
                              trImageRow.Cells[idx].Align = "left";

                        }
                    }
                    tLogo.Rows.Add(trImageRow);
                }
            }
        }