예제 #1
0
        private string GetRecommend()
        {
            string    sDiv        = string.Empty;
            int       iDescLength = 108;
            DataTable dt          = new DAL.CategoryDAL().GetRecommendZT(sCategoryPath, iYIndex + 1);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataTable dtArticle = new DAL.Article().GetArticleList(dt.Rows[i]["CategoryGUID"].ToString(), false, 4);
                string    sTitle    = dt.Rows[i]["CategoryName"].ToString();
                string    sContent  = new DAL.CategoryDAL().GetZTSummaryFromTitle(sZTSummaryAlias, sTitle);


                sContent = DAL.Article.RemoveHtml(sContent);
                string sDesc = sContent;
                if (sContent.Length > iDescLength)
                {
                    sContent = sContent.Substring(0, iDescLength);
                    sDesc    = sDesc.Remove(0, iDescLength);
                    if (sDesc.StartsWith(">"))
                    {
                        sDesc.Remove(0, 1);
                    }
                }
                else
                {
                    sDesc = string.Empty;
                }

                sDiv += "<div class=\"SpecialAttentionLeftCommendItem\">";
                sDiv += "<div class=\"SpecialAttentionNewLeft\">";
                sDiv += string.Format("<a href=\"SpecialAttentionLite.aspx?ID={0}&Title={1}\" title=\"{2}\" target=\"_blank\">", dt.Rows[i]["CategoryGUID"].ToString(), HttpUtility.UrlEncode(sTitle), sTitle);
                sDiv += "<img width=\"158\" height=\"118\" src=\"ShowZTImage.aspx?Title=" + HttpUtility.UrlEncode(sTitle) + "\" alt=\"\" border=\"0\" /></a>";
                sDiv += "</div>";
                sDiv += "<div class=\"SpecialAttentionNewRightL\">";
                sDiv += "<div class=\"SpecialAttentionNewTitleL\">";
                sDiv += string.Format("<a href=\"SpecialAttentionLite.aspx?ID={0}&Title={1}\" target=\"_blank\">{2}</a></div>", dt.Rows[i]["CategoryGUID"].ToString(), HttpUtility.UrlEncode(sTitle), sTitle);
                sDiv += string.Format("<div class=\"ZTSummary\" data-tooltip=\"{0}\" data-placement=\"bottom\">", string.IsNullOrEmpty(sDesc) ? string.Empty : string.Format("<div class='divTooltip'>{0}</div>", sDesc));
                sDiv += string.Format("<a href=\"SpecialAttentionLite.aspx?ID={0}&Title={1}\" target=\"_blank\">", dt.Rows[i]["CategoryGUID"].ToString(), HttpUtility.UrlEncode(sTitle)) + sContent + "</a>";
                sDiv += "</div><table class=\"SpecialAttentionNewTableL\" style=\"table-layout:fixed;\"  width=\"465\">";
                if (dtArticle.Rows.Count > 0)
                {
                    for (int j = 0; j < dtArticle.Rows.Count; j++)
                    {
                        if (j % 2 == 0)
                        {
                            sDiv += "<tr>";
                        }
                        sDiv += "<td class=\"SpecialAttentionNewTableTitleL\" style=\"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\"  width=\"48%\">";
                        sDiv += string.Format("<a href=\"ShowVideo.aspx?ID={0}\" title=\"{1}\" target=\"_blank\">{1}</a></td>", dtArticle.Rows[j]["ArticleGUID"].ToString(), dtArticle.Rows[j]["Title"].ToString());
                        if (j % 2 == 1)
                        {
                            sDiv += "</tr>";
                        }
                    }
                }
                sDiv += "</table></div></div>";
            }
            return(sDiv);
        }
예제 #2
0
        // Map DAL.Article object to WebArticle object
        public static WebArticle MapArticle(DAL.Article article)
        {
            try
            {
                if (article == null)
                {
                    return(null);
                }

                WebArticle art = new WebArticle()
                {
                    Title       = article.Title,
                    Description = article.Description,
                    Url         = article.Url,
                    UrlToImage  = article.UrlToImage,
                    ID          = article.ID
                };
                return(art);
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Attempt to map DAL.Article " + article.ID + " to WebArticle failed: " + ex.Message);
                return(null);
            }
        }
예제 #3
0
        // 绑定技能、培训课件ListView(嵌套)
        protected void TabIndex1Box_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            Label     CategoryAliasLabel = (Label)e.Item.FindControl("SkillCategoryAlias");
            string    CategoryAlias      = CategoryAliasLabel.Text.ToString();
            DataTable ListDataTable      = new DataTable();
            string    CategoryGUID       = DataQuery.CategoryAliasToID(CategoryAlias);

            //ListDataTable = new DAL.Article().GetArticleListAll(CategoryGUID, false, "desc" , true, 16);  //ALL
            ListDataTable = new DAL.Article().GetArticleList(CategoryGUID, false, 16);
            if (ListDataTable.Rows.Count > 0)
            {
                var ListInfo = from row in ListDataTable.AsEnumerable()
                               select row;
                var       LeftInfoSrc   = ListInfo.Take(8);
                var       RightInfoSrc  = ListInfo.Skip(8).Take(8);
                DataTable LeftInfo      = LeftInfoSrc.CopyToDataTable <DataRow>();
                ListView  SkillListLeft = (ListView)e.Item.FindControl("TabUlLeft");
                SkillListLeft.DataSource = LeftInfo;
                SkillListLeft.DataBind();
                if (ListDataTable.Rows.Count > 8)
                {
                    DataTable RightInfo      = RightInfoSrc.CopyToDataTable <DataRow>();
                    ListView  SkillListRight = (ListView)e.Item.FindControl("TabUlRight");
                    SkillListRight.DataSource = RightInfo;
                    SkillListRight.DataBind();
                }
            }
        }
예제 #4
0
        // _修改:课件 前N条 从栏目别名
        public static DataTable GetArticleListFromAlias(string CategoryAlias, bool NeedSummary, string sSort, int iStartRow, int iEndRow)
        {
            string    sCategoryGUID = CategoryAliasToID(CategoryAlias);
            DataTable dt            = new DAL.Article().GetArticleList(sCategoryGUID, NeedSummary, sSort, false);

            if (dt.Rows.Count > 0)
            {
                if (iEndRow != 0)
                {
                    DataTable dtRS = dt.Clone();
                    if (dt.Rows.Count <= iEndRow)
                    {
                        iEndRow = dt.Rows.Count;
                    }
                    for (int i = iStartRow; i < iEndRow;)
                    {
                        dtRS.ImportRow(dt.Rows[i]);
                        i++;
                    }
                    return(dtRS);
                }
                else
                {
                    return(dt);
                }
            }
            else
            {
                return(null);
            }
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Login OP
            string sTokenEx = "";

            if (this.Context.Request.Cookies["USSUserID"] == null)
            {
                this.Context.Response.Redirect("index.aspx?showlogin=1");
            }
            else
            {
                sTokenEx = this.Context.Request.Cookies["USSToken"].Value + "@" + this.Context.Request.UserHostAddress;
                try
                {
                    DLLUserService.User USSUser = new DLLUserService.User();
                    USSUser.Authenticate(sTokenEx, 0);
                }
                catch (Exception ex)
                {
                    Context.Response.Redirect("index.aspx");
                }
            }
            //Login ED
            if (string.IsNullOrEmpty(Request.QueryString["ID"]))
            {
                return;
            }
            string sArticleGUID = Request.QueryString["ID"];
            string indexPath    = new DAL.Article().GetArticlePath(sArticleGUID);
            string strFilePath  = System.Configuration.ConfigurationManager.AppSettings["FileRootPath"];

            string[] pathList = strFilePath.Split('|');
            for (int i = 0; i < pathList.Length; i++)
            {
                if (string.IsNullOrEmpty(pathList[i]))
                {
                    continue;
                }
                string sPath = pathList[i];
                if (!sPath.EndsWith("\\"))
                {
                    sPath = sPath + "\\";
                }
                if (File.Exists(sPath.Split(',')[1] + indexPath))
                {
                    indexPath = sPath.Split(',')[0] + "/" + indexPath;
                    break;
                }
            }
            if (string.IsNullOrEmpty(indexPath))
            {
                vframe.InnerHtml = "很抱歉,视频文件不存在!";
            }
            else
            {
                this.VideoShowFrame.Attributes["src"] = indexPath;
                //Response.Redirect(indexPath);
            }
        }
