Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneInfo = ZoneDB.GetInfo(_zonecurrent);

            if (zoneInfo != null)
            {
                lnkZone.Text        = zoneInfo.Zone_Name;
                lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zonecurrent);
                var listStyle = zoneInfo.Zone_ContentListingDisplay;
                if (listStyle == "one")
                {
                    SpecialInZone1.Visible = false;
                    PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/NewsFocus.ascx"));
                }
                else
                {
                    PlaceHolder1.Controls.Add(Page.LoadControl("Project/TuyenSinhList.ascx"));
                }
            }
            else
            {
                Response.Redirect("/");
            }
        }
Beispiel #2
0
        protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var curData = (DataRowView)e.Item.DataItem;

                var lnkRegister = (HyperLink)e.Item.FindControl("lnkRegister");
                var litName     = (Literal)e.Item.FindControl("litName");
                var litContent  = (Literal)e.Item.FindControl("litContent");
                var rptDocument = (Repeater)e.Item.FindControl("rptDocument");

                litName.Text    = curData["Content_Name"].ToString();
                litContent.Text = curData["Content_Body"].ToString();

                lnkRegister.NavigateUrl = UrlFilter.BuildUrlByZoneID(
                    ConvertUtility.ToInt32(
                        SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + AppEnv.GetLanguageFrontEnd()))) +
                                          "&lh=" + curData["Distribution_ZoneID"];

                var strSQL = "SELECT CMS_ContentDownload.*, CMS_Download.* FROM CMS_ContentDownload ";
                strSQL += " INNER JOIN CMS_Download ON CMS_ContentDownload.Download_ID = CMS_Download.Download_ID ";
                strSQL += " WHERE 1=1 ";
                strSQL += " AND CMS_Download.Download_Visible=1 ";
                strSQL += " AND CMS_ContentDownload.Content_ID=" + curData["Content_ID"] + " ";

                strSQL += " ORDER BY CMS_ContentDownload.Priority ASC ";

                var source = DataHelper.GetDataFromTable(strSQL);

                rptDocument.DataSource = source;
                rptDocument.DataBind();
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string boxtname = "tuyensinhhome";
            var          zoneid   = ConvertUtility.ToInt32(ZoneDB.GetIDByFriendlyUrl(boxtname));

            if (zoneid <= 0)
            {
                return;
            }
            var info = ZoneDB.GetInfo(zoneid);

            if (info == null)
            {
                return;
            }

            lnkOther.NavigateUrl = UrlFilter.BuildUrlByZoneID(info.Zone_ParentID);

            string lang = AppEnv.GetLanguageFrontEnd();

            var zoneClassRegister = ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + lang));

            lnkRegister.NavigateUrl = UrlFilter.BuildUrlByZoneID(zoneClassRegister);

            var dtData = DistributionDB.GetContentByZoneIDselfAndNumberRecord(zoneid, 10);

            if (dtData.Rows.Count <= 0)
            {
                return;
            }

            rptData.DataSource = dtData;
            rptData.DataBind();
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang:&nbsp;";
                }
                else
                {
                    CollectionPager1.LabelText = "Page:&nbsp;";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
Beispiel #5
0
        protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                DataRowView curData = (DataRowView)e.Item.DataItem;
                HyperLink   lnkZone = (HyperLink)e.Item.FindControl("lnkZone");

                if (curData["Zone_ID"].ToString() == zoneCurrent.ToString())
                {
                    lnkZone.CssClass = "selected";
                }

                if (zoneCurrent == 0)
                {
                    if (curData["Zone_ID"].ToString() == zoneHome.ToString())
                    {
                        lnkZone.CssClass = "selected";
                    }
                }

                if (curData["Zone_RealUrl"].ToString().Length > 0)
                {
                    lnkZone.NavigateUrl = curData["Zone_RealUrl"].ToString();
                }
                else
                {
                    lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(ConvertUtility.ToInt32(curData["Zone_ID"]));
                }

                lnkZone.Text = curData["Zone_Name"].ToString();
            }
        }
Beispiel #6
0
        protected void butSearch_Click(object sender, EventArgs e)
        {
            var dotuoi = dropFilterDoTuoi.SelectedValue;
            var monhoc = dropFilterMonHoc.SelectedValue;
            var coso   = dropFilterCoso.SelectedValue;

            Response.Redirect(UrlFilter.BuildUrlByZoneID(ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + AppEnv.GetLanguageFrontEnd()))) + "&dt=" + dotuoi + "&mh=" + monhoc + "&cs=" + coso, true);
        }
