コード例 #1
0
        protected void DataListInit()
        {
            EyouSoft.Model.SystemStructure.ProductSuggestionType pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.商铺;
            switch (this.hiddenType.Value)
            {
            case "1": pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.商铺; break;

            case "2": pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.MQ; break;

            case "3": pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.平台; break;

            case "4":
                this.ddlType.Visible = true;
                if (ddlType.SelectedValue == "1")
                {
                    pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.个人中心;
                }
                else
                {
                    pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.个人中心报价标准; break;
                }
                break;

            default: pst = EyouSoft.Model.SystemStructure.ProductSuggestionType.商铺; break;
            }
            //嘉宾申请反馈列表
            if (this.hiddenType.Value == "5")
            {
                this.divListSecond.Visible = true;
                this.divList.Visible       = false;
                this.lblMsgSecond.Visible  = false;
                EyouSoft.IBLL.CommunityStructure.ICommunityAdvisor         IBLL = EyouSoft.BLL.CommunityStructure.CommunityAdvisor.CreateInstance();
                IList <EyouSoft.Model.CommunityStructure.CommunityAdvisor> list = IBLL.GetCommunityAdvisorList(pageSize, pageIndex, ref recordCount, false);
                if (list != null && list.Count > 0)
                {
                    this.rptListScond.DataSource = list;
                    this.rptListScond.DataBind();
                    BindPage();
                    list = null;
                }
                else
                {
                    this.rptListScond.DataSource = null;
                    this.rptListScond.DataBind();
                    this.lblMsgSecond.Visible = true;
                }
                IBLL = null;
            }
            else
            {
                this.divListSecond.Visible = false;
                this.divList.Visible       = true;
                this.lblFristMsg.Visible   = false;
                EyouSoft.IBLL.SystemStructure.IProductSuggestion             IBll = EyouSoft.BLL.SystemStructure.ProductSuggestion.CreateInstance();
                IList <EyouSoft.Model.SystemStructure.ProductSuggestionInfo> list = IBll.GetSuggestions(pageSize, pageIndex, ref recordCount, Utils.EditInputText(this.cName.Value), Utils.EditInputText(this.uName.Value), Utils.EditInputText(this.searchVal.Value), pst);
                if (list != null && list.Count > 0)
                {
                    this.rptList.DataSource = list;
                    this.rptList.DataBind();
                    BindPage();
                }
                else
                {
                    this.rptList.DataSource = null;
                    this.rptList.DataBind();
                    this.lblFristMsg.Visible = true;
                }
                list = null;
                IBll = null;
            }
        }
コード例 #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())));
        }