예제 #6
0
        protected void Page_Init(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";
            //热门关键词
            string sHotKey_Alias = ConfigurationManager.AppSettings["HotKeyAlias"];

            divHotKey.InnerHtml = new DAL.CategoryDAL().GetHotKeyLite(sHotKey_Alias);

            //导航
            string    VoidGuid     = ConfigurationManager.AppSettings["Void_Guid"];
            string    VersionMark  = ConfigurationManager.AppSettings["Version_Mark"];
            DataTable NaviListData = DataQuery.GetNaviCategories(VoidGuid, "10", VersionMark);
            //TopNaviList.DataSource = NaviListData;
            //TopNaviList.DataBind();

            string ChannelAlias = null;
            string ChannelTitle = null;

            try
            {
                ChannelAlias = Request.QueryString["alias"].ToString();
            }
            catch
            {
                ChannelAlias = "gxchannel1";
            }
            ChannelTitle = DataQuery.GetNameByCategoryAlias(ChannelAlias);

            // 导视
            String    GuideAlias   = DataQuery.GetChannelAliasByName(ChannelAlias, "导视");
            String    GuideGuid    = DataQuery.CategoryAliasToID(GuideAlias);
            DataTable GuideCourses = new DAL.Article().GetArticleList(GuideGuid, true, 5);

            //Remove Html
            SlideShowPic.DataSource = GuideCourses;
            SlideShowPic.DataBind();
            SlideShowText.DataSource = GuideCourses;
            SlideShowText.DataBind();
            // 图片
            Level2Title.ImageUrl = "../images/" + ChannelAlias + ".png";
            //预告
            String TrailerAlias       = ConfigurationManager.AppSettings["ChannelTrailer"];
            string EnCodeChannelTitle = HttpUtility.UrlEncode(ChannelTitle, Encoding.GetEncoding("utf-8"));

            PreviewPic.ImageUrl = "../ShowBytePic.aspx?Title=" + EnCodeChannelTitle + "&Alias=" + TrailerAlias;
            String TrailerText = DataQuery.GetTrailerText(TrailerAlias, ChannelTitle);

            if (TrailerText != null)
            {
                TrailerText = TrailerText.Replace(";", ";");
                string[] TrailerInfo = TrailerText.Split(';');
                PreviewTitle.Text          = DataProcessing.SubstringText(TrailerInfo[0], 10);
                PreviewTitle.ToolTip       = TrailerInfo[0].ToString();
                PreviewSpeaker.Text        = TrailerInfo[1];
                PreviewSpeakerInfo.Text    = DataProcessing.SubstringText(TrailerInfo[2], 10);
                PreviewSpeakerInfo.ToolTip = TrailerInfo[2].ToString();
            }
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";
            string ChannelAlias = Request.QueryString["alias"].ToString();
            string ChannelTitle = DataQuery.GetNameByCategoryAlias(ChannelAlias);
            // 推荐
            String    CommendAlias   = DataQuery.GetChannelAliasByName(ChannelAlias, "推荐");
            string    CommendGuid    = DataQuery.CategoryAliasToID(CommendAlias);
            DataTable CommendCourses = new DAL.Article().GetArticleList(CommendGuid, false, 12);

            CommendList.DataSource = CommendCourses;
            CommendList.DataBind();
            //排行
            //DataTable HotListDataSrc = DataQuery.GetHotList();
            //HotList.DataSource = HotListDataSrc;
            //HotList.DataBind();

            // 主列表
            String    CategoryLv2Alias = DataQuery.GetChannelAliasByName(ChannelAlias, "栏目");
            string    Version          = ConfigurationManager.AppSettings["Version_Mark"];
            DataTable GetSubCategories = DataQuery.GetSubCategoriesApart(CategoryLv2Alias, Version);

            Level2MainRight.DataSource = GetSubCategories;
            Level2MainRight.DataBind();
            Image Level2MainBanner = (Image)FindControl <Image>("Level2MainBanner");

            Level2MainBanner.ImageUrl = "images/AD" + ChannelAlias + ".gif";

            //LeftPic
            LeftPicAliasText          = ConfigurationManager.AppSettings["ChannelPicCategory"];
            LeftPicLv2AliasText       = DataQuery.GetChannelAliasByName(LeftPicAliasText, ChannelTitle);
            Level2LeftPicBot.ImageUrl = "ShowBytePic.aspx?Title=底部图片&Alias=" + LeftPicLv2AliasText;
            int       LeftPicCount            = (GetSubCategories.Rows.Count - 6) / 2;
            String    LeftPicAlias            = DataQuery.GetChannelAliasByName(ChannelAlias, "图片专题");
            DataTable LeftPicGetSubCategories = DataQuery.GetSubCategories(LeftPicAlias, LeftPicCount.ToString());

            LeftPicList.DataSource = LeftPicGetSubCategories;
            LeftPicList.DataBind();
            //Level2LeftPic1.ImageUrl = "images/" + ChannelAlias + "_1.jpg";
            //int SubCategoriesCount = GetSubCategories.Rows.Count;
            //if (SubCategoriesCount >= 10)
            //{
            //    Level2LeftPic2.Visible = true;
            //    Level2LeftPic2.ImageUrl = "images/" + ChannelAlias + "_2.jpg";
            //}
            //if (SubCategoriesCount >= 12)
            //{
            //    Level2LeftPic3.Visible = true;
            //    Level2LeftPic3.ImageUrl = "images/" + ChannelAlias + "_3.jpg";
            //}
            //if (SubCategoriesCount >= 14)
            //{
            //    Level2LeftPic4.Visible = true;
            //    Level2LeftPic4.ImageUrl = "images/" + ChannelAlias + "_4.jpg";
            //}
        }
예제 #8
0
        public HomeChannelListBS(string Alias, int PicNumber)
        {
            string    guid      = DataQuery.CategoryAliasToID(Alias);
            DataTable ListTable = new DAL.Article().GetArticleList(guid, false, PicNumber);

            if (ListTable.Rows.Count > 0)
            {
                var ListInfo = from row in ListTable.AsEnumerable()
                               select row;
                var PicInfoSrc = ListInfo.Take(PicNumber);
                PicInfo = PicInfoSrc.CopyToDataTable <DataRow>();
            }
        }
예제 #9
0
        protected void TrainList_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            Label     CategoryAliasLabel = (Label)e.Item.FindControl("TrainCategoryAlias");
            string    CategoryAlias      = CategoryAliasLabel.Text.ToString();
            DataTable ListDataTable      = new DataTable();
            string    CategoryGUID       = DataQuery.CategoryAliasToID(CategoryAlias);

            ListDataTable = new DAL.Article().GetArticleList(CategoryGUID, false, 4);
            ListView SkillListCourse = (ListView)e.Item.FindControl("TrainListCourse");

            SkillListCourse.DataSource = ListDataTable;
            SkillListCourse.DataBind();
        }
예제 #10
0
        private string GetLastNew()
        {
            int       iDescLength = 110;
            DataTable dt          = new DAL.CategoryDAL().GetLastNewZT(sCategoryPath, iYIndex + 1);

            if (dt == null || dt.Rows.Count == 0)
            {
                return(string.Empty);
            }
            DataTable dtArticle = new DAL.Article().GetArticleList(dt.Rows[0]["CategoryGUID"].ToString(), false, 3);
            string    sTitle    = dt.Rows[0]["CategoryName"].ToString();
            string    sContent  = new DAL.CategoryDAL().GetZTSummaryFromTitle(sZTSummaryAlias, sTitle);


            sContent = DAL.Article.RemoveHtml(sContent);
            string sDesc = sContent;

            if (sContent.Length > iDescLength)
            {
                sContent = sContent.Replace(" ", "");//*CC*
                sContent = sContent.Substring(0, iDescLength);
                sDesc    = sDesc.Remove(0, iDescLength);
                if (sDesc.StartsWith(">"))
                {
                    sDesc.Remove(0, 1);
                }
            }

            string sDiv = "<div class=\"SpecialAttentionNewLeft\">";

            sDiv += string.Format("<a href=\"SpecialAttentionLite.aspx?ID={0}&Title={1}\" title=\"{2}\" target=\"_blank\">", dt.Rows[0]["CategoryGUID"].ToString(), HttpUtility.UrlEncode(sTitle), sTitle);
            sDiv += "<img width=\"276\" height=\"195\" src=\"ShowZTImage.aspx?Title=" + HttpUtility.UrlEncode(sTitle) + "\" alt=\"\" border=\"0\" /></a>";
            sDiv += "</div><div class=\"SpecialAttentionNewRight\"><div class=\"SpecialAttentionNewTitle\">";
            sDiv += string.Format("<a href=\"SpecialAttentionLite.aspx?ID={0}&Title={1}\" target=\"_blank\">{2}</a>", dt.Rows[0]["CategoryGUID"].ToString(), HttpUtility.UrlEncode(sTitle), DataProcessing.SubstringText(sTitle, 19)); //*CC*
            sDiv += "</div>";
            sDiv += string.Format("<div class=\"ZTSummary\" data-tooltip=\"{0}\" data-placement=\"bottom\">", string.IsNullOrEmpty(sDesc) ? string.Empty : string.Format("<div class='divTooltip'>{0}</div>", sDesc));
            sDiv += string.Format("<a href=\"SpecialAttentionLite.aspx?ID={0}&Title={1}\" target=\"_blank\">", dt.Rows[0]["CategoryGUID"].ToString(), HttpUtility.UrlEncode(sTitle)) + sContent + "</a>";
            sDiv += "</div><table class=\"SpecialAttentionNewTable\" style=\"table-layout:fixed;\" width=\"355\">";
            if (dtArticle.Rows.Count > 0)
            {
                for (int i = 0; i < dtArticle.Rows.Count; i++)
                {
                    sDiv += "<tr><td class=\"SpecialAttentionNewTableTitle SpecialAttentionNewTableTitleZTTop\" style=\"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\">";
                    sDiv += string.Format("<a href=\"ShowVideo.aspx?ID={0}\" title=\"{1}\" target=\"_blank\">{2}</a></td>", dtArticle.Rows[i]["ArticleGUID"].ToString(), dtArticle.Rows[i]["Title"].ToString(), DataProcessing.SubstringText(dtArticle.Rows[i]["Title"].ToString(), 18));//*CC*
                    sDiv += "<td align=\"right\">" + DateTime.Parse(dtArticle.Rows[i]["CreateTime"].ToString()).ToString("yyyy-MM-dd") + "</td></tr>";
                }
            }
            sDiv += "</table></div>";
            return(sDiv);
        }