Beispiel #7
0
        protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var curData = (DataRowView)e.Item.DataItem;

                var lnkName     = (HyperLink)e.Item.FindControl("lnkName");
                var litTeaser   = (Literal)e.Item.FindControl("litTeaser");
                var litDatetime = (Literal)e.Item.FindControl("litDatetime");
                //var lnkAvatar = (HyperLink)e.Item.FindControl("lnkAvatar");
                var imgAvatar   = (Image)e.Item.FindControl("imgAvatar");
                var divRight    = (HtmlGenericControl)e.Item.FindControl("divRight");
                var lnkRegister = (HyperLink)e.Item.FindControl("lnkRegister");

                lnkName.Text        = curData["Content_Name"].ToString();
                lnkName.NavigateUrl = UrlFilter.BuildUrlByItemID(ConvertUtility.ToInt32(curData["Distribution_ID"]));

                litTeaser.Text = curData["Content_Teaser"].ToString();

                var khInfo = KhoahocDB.GetInfo(ConvertUtility.ToInt32(curData["Content_ID"]));

                if (khInfo != null)
                {
                    litDatetime.Text        = khInfo.Khoahoc_KhaiGiang;
                    lnkRegister.NavigateUrl =
                        UrlFilter.BuildUrlByZoneID(
                            ConvertUtility.ToInt32(
                                SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + AppEnv.GetLanguageFrontEnd()))) +
                        "&khoahocid=" + khInfo.Khoahoc_ID;
                }


                //var newstime = ConvertUtility.ToDateTime(curData["Distribution_CreateDate"]);
                //litDatetime.Text = newstime.Day + " tháng " + newstime.Month + " năm" + newstime.Year;

                var coverInfo = ImageDB.GetCover(ConvertUtility.ToInt32(curData["Content_ID"]));
                if (coverInfo != null)
                {
                    string avatar = coverInfo.Image_File;
                    if (avatar.Length > 0)
                    {
                        imgAvatar.ImageUrl = UrlFilter.BuildImageUrl(avatar, 120, 0);
                    }
                    else
                    {
                        imgAvatar.Visible = false;
                        divRight.Attributes.Add("style", "width: 100%;");
                    }
                }
                else
                {
                    imgAvatar.Visible = false;
                    divRight.Attributes.Add("style", "width: 100%");
                }
            }
        }
Beispiel #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneKhoahoc =
                ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneKhoaHoc + AppEnv.GetLanguageFrontEnd()));

            lnkZoneName.NavigateUrl = UrlFilter.BuildUrlByZoneID(zoneKhoahoc);

            rptData.DataSource = ZoneDB.GetByParentID(zoneKhoahoc);
            rptData.DataBind();
        }
Beispiel #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            _itemid = ConvertUtility.ToInt32(Request.QueryString["itemid"]);

            _distInfo = DistributionDB.GetInfo(_itemid);
            if (_distInfo == null)
            {
                Visible = false;
                return;
            }

            DistributionDB.UpdateView(_distInfo.Distribution_ID, 1);

            _contentId = _distInfo.Distribution_ContentID;

            var contentInfo = ContentDB.GetInfo(_contentId);

            lnkName.Text        = contentInfo.Content_Name;
            lnkName.NavigateUrl = UrlFilter.BuildUrlByItemID(_itemid);



            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var strSQL = "SELECT CMS_ContentVideo.*, CMS_Videos.* FROM CMS_ContentVideo ";

            strSQL += " INNER JOIN CMS_Videos ON CMS_ContentVideo.Video_ID = CMS_Videos.Video_ID ";
            strSQL += " WHERE 1=1 ";

            strSQL += " AND CMS_ContentVideo.Content_ID=" + _contentId + " ";
            strSQL += " AND CMS_Videos.Video_Visible=1 ";
            strSQL += " ORDER BY CMS_ContentVideo.Priority ASC ";

            var source = DataHelper.GetDataFromTable(strSQL);

            if (source.Rows.Count > 0)
            {
                rptData.DataSource = source;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneInfo = ZoneDB.GetInfo(_zonecurrent);

            if (zoneInfo != null)
            {
                lnkZone.Text        = zoneInfo.Zone_Name;
                lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zonecurrent);
            }
            else
            {
                Response.Redirect("/");
            }
        }
