Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Supplier site = (Supplier)this.Master;

            if (site != null)
            {
                site.MenuIndex = 3;
            }

            #region  业交流专区
            CommonTopic5.PartType  = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.业交流专区;
            CommonTopic5.TopicType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.文字描述;
            #endregion

            #region 绑定最新一期的嘉宾访谈及回复
            EyouSoft.IBLL.CommunityStructure.IHonoredGuest GuestBll   = EyouSoft.BLL.CommunityStructure.HonoredGuest.CreateInstance();
            EyouSoft.Model.CommunityStructure.HonoredGuest GuestModel = GuestBll.GetNewInfo();
            if (GuestModel != null)
            {
                ltrMoreComment.Text  = string.Format("<a href=\"/SupplierInfo/HonoredGuestComment.aspx?Id={0}\" target=\"_blank\" class=\"heise12\">更多&gt;&gt;</a>", GuestModel.ID);
                HonoredGuestInfoUrl  = "/SupplierInfo/HonoredGuestInfo.aspx?Id=" + GuestModel.ID;
                lbTitle.Text         = string.Format("<a href=\"/SupplierInfo/HonoredGuestInfo.aspx?Id={0}\">{1}</a>", GuestModel.ID, GuestModel.Title); //Utils.GetText(GuestModel.Title, 10));
                lbContent.Text       = GuestModel.Content;                                                                                               //Utils.GetText(GuestModel.Content, 50, true);
                OpinionContent1.Text = GuestModel.Opinion1;                                                                                              //Utils.GetText(GuestModel.Opinion1, 50, true);
                OpinionContent2.Text = GuestModel.Opinion2;                                                                                              //Utils.GetText(GuestModel.Opinion2, 50, true);
                OpinionContent3.Text = GuestModel.Opinion3;                                                                                              //Utils.GetText(GuestModel.Opinion3, 50, true);
                Summary.Text         = GuestModel.Summary;                                                                                               //Utils.GetText(GuestModel.Summary, 50, true);
                hGuestId.Value       = GuestModel.ID;
                #region 绑定访谈回复
                IList <EyouSoft.Model.CommunityStructure.ExchangeComment> CommentList = Ibll.GetGuestInterview(6, hGuestId.Value);
                if (CommentList != null && CommentList.Count > 0)
                {
                    RpComment.DataSource = CommentList;
                    RpComment.DataBind();
                }
                CommentList = null;
                #endregion
            }
            GuestModel = null;
            GuestBll   = null;
            #endregion
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定图文列表
        /// </summary>
        private void BindPicList()
        {
            StringBuilder strInfoHtml = new StringBuilder();
            IList <EyouSoft.Model.CommunityStructure.InfoArticle> list = null;

            EyouSoft.IBLL.CommunityStructure.IInfoArticle InfoBll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance();
            switch (PartType)
            {
                #region 资讯
            case PartTypes.资讯:
                list = InfoBll.GetTopNumPicList(TopNumber, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, null, true, null);
                if (list != null && list.Count > 0)
                {
                    foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list)
                    {
                        strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc;\">");
                        strInfoHtml.Append("<tr>");
                        strInfoHtml.AppendFormat("<td width=\"48%\" height=\"108\"><img src=\"{0}\" width=\"120\" height=\"90\" /></td>", FileServerUrl + model.ImgThumb);
                        strInfoHtml.AppendFormat("<td width=\"52%\" valign=\"top\"><strong><a href=\"/SupplierInfo/{0}?Id={1}\" class=\"heise\" title=\"{3}\">{2}</a></strong><br /><span class=\"huise\">{3}</span><a href=\"/SupplierInfo/{0}?Id={1}\"><span class=\"ff0000\">[详细]</span></a></td>",
                                                 model.TopicClassId == EyouSoft.Model.CommunityStructure.TopicClass.行业资讯 ? "ArticleInfo.aspx" : "SchoolIntroductionInfo.aspx", model.ID, Utils.GetText(model.ArticleTitle, 7), model.ArticleTitle, Utils.GetText(model.ArticleText, 30));
                        strInfoHtml.Append("</tr>");
                        strInfoHtml.Append("</table>");
                    }
                }
                list    = null;
                InfoBll = null;
                break;
                #endregion

                #region 顾问团队
            case PartTypes.顾问团队:
                EyouSoft.IBLL.CommunityStructure.ICommunityAdvisor         IAdvisorBll = EyouSoft.BLL.CommunityStructure.CommunityAdvisor.CreateInstance();
                IList <EyouSoft.Model.CommunityStructure.CommunityAdvisor> AdvList     = IAdvisorBll.GetCommunityAdvisorList(TopNumber, true);
                if (AdvList != null && AdvList.Count > 0)
                {
                    foreach (EyouSoft.Model.CommunityStructure.CommunityAdvisor model in AdvList)
                    {
                        strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc; margin-top:5px; padding-bottom:2px;\">");
                        strInfoHtml.Append("<tr>");
                        strInfoHtml.AppendFormat("<td width=\"27%\"><img src=\"{0}\" width=\"59\" height=\"60\" /></td>", FileServerUrl + model.ImgPath);
                        strInfoHtml.AppendFormat("<td width=\"73%\" valign=\"top\" align=\"left\"><strong>{0}</strong><br />", model.ContactName);
                        strInfoHtml.AppendFormat("<div style=\"color:#585858;\" title=\"{1}\">{0}</div></td>", Utils.GetText(model.Achieve, 30), model.Achieve);
                        strInfoHtml.Append("</tr>");
                        strInfoHtml.Append("</table>");
                    }
                }
                AdvList     = null;
                IAdvisorBll = null;
                break;
                #endregion

                #region  宾访谈
            case PartTypes.宾访谈:
                EyouSoft.IBLL.CommunityStructure.IHonoredGuest         IGuestBll = EyouSoft.BLL.CommunityStructure.HonoredGuest.CreateInstance();
                IList <EyouSoft.Model.CommunityStructure.HonoredGuest> GuestList = IGuestBll.GetTopNumList(TopNumber);
                if (GuestList != null && GuestList.Count > 0)
                {
                    foreach (EyouSoft.Model.CommunityStructure.HonoredGuest model in GuestList)
                    {
                        strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc; margin-top:5px; padding-bottom:2px;\">");
                        strInfoHtml.Append("<tr>");
                        strInfoHtml.AppendFormat("<td width=\"30%\"><img src=\"{0}\" width=\"50\" height=\"50\" /></td>", FileServerUrl + model.ImgThumb);
                        strInfoHtml.AppendFormat("<td width=\"70%\" valign=\"top\" style=\"text-align:left\"><strong title=\"{2}\">{0}</strong><br /><div style=\"margin-top:2px; color:#585858;\">{1}<br />", Utils.GetText(model.Title, 13), Utils.GetText(model.Content, 13), model.Title);
                        strInfoHtml.AppendFormat("<span class=\"lanse\"><a href=\"/SupplierInfo/HonoredGuestInfo.aspx?id={0}\">[详细]</a></span></div></td>", model.ID);
                        strInfoHtml.Append("</tr>");
                        strInfoHtml.Append("</table>");
                    }
                }
                GuestList = null;
                break;
                #endregion

                #region  业之星访谈
            case PartTypes.业之星访谈:
                list = InfoBll.GetTopNumPicList(TopNumber, TopicClass, TopicArea, true, null);
                if (list != null && list.Count > 0)
                {
                    foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list)
                    {
                        strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc; margin-top:5px; padding-bottom:2px;\">");
                        strInfoHtml.Append("<tr>");
                        strInfoHtml.AppendFormat("<td width=\"30%\"><img src=\"{0}\" width=\"50\" height=\"50\" /></td>", FileServerUrl + model.ImgThumb);
                        strInfoHtml.AppendFormat("<td width=\"70%\" valign=\"top\" style=\"text-align:left\"><strong title=\"{2}\">{0}</strong><div style=\"margin-top:2px; color:#585858;\">{1}<br />", Utils.GetText(model.ArticleTitle, 26), "", model.ArticleTitle);
                        strInfoHtml.AppendFormat("<span class=\"lanse\"><a target=\"_blank\" href=\"/SupplierInfo/ArticleInfo.aspx?id={0}\">[详细]</a></span></div></td>", model.ID);
                        strInfoHtml.Append("</tr>");
                        strInfoHtml.Append("</table>");
                    }
                }
                list = null;
                break;
                #endregion
            }
            mainDiv.Controls.Add(new LiteralControl(string.Format(PicListHtmlFormat, PartCss, PartText, PartType == PartTypes.顾问团队 ? "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"/SupplierInfo/ApplicationTeam.aspx\" target=\"_blank\" class=\"heise12\">访谈申请</a>" : string.Empty, TextCss.Length > 0 ? " class=" + TextCss : "", strInfoHtml.ToString())));
        }