예제 #11
0
        // _修改:课件 从栏目别名
        public static DataTable GetArticleListFromAlias(string CategoryAlias, bool NeedSummary, string sSort)
        {
            string    sCategoryGUID = CategoryAliasToID(CategoryAlias);
            DataTable dt            = new DAL.Article().GetArticleList(sCategoryGUID, NeedSummary, sSort, false);

            if (dt.Rows.Count > 0)
            {
                return(dt);
            }
            else
            {
                return(null);
            }
        }
예제 #12
0
        private string GetAreaJson(string sLikeWords)
        {
            string sStr = string.Empty;

            try
            {
                DataTable dt = new DAL.Article().GetList("Area", string.Format("Area<>'' {0}", string.IsNullOrEmpty(sLikeWords) ? string.Empty : string.Format(" and Area like '%{0}%' order by Area", sLikeWords)));

                foreach (DataRow dr in dt.Rows)
                {
                    sStr += ",{" + string.Format("Area:\"{0}\"", dr["Area"]) + "}";
                }
            }
            catch { sStr = string.Empty; }
            return(string.Format("[{0}]", string.IsNullOrEmpty(sStr) ? string.Empty : sStr.Substring(1)));
        }
예제 #13
0
        public string GetUrl(string sArticleGUID, out string PicPath)
        {
            string indexPath = new DAL.Article().GetArticlePath(sArticleGUID);
            string CourseID  = indexPath.Split('/')[0];

            string[] pathList = { "http://vodedu.cei.com.cn//ccmfile3/", "http://vodedu.cei.com.cn//ccmfile2/", "http://vodedu.cei.com.cn//ccmfile/" };
            PicPath = "";
            for (int i = 0; i < pathList.Length; i++)
            {
                if (CheckUri(pathList[i] + indexPath) == true)
                {
                    indexPath = pathList[i] + indexPath;
                    PicPath   = pathList[i] + CourseID + "/355x235.png";
                    break;
                }
            }
            return(indexPath);
        }
예제 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";
            string ChannelAlias = ConfigurationManager.AppSettings["ChannelFame"];
            string ChannelTitle = DataQuery.GetNameByCategoryAlias(ChannelAlias);
            //LeftList1
            string Lv2FameLeftListAlias = DataQuery.GetChannelAliasByName(ChannelAlias, "名家谈时事");

            Lv2FameLeftLink1.NavigateUrl = "Level3Fame.aspx?alias=" + Lv2FameLeftListAlias + "&IsChild=1";
            string    Lv2FameLeftListGuid     = DataQuery.CategoryAliasToID(Lv2FameLeftListAlias);
            DataTable Lv2FameLeftList1Courses = new DAL.Article().GetArticleList(Lv2FameLeftListGuid, false, 3);

            Lv2FameLeftList1.DataSource = Lv2FameLeftList1Courses;
            Lv2FameLeftList1.DataBind();
            //LeftList2
            Lv2FameLeftListAlias         = DataQuery.GetChannelAliasByName(ChannelAlias, "名家谈管理");
            Lv2FameLeftLink2.NavigateUrl = "Level3Fame.aspx?alias=" + Lv2FameLeftListAlias + "&IsChild=1";
            string    Lv2FameLeftListGuid2    = DataQuery.CategoryAliasToID(Lv2FameLeftListAlias);
            DataTable Lv2FameLeftList2Courses = new DAL.Article().GetArticleList(Lv2FameLeftListGuid2, false, 3);

            Lv2FameLeftList2.DataSource = Lv2FameLeftList2Courses;
            Lv2FameLeftList2.DataBind();
            //排行
            //DataTable HotListDataSrc = DataQuery.GetHotList();
            //HotList.DataSource = HotListDataSrc;
            //HotList.DataBind();
            //MidList
            string Lv2FameMidListAlias = DataQuery.GetChannelAliasByName(ChannelAlias, "名师推荐");

            Lv2FameMidLink.NavigateUrl = "Level3Fame.aspx?alias=" + Lv2FameLeftListAlias + "&IsChild=1";
            string    Lv2FameMidListGuid    = DataQuery.CategoryAliasToID(Lv2FameMidListAlias);
            DataTable Lv2FameMidListCourses = new DAL.Article().GetArticleList(Lv2FameMidListGuid, true, 5);

            Lv2FameMidList.DataSource = Lv2FameMidListCourses;
            Lv2FameMidList.DataBind();
            //RightList1
            string Lv2RightListAlias = DataQuery.GetChannelAliasByName(ChannelAlias, "专家名录");

            Lv2FameRightLink1.NavigateUrl = "Level3Fame.aspx?alias=" + Lv2RightListAlias + "&IsChild=0";
            DataTable Lv2RightListItems = DataQuery.GetSubCategories(Lv2RightListAlias, "48");

            Lv2FameRightList1.DataSource = Lv2RightListItems;
            Lv2FameRightList1.DataBind();
        }
예제 #15
0
        public CategoryLv2List(string Alias, int PicNumber, int TextNumber)
        {
            DataTable ListTable = new DataTable();
            string    Guid      = DataQuery.CategoryAliasToID(Alias);
            int       count     = PicNumber + TextNumber;

            ListTable = new DAL.Article().GetArticleList(Guid, false, count);
            if (ListTable.Rows.Count > 0)
            {
                var ListInfo = from row in ListTable.AsEnumerable()
                               select row;
                var PicInfoSrc = ListInfo.Take(PicNumber);
                PicInfo = PicInfoSrc.CopyToDataTable <DataRow>();
                if (TextNumber != 0)
                {
                    var TextInfoLSrc = ListInfo.Skip(PicNumber).Take(TextNumber);
                    TextInfo = TextInfoLSrc.CopyToDataTable <DataRow>();
                }
            }
        }
예제 #16
0
        public HomeChannelListB(string Alias, int PicNumber, int TextNumber)
        {
            Alias = DataQuery.GetChannelAliasByName(Alias, "栏目");
            DataTable ListTable = new DataTable();
            string    Guid      = DataQuery.CategoryAliasToID(Alias);

            ListTable = new DAL.Article().GetArticleList(Guid, false, 11);
            if (ListTable.Rows.Count > 0)
            {
                //PicInfo = from row in ListTable.AsEnumerable() where Convert.ToInt32(row["_RowNumber"]) > 0 && Convert.ToInt32(row["_RowNumber]"]) <= 5 select row;
                var ListInfo = from row in ListTable.AsEnumerable()
                               select row;
                var PicInfoSrc = ListInfo.Take(PicNumber);
                PicInfo = PicInfoSrc.CopyToDataTable <DataRow>();
                if (TextNumber != 0)
                {
                    var TextInfoLSrc = ListInfo.Skip(PicNumber).Take(TextNumber);
                    TextInfo = TextInfoLSrc.CopyToDataTable <DataRow>();
                }
            }
        }
예제 #17
0
        public HomeChannelListA(string Alias)
        {
            Alias        = DataQuery.GetChannelAliasByName(Alias, "栏目");
            SubSortTable = DataQuery.GetSubCategories(Alias, "4");
            DataTable ListTable = new DataTable();
            string    Guid      = DataQuery.CategoryAliasToID(Alias);

            //ListTable = DataQuery.GetArticleIndexList(Guid, "11", "desc");
            ListTable = new DAL.Article().GetArticleList(Guid, false, 11);
            if (ListTable.Rows.Count > 0)
            {
                //PicInfo = from row in ListTable.AsEnumerable() where Convert.ToInt32(row["_RowNumber"]) > 0 && Convert.ToInt32(row["_RowNumber]"]) <= 5 select row;
                var ListInfo = from row in ListTable.AsEnumerable()
                               select row;
                var PicInfoSrc   = ListInfo.Take(5);
                var TextInfoLSrc = ListInfo.Skip(5).Take(3);
                var TextInfoRSrc = ListInfo.Skip(8).Take(3);
                PicInfo   = PicInfoSrc.CopyToDataTable <DataRow>();
                TextInfoL = TextInfoLSrc.CopyToDataTable <DataRow>();
                TextInfoR = TextInfoRSrc.CopyToDataTable <DataRow>();
            }
        }