Beispiel #11
0
        protected void rptSub2_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                DataRowView curData = (DataRowView)e.Item.DataItem;
                HyperLink   lnkSub2 = (HyperLink)e.Item.FindControl("lnkSub2");
                //Repeater rptSub3 = (Repeater)e.Item.FindControl("rptSub3");

                if (curData["Zone_ID"].ToString() == zoneCurrent.ToString())
                {
                    lnkSub2.CssClass = "selected";
                }

                if (zoneCurrent == 0)
                {
                    if (curData["Zone_ID"].ToString() == zoneHome.ToString())
                    {
                        lnkSub2.CssClass = "selected";
                    }
                }

                lnkSub2.Text = curData["Zone_Name"].ToString();

                if (curData["Zone_RealUrl"].ToString().Length > 0)
                {
                    lnkSub2.NavigateUrl = curData["Zone_RealUrl"].ToString();
                }
                else
                {
                    lnkSub2.NavigateUrl = UrlFilter.BuildUrlByZoneID(ConvertUtility.ToInt32(curData["Zone_ID"]));
                }

                //DataTable dtSub = ZoneDB.GetByParentID(ConvertUtility.ToInt32(curData["Zone_ID"]));

                //if (dtSub.Rows.Count == 0)
                //{
                //    rptSub3.Visible = false;
                //}
                //else
                //{
                //    rptSub3.DataSource = dtSub;
                //    rptSub3.ItemDataBound += new RepeaterItemEventHandler(rptSub3_ItemDataBound);
                //    rptSub3.DataBind();
                //}
            }
        }
Beispiel #12
0
        protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                var curData   = (DataRowView)e.Item.DataItem;
                var lnkZone   = (HyperLink)e.Item.FindControl("lnkZone");
                var imgAvatar = (Image)e.Item.FindControl("imgAvatar");

                if (curData["Zone_ID"].ToString() == _zoneCurrent.ToString() || curData["Zone_ID"].ToString() == ZoneDB.GetParentID(_zoneCurrent).ToString() || curData["Zone_ID"].ToString() == ZoneDB.GetParentID(ZoneDB.GetParentID(_zoneCurrent)).ToString())
                {
                    lnkZone.CssClass = "selected";
                    imgAvatar.Attributes.Add("style", "position: relative; z-index: 100;");
                }

                if (_zoneCurrent == 0)
                {
                    if (curData["Zone_ID"].ToString() == _zoneHome.ToString())
                    {
                        lnkZone.CssClass = "selected";
                        imgAvatar.Attributes.Add("style", "position: relative; z-index: 100;");
                    }
                }

                if (curData["Zone_RealUrl"].ToString().Length > 0)
                {
                    lnkZone.NavigateUrl = curData["Zone_RealUrl"].ToString();
                }
                else
                {
                    lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(ConvertUtility.ToInt32(curData["Zone_ID"]));
                }

                //lnkZone.Text = curData["Zone_Name"].ToString();

                var avatar = curData["Zone_Avatar"].ToString().Trim();
                if (avatar.Length > 0)
                {
                    imgAvatar.ImageUrl = avatar;
                }
                else
                {
                    imgAvatar.Visible = false;
                    lnkZone.Text      = curData["Zone_Name"].ToString();
                }
            }
        }
Beispiel #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string boxtname = "homebottomright";
            var          zoneid   = ConvertUtility.ToInt32(ZoneDB.GetIDByFriendlyUrl(boxtname));

            if (zoneid <= 0)
            {
                return;
            }
            var info = ZoneDB.GetInfo(zoneid);

            if (info == null)
            {
                return;
            }

            var realUrl = (info.Zone_RealUrl);

            if (realUrl.Length > 0)
            {
                lnkOther.NavigateUrl = realUrl;
            }
            else
            {
                lnkOther.NavigateUrl = UrlFilter.BuildUrlByZoneID(info.Zone_ParentID);
            }

            var dtSpecial = DistributionDB.GetContentByZoneIDAndRank(zoneid, 1, (int)AppEnv.CMSContentRank.Special);

            if (dtSpecial.Rows.Count > 0)
            {
                rptSpecial.DataSource = dtSpecial;
                rptSpecial.DataBind();
            }

            var dtData = DistributionDB.GetContentByZoneIDAndRank(zoneid, 3, (int)AppEnv.CMSContentRank.Default);

            if (dtData.Rows.Count <= 0)
            {
                return;
            }

            rptData.DataSource = dtData;
            rptData.DataBind();
        }