예제 #18
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");

            //Request
            StreamReader sr     = new StreamReader(HttpContext.Current.Request.InputStream);
            string       strReq = sr.ReadToEnd();

            //Test
            //JObject Req = new JObject(
            //          new JProperty("ChannelAlias", "gxchannel1")
            //         );
            //string strReq = Req.ToString();


            #region Level2FocusPic
            if (HttpContext.Current.Request["method"] == "level2focuspic")
            {
                string    PicPath      = "";
                JObject   o            = JObject.Parse(strReq);
                string    ChannelAlias = (string)o["ChannelAlias"];
                String    GuideAlias   = DataQuery.GetChannelAliasByName(ChannelAlias, "导视");
                String    GuideGuid    = DataQuery.CategoryAliasToID(GuideAlias);
                DataTable GuideCourses = new DAL.Article().GetArticleList(GuideGuid, true, 5);
                JObject   rss          = new JObject();
                rss = new JObject(
                    //new JProperty("method", "mytask")
                    );
                JObject JCourse =
                    new JObject(
                        new JProperty("Course",
                                      new JArray(
                                          from cc in GuideCourses.AsEnumerable()
                                          orderby cc["XIndexTime"] descending
                                          select new JObject(
                                              //new JProperty("CustomProjectId", oc.CustomProjectId),
                                              //new JProperty("CustomProjectNo", oc.No),
                                              //new JProperty("Title", oc.Title),
                                              //new JProperty("SendingDate", oc.SendingDate.ToString("D")),
                                              //new JProperty("Lecturer", oc.Lecturer),
                                              //new JProperty("ProgressText", oc.ProgressText)
                                              from col in cc.Table.Columns.Cast <DataColumn>()
                                              select new JProperty(
                                                  col.ColumnName, cc[col.Ordinal].ToString()
                                                  ),
                                              new JProperty("Url", GetUrl(cc["ArticleGUID"].ToString(), out PicPath)),
                                              new JProperty("PicPath", PicPath)
                                              )
                                          )
                                      )
                        );
                rss.Merge(JCourse, new JsonMergeSettings
                {
                    MergeArrayHandling = MergeArrayHandling.Concat
                }
                          );
                context.Response.Write(rss.ToString());
            }
            #endregion Level2FocusPic
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";
            string ChannelAlias = "";
            string ChannelTitle = "";

            try
            {
                ChannelAlias = Request.QueryString["alias"].ToString();
            }
            catch
            {
                ChannelAlias = "gxchannel1";
            }
            ChannelTitle = DataQuery.GetNameByCategoryAlias(ChannelAlias);
            // 推荐
            String    CommendAlias   = DataQuery.GetChannelAliasByName(ChannelAlias, "推荐");
            string    CommendGuid    = DataQuery.CategoryAliasToID(CommendAlias);
            DataTable CommendCourses = new DAL.Article().GetArticleList(CommendGuid, false, 12);

            CommendList.DataSource = CommendCourses;
            CommendList.DataBind();
            //排行
            //DataTable HotListDataSrc = DataQuery.GetHotList();
            //HotList.DataSource = HotListDataSrc;
            //HotList.DataBind();

            // 主列表
            String    CategoryLv2Alias = DataQuery.GetChannelAliasByName(ChannelAlias, "栏目");
            string    Version          = ConfigurationManager.AppSettings["Version_Mark"];
            DataTable GetSubCategories = DataQuery.GetSubCategoriesApart(CategoryLv2Alias, Version);

            // Level2MainRight.DataSource = GetSubCategories;
            // Level2MainRight.DataBind();
            // Image Level2MainBanner = (Image)FindControl<Image>("Level2MainBanner");
            //Level2MainBanner.ImageUrl = "images/AD" + ChannelAlias + ".gif";

            //LeftPic
            LeftPicAliasText    = ConfigurationManager.AppSettings["ChannelPicCategory"];
            LeftPicLv2AliasText = DataQuery.GetChannelAliasByName(LeftPicAliasText, ChannelTitle);
            //Level2LeftPicBot.ImageUrl = "ShowBytePic.aspx?Title=底部图片&Alias=" + LeftPicLv2AliasText;
            //int LeftPicCount = (GetSubCategories.Rows.Count - 6) / 2;
            int       LeftPicCount            = 1;
            String    LeftPicAlias            = DataQuery.GetChannelAliasByName(ChannelAlias, "图片专题");
            DataTable LeftPicGetSubCategories = DataQuery.GetSubCategories(LeftPicAlias, LeftPicCount.ToString());

            LeftPicList.DataSource = LeftPicGetSubCategories;
            LeftPicList.DataBind();
            //Level2LeftPic1.ImageUrl = "images/" + ChannelAlias + "_1.jpg";
            //int SubCategoriesCount = GetSubCategories.Rows.Count;
            //if (SubCategoriesCount >= 10)
            //{
            //    Level2LeftPic2.Visible = true;
            //    Level2LeftPic2.ImageUrl = "images/" + ChannelAlias + "_2.jpg";
            //}
            //if (SubCategoriesCount >= 12)
            //{
            //    Level2LeftPic3.Visible = true;
            //    Level2LeftPic3.ImageUrl = "images/" + ChannelAlias + "_3.jpg";
            //}
            //if (SubCategoriesCount >= 14)
            //{
            //    Level2LeftPic4.Visible = true;
            //    Level2LeftPic4.ImageUrl = "images/" + ChannelAlias + "_4.jpg";
            //}
            String CategoryGUID = "";
            string TraceText    = "";

            if (Request.QueryString["id"] == null)
            {
                CategoryGUID = "1c68f666dc914382b95456acf6be87a5";
            }
            else
            {
                CategoryGUID = Request.QueryString["id"].ToString();
            }
            char[] PathSeparator = { '/' };
            string CategoryPath  = DataQuery.CategoryPath(CategoryGUID);

            string[] CategoryPaths = CategoryPath.Split(PathSeparator);
            for (int i = 4; i < CategoryPaths.Length; i++)
            {
                string title = DataQuery.GetNameByCategoryID(CategoryPaths[i]);
                TraceText += title + " / ";
            }
            Trace.Text = TraceText;
        }
예제 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CacheTest.Text = DateTime.Now.ToString();

            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";

            //图片新闻
            // Text
            string    NewsCommendAlias = ConfigurationManager.AppSettings["NewsCommendAlias"];
            DataTable NewsCommendText  = new DataTable();

            NewsCommendText         = DataQuery.GetSubCategories(NewsCommendAlias);
            FocusTabsTxt.DataSource = NewsCommendText;
            FocusTabsTxt.DataBind();
            //  Pic
            if (NewsCommendText.Rows.Count > 0)
            {
                DataTable NewsCommendPic = new DataTable();
                //NewsCommendPic = new DAL.Article().GetArticleList(NewsCommendText.Rows[0][1].ToString(),false,1); //缓存
                NewsCommendPic = DataQuery.ArticleQuery("", "1", NewsCommendText.Rows[0][2].ToString()).Tables[0];
                if (NewsCommendPic != null)
                {
                    NewsCommendPic.Columns.Add("FocusTabsIndex", typeof(String));
                    NewsCommendPic.Rows[0]["FocusTabsIndex"] = NewsCommendText.Rows[0]["XIndex"];
                    DataTable NewsCommendPicMerge = new DataTable();
                    for (int i = 1; i < NewsCommendText.Rows.Count; i++)
                    {
                        //NewsCommendPicMerge = new DAL.Article().GetArticleList(NewsCommendText.Rows[i][1].ToString(),false,1); //缓存
                        NewsCommendPicMerge = DataQuery.ArticleQuery("", "1", NewsCommendText.Rows[i][2].ToString()).Tables[0];
                        NewsCommendPicMerge.Columns.Add("FocusTabsIndex", typeof(String));
                        NewsCommendPicMerge.Rows[0]["FocusTabsIndex"] = NewsCommendText.Rows[i]["XIndex"];
                        NewsCommendPic.Merge(NewsCommendPicMerge);
                    }
                    FocusTabsPic.DataSource = NewsCommendPic;
                    FocusTabsPic.DataBind();
                }
            }

            //特别关注
            string    SubjectGUID = DataQuery.CategoryAliasToID(ConfigurationManager.AppSettings["TBGZ_Alias"]);
            string    SubjectPath = DataQuery.CategoryPath(SubjectGUID); //专题路径
            DataTable HotSubjects = new DataTable();

            HotSubjects = DataQuery.GetNHotZT();
            //  获取课件
            //string SubjectHotGUID = DataQuery.CategoryAliasToID(ConfigurationManager.AppSettings["SAHot_Alias"]);
            // string SubjectHotPath = DataQuery.CategoryPath(SubjectGUID);
            DataTable HotCoursesMerge = new DataTable();

            // 第一个专题
            if (HotSubjects.Rows.Count > 0)
            {
                //string SubjectHotItemPath = SubjectPath + "/" + HotSubjects.Rows[0][0].ToString();
                // DataTable HotCourses = new DAL.CategoryDAL().GetArticleIndexList(SubjectHotItemPath, "最新动态", 2, false);
                string    HotSubjectAlias = DataQuery.CategoryIDToAlias(HotSubjects.Rows[0][0].ToString());
                string    SubjectNewAlias = DataQuery.GetChannelAliasByName(HotSubjectAlias, "最新动态");
                string    SubjectNewGuid  = DataQuery.CategoryAliasToID(SubjectNewAlias);
                DataTable HotCourses      = new DAL.Article().GetArticleList(SubjectNewGuid, false, 2);
                HotCourses.Columns.Add("SubjectID", Type.GetType("System.String"));
                HotCourses.Columns.Add("SubjectTitle", Type.GetType("System.String"));
                for (int i = 0; i < HotCourses.Rows.Count; i++)
                {
                    HotCourses.Rows[i]["SubjectID"]    = HotSubjects.Rows[0][0].ToString();
                    HotCourses.Rows[i]["SubjectTitle"] = HotSubjects.Rows[0][1].ToString();
                }
                //  后N个专题
                for (int i = 1; i < HotSubjects.Rows.Count; i++)
                {
                    //SubjectHotItemPath = SubjectPath + "/" + HotSubjects.Rows[i][0].ToString();
                    //HotCoursesMerge = new DAL.CategoryDAL().GetArticleIndexList(SubjectHotItemPath, "最新动态", 2, false);
                    HotSubjectAlias = DataQuery.CategoryIDToAlias(HotSubjects.Rows[i][0].ToString());
                    SubjectNewGuid  = DataQuery.GetSubChannelGuidByName(HotSubjectAlias, "最新动态");
                    HotCoursesMerge = new DAL.Article().GetArticleList(SubjectNewGuid, false, 2);
                    HotCoursesMerge.Columns.Add("SubjectID", Type.GetType("System.String"));
                    HotCoursesMerge.Columns.Add("SubjectTitle", Type.GetType("System.String"));
                    for (int j = 0; j < HotCoursesMerge.Rows.Count; j++)
                    {
                        HotCoursesMerge.Rows[j]["SubjectID"]    = HotSubjects.Rows[i][0].ToString();
                        HotCoursesMerge.Rows[j]["SubjectTitle"] = HotSubjects.Rows[i][1].ToString();
                    }
                    HotCourses.Merge(HotCoursesMerge);
                }
                SpecialFocusContent.DataSource = HotCourses;
                SpecialFocusContent.DataBind();
            }

            //热点
            ZjspccmEntities DB    = new ZjspccmEntities();
            var             query = (from cn in DB.CategoryNodePositions
                                     join c in DB.Categories
                                     on cn.CategoryGUID equals c.CategoryGUID
                                     where (cn.CategoryPath.Contains("0c46ef80013847acb095bb5c902d08bd")) && (cn.YIndex == 5)
                                     orderby cn.XIndex descending
                                     select new
            {
                title = c.CategoryName,
                id = c.CategoryGUID
            }).Take(8);

            ListViewHotpoint.DataSource = query.ToList();
            ListViewHotpoint.DataBind();
            //树
            if (!Page.IsPostBack)
            {
                #region sync
                //SeminarTree.ShowLines = true;
                //SeminarTree.ShowExpandCollapse = true;
                TreeNodeCollection tnc = new TreeNodeCollection();
                //tnc = SeminarTree.Nodes;
                //tncRecursion(tnc, "2461c3d8f92d451599e054c1fb46fa11");

                //TreeNodeCollection tnc2 = new TreeNodeCollection();
                //tnc2 = SujectTree.Nodes;
                //tncRecursion(tnc2, "50ac3b6925644d269836e0a45e4671b4");
                #endregion sync
            }
            #region async
            //SeminarTree.Nodes.Clear();
            //Bind_Root("2461c3d8f92d451599e054c1fb46fa11", SeminarTree);
            #endregion async
            //导航
            string    NaviList1Alias = ConfigurationManager.AppSettings["subject"];
            DataTable NaviList1Items = DataQuery.GetSubCategories(NaviList1Alias, "9");
            //NaviList1.DataSource = NaviList1Items;
            // NaviList1.DataBind();
            string    NaviList2Alias = ConfigurationManager.AppSettings["MAJOR"];
            DataTable NaviList2Items = DataQuery.GetSubCategories(NaviList2Alias, "9");
            //NaviList2.DataSource = NaviList2Items;
            // NaviList2.DataBind();
            string    NaviList3Alias = ConfigurationManager.AppSettings["INSTITUTION"];
            DataTable NaviList3Items = DataQuery.GetSubCategories(NaviList3Alias, "9");
            // NaviList3.DataSource = NaviList3Items;
            // NaviList3.DataBind();
            //主列表
            string ChannelListAliasA1 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_1"];
            WebModules.HomeChannelListA HomeChannelListA1 = new WebModules.HomeChannelListA(ChannelListAliasA1);
            // ColumnShowSort1.DataSource = HomeChannelListA1.SubSortTable;
            //ColumnShowSort1.DataBind();
            //ColumnVideo1.DataSource = HomeChannelListA1.PicInfo;
            // ColumnVideo1.DataBind();
            // ColumnOtherL1.DataSource = HomeChannelListA1.TextInfoL;
            //ColumnOtherL1.DataBind();
            // ColumnOtherR1.DataSource = HomeChannelListA1.TextInfoR;
            // ColumnOtherR1.DataBind();
            string ChannelListATitle1 = ConfigurationManager.AppSettings["HomeChannelListA_Title_1"];
            // ListATitle1.Text = ChannelListATitle1;
            // ListALink1.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA1;

            string ChannelListAliasA2 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_2"];
            WebModules.HomeChannelListA HomeChannelListA2 = new WebModules.HomeChannelListA(ChannelListAliasA2);
            // ColumnShowSort2.DataSource = HomeChannelListA2.SubSortTable;
            // ColumnShowSort2.DataBind();
            // ColumnVideo2.DataSource = HomeChannelListA2.PicInfo;
            // ColumnVideo2.DataBind();
            //ColumnOtherL2.DataSource = HomeChannelListA2.TextInfoL;
            // ColumnOtherL2.DataBind();
            // ColumnOtherR2.DataSource = HomeChannelListA2.TextInfoR;
            // ColumnOtherR2.DataBind();
            string ChannelListATitle2 = ConfigurationManager.AppSettings["HomeChannelListA_Title_2"];
            // ListATitle2.Text = ChannelListATitle2;
            //ListALink2.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA2;

            string ChannelListAliasA3 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_3"];
            WebModules.HomeChannelListA HomeChannelListA3 = new WebModules.HomeChannelListA(ChannelListAliasA3);
            // ColumnShowSort3.DataSource = HomeChannelListA3.SubSortTable;
            // ColumnShowSort3.DataBind();
            // ColumnVideo3.DataSource = HomeChannelListA3.PicInfo;
            // ColumnVideo3.DataBind();
            // ColumnOtherL3.DataSource = HomeChannelListA3.TextInfoL;
            // ColumnOtherL3.DataBind();
            // ColumnOtherR3.DataSource = HomeChannelListA3.TextInfoR;
            // ColumnOtherR3.DataBind();
            string ChannelListATitle3 = ConfigurationManager.AppSettings["HomeChannelListA_Title_3"];
            // ListATitle3.Text = ChannelListATitle3;
            // ListALink3.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA3;

            string ChannelListAliasA4 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_4"];
            WebModules.HomeChannelListA HomeChannelListA4 = new WebModules.HomeChannelListA(ChannelListAliasA4);
            // ColumnShowSort4.DataSource = HomeChannelListA4.SubSortTable;
            // ColumnShowSort4.DataBind();
            // ColumnVideo4.DataSource = HomeChannelListA4.PicInfo;
            // ColumnVideo4.DataBind();
            //ColumnOtherL4.DataSource = HomeChannelListA4.TextInfoL;
            //ColumnOtherL4.DataBind();
            // ColumnOtherR4.DataSource = HomeChannelListA4.TextInfoR;
            // ColumnOtherR4.DataBind();
            string ChannelListATitle4 = ConfigurationManager.AppSettings["HomeChannelListA_Title_4"];
            // ListATitle4.Text = ChannelListATitle4;
            // ListALink4.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA4;

            //右侧列表
            string ChannelListAliasB2 = ConfigurationManager.AppSettings["HomeChannelListB_CategoryAlias_2"];
            WebModules.HomeChannelListB HomeChannelListB2 = new WebModules.HomeChannelListB(ChannelListAliasB2, 1, 8);
            //VerticalShowVideo2.DataSource = HomeChannelListB2.PicInfo;
            // VerticalShowVideo2.DataBind();
            // VerticalShowList2.DataSource = HomeChannelListB2.TextInfo;
            // VerticalShowList2.DataBind();
            string ChannelListBTitle2 = ConfigurationManager.AppSettings["HomeChannelListB_Title_2"];
            //  ListBTitle2.Text = ChannelListBTitle2;
            //  ListBLink2.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasB2;

            string ChannelListAliasB3 = ConfigurationManager.AppSettings["HomeChannelListB_CategoryAlias_3"];
            WebModules.HomeChannelListB HomeChannelListB3 = new WebModules.HomeChannelListB(ChannelListAliasB3, 1, 4);
            //VerticalShowVideo3.DataSource = HomeChannelListB3.PicInfo;
            //  VerticalShowVideo3.DataBind();
            // VerticalShowList3.DataSource = HomeChannelListB3.TextInfo;
            // VerticalShowList3.DataBind();
            string ChannelListBTitle3 = ConfigurationManager.AppSettings["HomeChannelListB_Title_3"];
            //  ListBTitle3.Text = ChannelListBTitle3;
            //  ListBLink3.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasB3;
            //右侧名家
            string ChannelListAliasBS1 = ConfigurationManager.AppSettings["HomeChannelListBS_CategoryAlias_1"];
            WebModules.HomeChannelListBS HomeChannelListBS1 = new WebModules.HomeChannelListBS(ChannelListAliasBS1, 2);
            //  VerticalShowVideo1.DataSource = HomeChannelListBS1.PicInfo;
            // VerticalShowVideo1.DataBind();
            string ChannelListBSTitle1 = ConfigurationManager.AppSettings["HomeChannelListBS_Title_1"];
            // ListBTitle1.Text = ChannelListBSTitle1;
            string FameAlias = ConfigurationManager.AppSettings["ChannelFame"];
            // ListBLink1.NavigateUrl = "level2.aspx?alias=" + FameAlias;
            //右侧公开课
            string ChannelListAliasBS2 = ConfigurationManager.AppSettings["ChannelClass"];
            //WebModules.HomeChannelListBS HomeChannelListBS2 = new WebModules.HomeChannelListBS(ChannelListAliasBS2, 2);
            //VerticalShowVideo4.DataSource = HomeChannelListBS2.PicInfo;
            //VerticalShowVideo4.DataBind();
            //LeftList
            string    Lv2ClassLeftListAlias  = DataQuery.GetChannelAliasByName(ChannelListAliasBS2, "国内985大学");
            DataTable Lv2ClassLeftList1Items = DataQuery.GetSubCategories(Lv2ClassLeftListAlias, "6");
            // TabIndex2List1.DataSource = Lv2ClassLeftList1Items;
            // TabIndex2List1.DataBind();
            //LeftList
            Lv2ClassLeftListAlias = DataQuery.GetChannelAliasByName(ChannelListAliasBS2, "国外大学");
            DataTable Lv2ClassLeftList2Items = DataQuery.GetSubCategories(Lv2ClassLeftListAlias, "6");
            // TabIndex2List2.DataSource = Lv2ClassLeftList2Items;
            // TabIndex2List2.DataBind();

            //下方列表
            string    SkillListAlias    = ConfigurationManager.AppSettings["HomeChannelListC_CategoryAlias"];
            DataTable SkillCategoryInfo = DataQuery.GetSubCategoriesNote(DataQuery.GetChannelAliasByName(SkillListAlias, "栏目"), "8");
            SkillTabs.DataSource = SkillCategoryInfo;
            SkillTabs.DataBind();
            TabIndex1Box.DataSource = SkillCategoryInfo;
            TabIndex1Box.DataBind();
            SkillNote.DataSource = SkillCategoryInfo;
            SkillNote.DataBind();

            string ChannelListAliasD = ConfigurationManager.AppSettings["HomeChannelListD_CategoryAlias"];
            WebModules.HomeChannelListC HomeChannelListC2 = new WebModules.HomeChannelListC(ChannelListAliasD);
            TrainList.DataSource = HomeChannelListC2.CategoryInfo;
            TrainList.DataBind();

            // TEST
            //GridView1.DataSource = HomeChannelListA1.TextInfoL;
            //GridView1.DataBind();
        }