Beispiel #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent        = ZoneUtility.GetZoneCurrent();
            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zonecurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zonecurrent);

            var source = ZoneDB.GetByParentID(_zonecurrent);

            if (source.Rows.Count > 0)
            {
                Subcategory_Full_2level1.Visible   = true;
                KhoaHoc_List1.Visible              = false;
                Subcategory_2level_Center1.Visible = true;
            }
            else
            {
                Subcategory_Full_2level1.Visible   = false;
                KhoaHoc_List1.Visible              = true;
                Subcategory_2level_Center1.Visible = false;
            }
        }
Beispiel #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string boxtname = "homebottomcenter";
            var          zoneid   = ConvertUtility.ToInt32(ZoneDB.GetIDByFriendlyUrl(boxtname));

            if (zoneid <= 0)
            {
                return;
            }
            var info = ZoneDB.GetInfo(zoneid);

            if (info == null)
            {
                return;
            }

            var avatar = info.Zone_Avatar;

            if (avatar.Length > 0)
            {
                imgAvatar.ImageUrl = UrlFilter.BuildImageUrl(avatar, 235, 0);
            }
            else
            {
                imgAvatar.Visible = false;
            }

            lnkName.Text = info.Zone_Name;

            var realUrl = info.Zone_RealUrl;

            if (realUrl.Length > 0)
            {
                lnkOther.NavigateUrl = lnkName.NavigateUrl = realUrl;
            }
            else
            {
                lnkOther.NavigateUrl = lnkName.NavigateUrl = UrlFilter.BuildUrlByZoneID(info.Zone_ParentID);
            }
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string boxtname = "homebottomleft";
            var          zoneid   = ConvertUtility.ToInt32(ZoneDB.GetIDByFriendlyUrl(boxtname));

            if (zoneid <= 0)
            {
                return;
            }
            var info = ZoneDB.GetInfo(zoneid);

            if (info == null)
            {
                return;
            }

            lnkZoneName.Text = info.Zone_Name;

            var realUrl = (info.Zone_RealUrl);

            if (realUrl.Length > 0)
            {
                lnkMore.NavigateUrl = lnkZoneName.NavigateUrl = realUrl;
            }
            else
            {
                lnkMore.NavigateUrl = lnkZoneName.NavigateUrl = UrlFilter.BuildUrlByZoneID(info.Zone_ParentID);
            }

            var dtData = DistributionDB.GetContentByZoneIDselfAndNumberRecord(zoneid, 2);

            if (dtData.Rows.Count <= 0)
            {
                return;
            }

            rptData.DataSource = dtData;
            rptData.DataBind();
        }
        protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                var curData        = (DataRowView)e.Item.DataItem;
                var lnkName        = (HyperLink)e.Item.FindControl("lnkName");
                var litDescription = (Literal)e.Item.FindControl("litDescription");
                var imgAvatar      = (Image)e.Item.FindControl("imgAvatar");

                if (curData["Zone_ID"].ToString() == _zonecurrent.ToString())
                {
                    lnkName.Font.Underline = true;
                }

                litDescription.Text = curData["Zone_Description"].ToString();

                var avatar = curData["Zone_Avatar"].ToString();
                if (avatar.Length > 0)
                {
                    imgAvatar.ImageUrl = UrlFilter.BuildImageUrl(avatar, 120, 0);
                }
                else
                {
                    imgAvatar.Visible = false;
                }

                lnkName.Text = curData["Zone_Name"].ToString();
                if (curData["Zone_RealUrl"].ToString().Length > 0)
                {
                    lnkName.NavigateUrl = curData["Zone_RealUrl"].ToString();
                }
                else
                {
                    lnkName.NavigateUrl = UrlFilter.BuildUrlByZoneID(ConvertUtility.ToInt32(curData["Zone_ID"]));
                }
            }
        }
Beispiel #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string boxtname = "subvideo";
            var          zoneid   = ConvertUtility.ToInt32(ZoneDB.GetIDByFriendlyUrl(boxtname));

            if (zoneid <= 0)
            {
                return;
            }
            var info = ZoneDB.GetInfo(zoneid);

            if (info == null)
            {
                return;
            }

            lnkName.Text = info.Zone_Name;

            var realUrl = (info.Zone_RealUrl);

            if (realUrl.Length > 0)
            {
                lnkName.NavigateUrl = realUrl;
            }
            else
            {
                lnkName.NavigateUrl = UrlFilter.BuildUrlByZoneID(info.Zone_ParentID);
            }

            var dtSpecial = DistributionDB.GetContentRandomByZoneIDselfAndNumberRecord(zoneid, 1);

            if (dtSpecial.Rows.Count > 0)
            {
                rptSpecial.DataSource = dtSpecial;
                rptSpecial.DataBind();
            }
        }
Beispiel #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            _itemid = ConvertUtility.ToInt32(Request.QueryString["itemid"]);

            _distInfo = DistributionDB.GetInfo(_itemid);
            if (_distInfo == null)
            {
                Visible = false;
                return;
            }

            DistributionDB.UpdateView(_distInfo.Distribution_ID, 1);

            _contentId = _distInfo.Distribution_ContentID;

            var contentInfo = ContentDB.GetInfo(_contentId);

            lnkName.Text        = contentInfo.Content_Name;
            lnkName.NavigateUrl = UrlFilter.BuildUrlByItemID(_itemid);



            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var strSQL = "SELECT CMS_ContentImage.*, CMS_Images.* FROM CMS_ContentImage ";

            strSQL += " INNER JOIN CMS_Images ON CMS_ContentImage.Image_ID = CMS_Images.Image_ID ";
            strSQL += " WHERE 1=1 ";

            strSQL += " AND CMS_ContentImage.Content_ID=" + _contentId + " ";
            strSQL += " AND CMS_Images.Image_Visible=1 ";
            strSQL += " ORDER BY CMS_ContentImage.Priority ASC ";

            var source = DataHelper.GetDataFromTable(strSQL);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang:&nbsp;";
                }
                else
                {
                    CollectionPager1.LabelText = "Page:&nbsp;";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _distInfo = DistributionDB.GetInfo(ConvertUtility.ToInt32(Request.QueryString["itemid"]));
            if (_distInfo == null)
            {
                Visible = false;
                return;
            }

            DistributionDB.UpdateView(_distInfo.Distribution_ID, 1);

            var contentInfo = ContentDB.GetInfo(_distInfo.Distribution_ContentID);

            litName.Text = contentInfo.Content_Name;

            if (_distInfo.Distribution_DisableTeaser)
            {
                pnTeaser.Visible = false;
            }
            else
            {
                if (contentInfo.Content_Teaser.Length > 0)
                {
                    litTeaser.Text = contentInfo.Content_Teaser;
                }
                else
                {
                    litTeaser.Visible = false;
                }

                if (_distInfo.Distribution_DisableAvatar)
                {
                    imgAvatar.Visible = false;
                }
                else
                {
                    var coverInfo = ImageDB.GetCover(ConvertUtility.ToInt32(contentInfo.Content_ID));
                    if (coverInfo != null)
                    {
                        string avatar = coverInfo.Image_File;
                        if (avatar.Length > 0)
                        {
                            imgAvatar.ImageUrl    = UrlFilter.BuildImageUrl(avatar, 150, 0);
                            lnkAvatar.NavigateUrl = MultimediaUtility.GetOriginalImage(avatar);

                            lnkAvatar.Attributes.Add("rel", "prettyPhoto");
                            lnkAvatar.ToolTip = coverInfo.Image_Description;
                        }
                        else
                        {
                            imgAvatar.Visible = false;
                        }
                    }
                    else
                    {
                        imgAvatar.Visible = false;
                    }
                }
            }

            litContent.Text = contentInfo.Content_Body;

            //litDatetime.Text = ConvertUtility.ToDateTime(distInfo.Distribution_CreateDate).ToString("dd/MM/yyyy");



            //DataTable dtNews = DistributionDB.GetNewsForCurrent(distInfo.Distribution_ID, 5);
            //if (dtNews.Rows.Count == 0)
            //{
            //    pnNew.Visible = false;
            //}
            //else
            //{
            //    rptNew.DataSource = dtNews;
            //    rptNew.DataBind();
            //}

            var khInfo = KhoahocDB.GetInfo(ConvertUtility.ToInt32(contentInfo.Content_ID));

            if (khInfo != null)
            {
                litDatetime.Text        = khInfo.Khoahoc_KhaiGiang;
                lnkRegister.NavigateUrl =
                    UrlFilter.BuildUrlByZoneID(
                        ConvertUtility.ToInt32(
                            SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + AppEnv.GetLanguageFrontEnd()))) +
                    "&khoahocid=" + khInfo.Khoahoc_ID;
            }
        }