예제 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";

            string ChannelTitle = null;

            // 痕迹&栏目标题
            if (Request.QueryString["alias"] == null)
            {
                //Response.Redirect("index.aspx");
                alias   = "gxchannel1_topics_1";
                IsChild = "0";
            }
            else
            {
                SetAliasAndIsChild();
            }

            string CategoryGUID = DataQuery.CategoryAliasToID(alias);
            string CategoryPath = DataQuery.CategoryPath(CategoryGUID);

            char[]   PathSeparator = { '/' };
            string[] CategoryPaths = CategoryPath.Split(PathSeparator);
            ChannelAlias = DataQuery.CategoryIDToAlias(CategoryPaths[4]);
            string Lv2Alias = DataQuery.CategoryIDToAlias(CategoryPaths[6]);//2级分类

            ChannelTitle             = DataQuery.GetNameByCategoryAlias(ChannelAlias);
            CurrentTrace.Text        = ChannelTitle;
            CurrentCategoryName.Text = ChannelTitle;
            TraceLv2Link.NavigateUrl = "level2.aspx?alias=" + ChannelAlias;
            //竖导航
            String    Lv2sAlias         = DataQuery.GetChannelAliasByName(ChannelAlias, "栏目");
            DataTable Lv2CategoriesInfo = DataQuery.GetSubCategories(Lv2sAlias);

            DataRow[] Lv2Current = Lv2CategoriesInfo.Select("CategoryAlias = '" + Lv2Alias + "'");
            if (Lv2Current.Length > 0)
            {
                Lv2CategoriesIndex = Array.IndexOf(Lv2CategoriesInfo.Select("", "XIndex  asc"), Lv2Current[0]);
            }

            Lv3Navi.DataSource = Lv2CategoriesInfo;
            Lv3Navi.DataBind();
            //主列表
            if (Request.QueryString["order"] == null)
            {
                ListOrder         = "desc";
                RadioDesc.Checked = true;
            }
            else
            {
                ListOrder = Request.QueryString["order"].ToString();
                switch (ListOrder)
                {
                case "asc":
                    RadioAsc.Checked = true;
                    break;

                case "desc":
                    RadioDesc.Checked = true;
                    break;

                default:
                    RadioDesc.Checked = true;
                    break;
                }
            }
            //
            ListType = GetListType();
            //
            guid = DataQuery.CategoryAliasToID(alias);
            Lv3Pager.PageSize = int.Parse(System.Configuration.ConfigurationManager.AppSettings["PageSize"]);
            if (!IsPostBack)
            {
                DataTable dt = new DAL.Article().GetArticleList(guid, false, "desc", true);
                int       iTotalRowsCount = dt.Rows.Count;
                Lv3Pager.RecordCount = iTotalRowsCount;
                MainDataBind();
            }
        }
예제 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CacheTest.Text = DateTime.Now.ToString();

            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";

            //图片新闻
            // Text
            string    NewsCommendAlias = ConfigurationManager.AppSettings["NewsCommendAlias"];
            DataTable NewsCommendText  = new DataTable();

            NewsCommendText         = DataQuery.GetSubCategories(NewsCommendAlias);
            FocusTabsTxt.DataSource = NewsCommendText;
            FocusTabsTxt.DataBind();
            //  Pic
            if (NewsCommendText.Rows.Count > 0)
            {
                DataTable NewsCommendPic = new DataTable();
                //NewsCommendPic = new DAL.Article().GetArticleList(NewsCommendText.Rows[0][1].ToString(),false,1); //缓存
                NewsCommendPic = DataQuery.ArticleQuery("", "1", NewsCommendText.Rows[0][2].ToString()).Tables[0];
                if (NewsCommendPic != null)
                {
                    NewsCommendPic.Columns.Add("FocusTabsIndex", typeof(String));
                    NewsCommendPic.Rows[0]["FocusTabsIndex"] = NewsCommendText.Rows[0]["XIndex"];
                    DataTable NewsCommendPicMerge = new DataTable();
                    for (int i = 1; i < NewsCommendText.Rows.Count; i++)
                    {
                        //NewsCommendPicMerge = new DAL.Article().GetArticleList(NewsCommendText.Rows[i][1].ToString(),false,1); //缓存
                        NewsCommendPicMerge = DataQuery.ArticleQuery("", "1", NewsCommendText.Rows[i][2].ToString()).Tables[0];
                        NewsCommendPicMerge.Columns.Add("FocusTabsIndex", typeof(String));
                        NewsCommendPicMerge.Rows[0]["FocusTabsIndex"] = NewsCommendText.Rows[i]["XIndex"];
                        NewsCommendPic.Merge(NewsCommendPicMerge);
                    }
                    FocusTabsPic.DataSource = NewsCommendPic;
                    FocusTabsPic.DataBind();
                }
            }

            //特别关注
            string    SubjectGUID = DataQuery.CategoryAliasToID(ConfigurationManager.AppSettings["TBGZ_Alias"]);
            string    SubjectPath = DataQuery.CategoryPath(SubjectGUID); //专题路径
            DataTable HotSubjects = new DataTable();

            HotSubjects = DataQuery.GetNHotZT();
            //  获取课件
            //string SubjectHotGUID = DataQuery.CategoryAliasToID(ConfigurationManager.AppSettings["SAHot_Alias"]);
            // string SubjectHotPath = DataQuery.CategoryPath(SubjectGUID);
            DataTable HotCoursesMerge = new DataTable();

            // 第一个专题
            if (HotSubjects.Rows.Count > 0)
            {
                //string SubjectHotItemPath = SubjectPath + "/" + HotSubjects.Rows[0][0].ToString();
                // DataTable HotCourses = new DAL.CategoryDAL().GetArticleIndexList(SubjectHotItemPath, "最新动态", 2, false);
                string    HotSubjectAlias = DataQuery.CategoryIDToAlias(HotSubjects.Rows[0][0].ToString());
                string    SubjectNewAlias = DataQuery.GetChannelAliasByName(HotSubjectAlias, "最新动态");
                string    SubjectNewGuid  = DataQuery.CategoryAliasToID(SubjectNewAlias);
                DataTable HotCourses      = new DAL.Article().GetArticleList(SubjectNewGuid, false, 2);
                HotCourses.Columns.Add("SubjectID", Type.GetType("System.String"));
                HotCourses.Columns.Add("SubjectTitle", Type.GetType("System.String"));
                for (int i = 0; i < HotCourses.Rows.Count; i++)
                {
                    HotCourses.Rows[i]["SubjectID"]    = HotSubjects.Rows[0][0].ToString();
                    HotCourses.Rows[i]["SubjectTitle"] = HotSubjects.Rows[0][1].ToString();
                }
                //  后N个专题
                for (int i = 1; i < HotSubjects.Rows.Count; i++)
                {
                    //SubjectHotItemPath = SubjectPath + "/" + HotSubjects.Rows[i][0].ToString();
                    //HotCoursesMerge = new DAL.CategoryDAL().GetArticleIndexList(SubjectHotItemPath, "最新动态", 2, false);
                    HotSubjectAlias = DataQuery.CategoryIDToAlias(HotSubjects.Rows[i][0].ToString());
                    SubjectNewGuid  = DataQuery.GetSubChannelGuidByName(HotSubjectAlias, "最新动态");
                    HotCoursesMerge = new DAL.Article().GetArticleList(SubjectNewGuid, false, 2);
                    HotCoursesMerge.Columns.Add("SubjectID", Type.GetType("System.String"));
                    HotCoursesMerge.Columns.Add("SubjectTitle", Type.GetType("System.String"));
                    for (int j = 0; j < HotCoursesMerge.Rows.Count; j++)
                    {
                        HotCoursesMerge.Rows[j]["SubjectID"]    = HotSubjects.Rows[i][0].ToString();
                        HotCoursesMerge.Rows[j]["SubjectTitle"] = HotSubjects.Rows[i][1].ToString();
                    }
                    HotCourses.Merge(HotCoursesMerge);
                }
                SpecialFocusContent.DataSource = HotCourses;
                SpecialFocusContent.DataBind();
            }

            //时事新闻
            DataTable HomeTopDataTable1 = new DataTable();
            string    HomeNews1Guid     = DataQuery.CategoryAliasToID(ConfigurationManager.AppSettings["HomeTop1Alias"]);

            HomeTopDataTable1 = new DAL.Article().GetArticleList(HomeNews1Guid, true, 1);
            if (HomeTopDataTable1 != null)
            {
                //
                //TopVideoPic1.ImageUrl = DataQuery.GetCoursePicPath(HomeTopDataTable1.Rows[0][0].ToString(), url, "000.jpg");
                TopVideoLink1a.NavigateUrl = "ShowVideo.aspx?ID=" + HomeTopDataTable1.Rows[0][0].ToString();
                TopVideoLink1b.NavigateUrl = "ShowVideo.aspx?ID=" + HomeTopDataTable1.Rows[0][0].ToString();
                string   TopVideoLink1Title = HomeTopDataTable1.Rows[0][1].ToString();
                string[] TopVideoLink1Array = TopVideoLink1Title.Split(new char[] { '[' });
                TopVideoLink1Title  = TopVideoLink1Array[1].Replace("]", "");
                TopVideoLink1b.Text = TopVideoLink1Title;
                TopVideoText1.Text  = DataProcessing.SubstringText(HomeTopDataTable1.Rows[0][10].ToString(), 26);
                //
                DataTable HomeTopDataTable2 = new DataTable();
                string    HomeNews2Guid     = DataQuery.CategoryAliasToID(ConfigurationManager.AppSettings["HomeTop2Alias"]);
                HomeTopDataTable2 = new DAL.Article().GetArticleList(HomeNews2Guid, false, 1);
                //TopVideoPic2.ImageUrl = DataQuery.GetCoursePicPath(HomeTopDataTable2.Rows[0][0].ToString(), url, "000.jpg");
                TopVideoLink2a.NavigateUrl = "ShowVideo.aspx?ID=" + HomeTopDataTable2.Rows[0][0].ToString();
                TopVideoLink2b.NavigateUrl = "ShowVideo.aspx?ID=" + HomeTopDataTable2.Rows[0][0].ToString();
                string   TopVideoLink2Title = HomeTopDataTable2.Rows[0][1].ToString();
                string[] TopVideoLink2Array = TopVideoLink2Title.Split(new char[] { '[' });
                TopVideoLink2Title  = TopVideoLink2Array[1].Replace("]", "");
                TopVideoLink2b.Text = TopVideoLink2Title;
                string CSVPath = DataQuery.GetFileStreamPath(HomeTopDataTable2.Rows[0][0].ToString(), "vod/data.csv");
                //string CSVPath = DataQuery.GetFileStreamPath(HomeTopDataTable2.Rows[0][0].ToString(), "vod/");
                if (CSVPath != null)
                {
                    DataTable CSVDataSrc = new DataTable();
                    try
                    {
                        CSVDataSrc = DataProcessing.ImportCSV(CSVPath);
                        //CSVDataSrc = DataProcessing.getCsvData(CSVPath, "data.csv");
                        var CSVData = from row in CSVDataSrc.AsEnumerable()
                                      select row;
                        CSVDataSrc = CSVData.Take(1).CopyToDataTable <DataRow>();
                        //DailyVideoInfoTextLines.DataSource = CSVDataSrc;
                        //DailyVideoInfoTextLines.DataBind();
                        string CSVDataText = CSVDataSrc.Rows[0][5].ToString();
                        CSVDataText        = CSVDataText.Remove(0, 1);
                        TopVideoText2.Text = DataProcessing.SubstringText(CSVDataText, 26);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
            //导航
            string    NaviList1Alias = ConfigurationManager.AppSettings["subject"];
            DataTable NaviList1Items = DataQuery.GetSubCategories(NaviList1Alias, "9");

            NaviList1.DataSource = NaviList1Items;
            NaviList1.DataBind();
            string    NaviList2Alias = ConfigurationManager.AppSettings["MAJOR"];
            DataTable NaviList2Items = DataQuery.GetSubCategories(NaviList2Alias, "9");

            NaviList2.DataSource = NaviList2Items;
            NaviList2.DataBind();
            string    NaviList3Alias = ConfigurationManager.AppSettings["INSTITUTION"];
            DataTable NaviList3Items = DataQuery.GetSubCategories(NaviList3Alias, "9");

            NaviList3.DataSource = NaviList3Items;
            NaviList3.DataBind();
            //主列表
            string ChannelListAliasA1 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_1"];

            WebModules.HomeChannelListA HomeChannelListA1 = new WebModules.HomeChannelListA(ChannelListAliasA1);
            ColumnShowSort1.DataSource = HomeChannelListA1.SubSortTable;
            ColumnShowSort1.DataBind();
            ColumnVideo1.DataSource = HomeChannelListA1.PicInfo;
            ColumnVideo1.DataBind();
            ColumnOtherL1.DataSource = HomeChannelListA1.TextInfoL;
            ColumnOtherL1.DataBind();
            ColumnOtherR1.DataSource = HomeChannelListA1.TextInfoR;
            ColumnOtherR1.DataBind();
            string ChannelListATitle1 = ConfigurationManager.AppSettings["HomeChannelListA_Title_1"];

            ListATitle1.Text       = ChannelListATitle1;
            ListALink1.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA1;

            string ChannelListAliasA2 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_2"];

            WebModules.HomeChannelListA HomeChannelListA2 = new WebModules.HomeChannelListA(ChannelListAliasA2);
            ColumnShowSort2.DataSource = HomeChannelListA2.SubSortTable;
            ColumnShowSort2.DataBind();
            ColumnVideo2.DataSource = HomeChannelListA2.PicInfo;
            ColumnVideo2.DataBind();
            ColumnOtherL2.DataSource = HomeChannelListA2.TextInfoL;
            ColumnOtherL2.DataBind();
            ColumnOtherR2.DataSource = HomeChannelListA2.TextInfoR;
            ColumnOtherR2.DataBind();
            string ChannelListATitle2 = ConfigurationManager.AppSettings["HomeChannelListA_Title_2"];

            ListATitle2.Text       = ChannelListATitle2;
            ListALink2.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA2;

            string ChannelListAliasA3 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_3"];

            WebModules.HomeChannelListA HomeChannelListA3 = new WebModules.HomeChannelListA(ChannelListAliasA3);
            ColumnShowSort3.DataSource = HomeChannelListA3.SubSortTable;
            ColumnShowSort3.DataBind();
            ColumnVideo3.DataSource = HomeChannelListA3.PicInfo;
            ColumnVideo3.DataBind();
            ColumnOtherL3.DataSource = HomeChannelListA3.TextInfoL;
            ColumnOtherL3.DataBind();
            ColumnOtherR3.DataSource = HomeChannelListA3.TextInfoR;
            ColumnOtherR3.DataBind();
            string ChannelListATitle3 = ConfigurationManager.AppSettings["HomeChannelListA_Title_3"];

            ListATitle3.Text       = ChannelListATitle3;
            ListALink3.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA3;

            string ChannelListAliasA4 = ConfigurationManager.AppSettings["HomeChannelListA_CategoryAlias_4"];

            WebModules.HomeChannelListA HomeChannelListA4 = new WebModules.HomeChannelListA(ChannelListAliasA4);
            ColumnShowSort4.DataSource = HomeChannelListA4.SubSortTable;
            ColumnShowSort4.DataBind();
            ColumnVideo4.DataSource = HomeChannelListA4.PicInfo;
            ColumnVideo4.DataBind();
            ColumnOtherL4.DataSource = HomeChannelListA4.TextInfoL;
            ColumnOtherL4.DataBind();
            ColumnOtherR4.DataSource = HomeChannelListA4.TextInfoR;
            ColumnOtherR4.DataBind();
            string ChannelListATitle4 = ConfigurationManager.AppSettings["HomeChannelListA_Title_4"];

            ListATitle4.Text       = ChannelListATitle4;
            ListALink4.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasA4;

            //右侧列表
            string ChannelListAliasB2 = ConfigurationManager.AppSettings["HomeChannelListB_CategoryAlias_2"];

            WebModules.HomeChannelListB HomeChannelListB2 = new WebModules.HomeChannelListB(ChannelListAliasB2, 1, 8);
            VerticalShowVideo2.DataSource = HomeChannelListB2.PicInfo;
            VerticalShowVideo2.DataBind();
            VerticalShowList2.DataSource = HomeChannelListB2.TextInfo;
            VerticalShowList2.DataBind();
            string ChannelListBTitle2 = ConfigurationManager.AppSettings["HomeChannelListB_Title_2"];

            ListBTitle2.Text       = ChannelListBTitle2;
            ListBLink2.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasB2;

            string ChannelListAliasB3 = ConfigurationManager.AppSettings["HomeChannelListB_CategoryAlias_3"];

            WebModules.HomeChannelListB HomeChannelListB3 = new WebModules.HomeChannelListB(ChannelListAliasB3, 1, 4);
            VerticalShowVideo3.DataSource = HomeChannelListB3.PicInfo;
            VerticalShowVideo3.DataBind();
            VerticalShowList3.DataSource = HomeChannelListB3.TextInfo;
            VerticalShowList3.DataBind();
            string ChannelListBTitle3 = ConfigurationManager.AppSettings["HomeChannelListB_Title_3"];

            ListBTitle3.Text       = ChannelListBTitle3;
            ListBLink3.NavigateUrl = "level2.aspx?alias=" + ChannelListAliasB3;
            //右侧名家
            string ChannelListAliasBS1 = ConfigurationManager.AppSettings["HomeChannelListBS_CategoryAlias_1"];

            WebModules.HomeChannelListBS HomeChannelListBS1 = new WebModules.HomeChannelListBS(ChannelListAliasBS1, 2);
            VerticalShowVideo1.DataSource = HomeChannelListBS1.PicInfo;
            VerticalShowVideo1.DataBind();
            string ChannelListBSTitle1 = ConfigurationManager.AppSettings["HomeChannelListBS_Title_1"];

            ListBTitle1.Text = ChannelListBSTitle1;
            string FameAlias = ConfigurationManager.AppSettings["ChannelFame"];

            ListBLink1.NavigateUrl = "level2.aspx?alias=" + FameAlias;
            //右侧公开课
            string ChannelListAliasBS2 = ConfigurationManager.AppSettings["ChannelClass"];
            //WebModules.HomeChannelListBS HomeChannelListBS2 = new WebModules.HomeChannelListBS(ChannelListAliasBS2, 2);
            //VerticalShowVideo4.DataSource = HomeChannelListBS2.PicInfo;
            //VerticalShowVideo4.DataBind();
            //LeftList
            string    Lv2ClassLeftListAlias  = DataQuery.GetChannelAliasByName(ChannelListAliasBS2, "国内985大学");
            DataTable Lv2ClassLeftList1Items = DataQuery.GetSubCategories(Lv2ClassLeftListAlias, "6");

            TabIndex2List1.DataSource = Lv2ClassLeftList1Items;
            TabIndex2List1.DataBind();
            //LeftList
            Lv2ClassLeftListAlias = DataQuery.GetChannelAliasByName(ChannelListAliasBS2, "国外大学");
            DataTable Lv2ClassLeftList2Items = DataQuery.GetSubCategories(Lv2ClassLeftListAlias, "6");

            TabIndex2List2.DataSource = Lv2ClassLeftList2Items;
            TabIndex2List2.DataBind();

            //下方列表
            string    SkillListAlias    = ConfigurationManager.AppSettings["HomeChannelListC_CategoryAlias"];
            DataTable SkillCategoryInfo = DataQuery.GetSubCategoriesNote(DataQuery.GetChannelAliasByName(SkillListAlias, "栏目"), "8");

            SkillTabs.DataSource = SkillCategoryInfo;
            SkillTabs.DataBind();
            TabIndex1Box.DataSource = SkillCategoryInfo;
            TabIndex1Box.DataBind();
            SkillNote.DataSource = SkillCategoryInfo;
            SkillNote.DataBind();

            string ChannelListAliasD = ConfigurationManager.AppSettings["HomeChannelListD_CategoryAlias"];

            WebModules.HomeChannelListC HomeChannelListC2 = new WebModules.HomeChannelListC(ChannelListAliasD);
            TrainList.DataSource = HomeChannelListC2.CategoryInfo;
            TrainList.DataBind();

            // TEST
            //GridView1.DataSource = HomeChannelListA1.TextInfoL;
            //GridView1.DataBind();
        }
예제 #23
0
        protected void Page_Init(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + Request.ApplicationPath + "/";
            //热门关键词
            string sHotKey_Alias = ConfigurationManager.AppSettings["HotKeyAlias"];

            divHotKey.InnerHtml = new DAL.CategoryDAL().GetHotKey(sHotKey_Alias);

            //导航
            string    VoidGuid     = ConfigurationManager.AppSettings["Void_Guid"];
            string    VersionMark  = ConfigurationManager.AppSettings["Version_Mark"];
            DataTable NaviListData = DataQuery.GetNaviCategories(VoidGuid, "10", VersionMark);

            TopNaviList.DataSource = NaviListData;
            TopNaviList.DataBind();

            string ChannelAlias = null;
            string ChannelTitle = null;
            // 跳转&痕迹
            string CurrentPage = Path.GetFileName(Request.PhysicalPath);

            if (CurrentPage == "Level2Fame.aspx")
            {
                ChannelAlias             = ConfigurationManager.AppSettings["ChannelFame"];
                ChannelTitle             = DataQuery.GetNameByCategoryAlias(ChannelAlias);
                CurrentTrace.Text        = ChannelTitle;
                TraceLv2Link.NavigateUrl = "Level2Fame.aspx";
            }
            else if (CurrentPage == "Level2Class.aspx")
            {
                ChannelAlias             = ConfigurationManager.AppSettings["ChannelClass"];
                ChannelTitle             = DataQuery.GetNameByCategoryAlias(ChannelAlias);
                CurrentTrace.Text        = ChannelTitle;
                TraceLv2Link.NavigateUrl = "Level2Class.aspx";
            }
            else if (CurrentPage == "Level2News.aspx")
            {
                ChannelAlias             = ConfigurationManager.AppSettings["ChannelNews"];
                ChannelTitle             = DataQuery.GetNameByCategoryAlias(ChannelAlias);
                CurrentTrace.Text        = ChannelTitle;
                TraceLv2Link.NavigateUrl = "Level2News.aspx";
            }
            else
            {
                try
                {
                    ChannelAlias = Request.QueryString["alias"].ToString();
                }
                catch (Exception AliasNull)
                {
                    Response.Redirect("index.aspx");
                }
                if (ChannelAlias == ConfigurationManager.AppSettings["ChannelFame"])
                {
                    Response.Redirect("Level2Fame.aspx");
                }
                else if (ChannelAlias == ConfigurationManager.AppSettings["ChannelClass"])
                {
                    Response.Redirect("Level2Class.aspx");
                }
                //else if (ChannelAlias == ConfigurationManager.AppSettings["ChannelNews"])
                //{
                //    Response.Redirect("Level2News.aspx");
                //}
                else
                {
                    ChannelTitle             = DataQuery.GetNameByCategoryAlias(ChannelAlias);
                    CurrentTrace.Text        = ChannelTitle;
                    TraceLv2Link.NavigateUrl = "level2.aspx?alias=" + ChannelAlias;
                }
            }
            // 导视
            String    GuideAlias   = DataQuery.GetChannelAliasByName(ChannelAlias, "导视");
            String    GuideGuid    = DataQuery.CategoryAliasToID(GuideAlias);
            DataTable GuideCourses = new DAL.Article().GetArticleList(GuideGuid, true, 5);

            //Remove Html
            SlideShowPic.DataSource = GuideCourses;
            SlideShowPic.DataBind();
            SlideShowText.DataSource = GuideCourses;
            SlideShowText.DataBind();
            // 图片
            Level2Title.ImageUrl = "../images/" + ChannelAlias + ".png";
            //预告
            String TrailerAlias       = ConfigurationManager.AppSettings["ChannelTrailer"];
            string EnCodeChannelTitle = HttpUtility.UrlEncode(ChannelTitle, Encoding.GetEncoding("utf-8"));

            PreviewPic.ImageUrl = "../ShowBytePic.aspx?Title=" + EnCodeChannelTitle + "&Alias=" + TrailerAlias;
            String TrailerText = DataQuery.GetTrailerText(TrailerAlias, ChannelTitle);

            if (TrailerText != null)
            {
                TrailerText = TrailerText.Replace(";", ";");
                string[] TrailerInfo = TrailerText.Split(';');
                PreviewTitle.Text          = DataProcessing.SubstringText(TrailerInfo[0], 10);
                PreviewTitle.ToolTip       = TrailerInfo[0].ToString();
                PreviewSpeaker.Text        = TrailerInfo[1];
                PreviewSpeakerInfo.Text    = DataProcessing.SubstringText(TrailerInfo[2], 10);
                PreviewSpeakerInfo.ToolTip = TrailerInfo[2].ToString();
            }
        }