protected void Page_Load(object sender, EventArgs e) { WebUtility.AdminLoginAuth(); group = bll_adGroup.GetModel(Request.QueryString["gid"]); if (group == null) { WebUtility.ShowError(WebUtility.ERROR102); } if (!bll_admin.RuleAuth("广告_" + group.Title)) { WebUtility.ShowError(WebUtility.ERROR101); } imageSpec = new Filespec().GetModelByCode("image"); if (imageSpec == null) { WebUtility.ShowError(WebUtility.ERROR103); } adFixed = bll_adFixed.GetModel(Request.QueryString["pkid"]); if (adFixed == null) { adFixed = new AdFixedModel(); } if (!Page.IsPostBack) { BindInfo(); } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { AdFixedModel adFixed = (AdFixedModel)e.Item.DataItem; if (group.Display == 0) { ((HtmlTableCell)e.Item.FindControl("Eval_Pic")).InnerHtml = "<div class=\"pic\"><a href=\"" + adFixed.Url + "\" target=\"_blank\"><img src=\"" + adFixed.Pic + "\" /></a></div>"; } else { e.Item.FindControl("Eval_Pic").Visible = false; } ((HtmlTableCell)e.Item.FindControl("Eval_Title")).InnerHtml = adFixed.Title + "<br /><span class=\"gray\">" + QianZhu.Utility.StringHelper.CutString(adFixed.Notes, 70, "..") + "</span>"; ((HtmlTableCell)e.Item.FindControl("Eval_Status")).InnerHtml = bll_adFixed.GetStatus(adFixed, "enab"); if (group.Inbuilt) { ((HtmlTableCell)e.Item.FindControl("Eval_CreateTime")).InnerText = "[ 系统内置 ]"; } else { ((HtmlTableCell)e.Item.FindControl("Eval_CreateTime")).InnerText = DateHelper.ToShortDate(adFixed.CreateTime); } e.Item.FindControl("Eval_Del").Visible = !group.Inbuilt; }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { AdFixedModel adFixed = (AdFixedModel)e.Item.DataItem; if (String.IsNullOrEmpty(adFixed.Pic)) { ((HtmlTableCell)e.Item.FindControl("Eval_Pic")).InnerHtml = "无图"; } else { ((HtmlTableCell)e.Item.FindControl("Eval_Pic")).InnerHtml = "<div class=\"pic\"><a href=\"" + adFixed.Url + "\" target=\"_blank\"><img src=\"" + adFixed.Pic + "\" /></a></div>"; } ((HtmlTableCell)e.Item.FindControl("Eval_Title")).InnerHtml = adFixed.Title + "<br /><span class=\"gray\">" + adFixed.Notes + "</span>"; ((HtmlTableCell)e.Item.FindControl("Eval_GroupName")).InnerHtml = bll_adGroup.GetTitle(adFixed.GroupId); ((HtmlTableCell)e.Item.FindControl("Eval_Status")).InnerHtml = bll_adFixed.GetStatus(adFixed, "enab"); ((HtmlTableCell)e.Item.FindControl("Eval_CreateTime")).InnerText = DateHelper.ToShortDate(adFixed.CreateTime); }
protected List <ArticleModel> articleList2 = new List <ArticleModel>(); //考试心得 protected void Page_Load(object sender, EventArgs e) { ad = bll_adFixed.GetModel(1); ad1 = bll_adFixed.GetModel(46); ad2 = bll_adFixed.GetModel(47); ad6 = bll_adFixed.GetModel(5); ad7 = bll_adFixed.GetModel(23); ad8 = bll_adFixed.GetModel(24); ad9 = bll_adFixed.GetModel(25); ad10 = bll_adFixed.GetModel(90); ad11 = bll_adFixed.GetModel(91); ad12 = bll_adFixed.GetModel(92); pageSection = bll_pageSection.GetModel(4); siteMenu = bll_siteMenu.GetModel(kind); List <string> fieldList = new List <string>(); fieldList.Add(SiteMenuModel.PKID); fieldList.Add(SiteMenuModel.TITLE); fieldList.Add(SiteMenuModel.URL); fieldList.Add(SiteMenuModel.TARGET); fieldList.Add(SiteMenuModel.RELATION); fieldList.Add(SiteMenuModel.RELATIONID); fieldList.Add(SiteMenuModel.HASCHILD); List <SqlWhere> sqlWhereList = new List <SqlWhere>(); sqlWhereList.Add(new SqlWhere(SiteMenuModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(SiteMenuModel.FATHERID, SqlWhere.Oper.Equal, kind)); SiteMenuList = bll_siteMenu.GetList(1, 0, fieldList, sqlWhereList, null); // 考试资讯 fieldList.Clear(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.ISHEAD); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.Equal, "16")); articleList2 = bll_article.GetList(1, 5, fieldList, sqlWhereList, null); }
protected void Page_Load(object sender, EventArgs e) { if (!bll_member.IdentityAuth()) { WebUtility.ShowAlertMessage("请登录!", "/login.html"); } member = bll_member.GetModelByCookie(); rank = member.ProvinceId + 33; try { ad6 = bll_adFixed.GetModel(rank); } catch (Exception) { ad6 = new AdFixedModel(); ad6.Pic = ""; } }
/// <summary> /// 绑定信息 /// </summary> private void BindInfo() { List <SqlWhere> sqlWhereList = new List <SqlWhere>(); //Head script if (!String.IsNullOrEmpty(bll_config["headScript"])) { HtmlGenericControl script = new HtmlGenericControl(); script.InnerHtml = bll_config["headScript"]; Page.Header.Controls.Add(script); } //Foot script bll_config["footScript"] += "\n" + bll_config.CheckPageEnabled(); //固定广告位 ad1 = bll_adFixed.GetModel(1); //qq ad2 = bll_adFixed.GetModel(2); //电话 ad3 = bll_adFixed.GetModel(3); //邮箱 ad4 = bll_adFixed.GetModel(4); //微博 ad5 = bll_adFixed.GetModel(6); //热线 ad6 = bll_adFixed.GetModel(5); //微信 ad7 = bll_adFixed.GetModel(100); //咨询2 pageSection = bll_pageSection.GetModel(1); //Main Menu List <string> fieldList = new List <string>(); fieldList.Add(SiteMenuModel.PKID); fieldList.Add(SiteMenuModel.TITLE); fieldList.Add(SiteMenuModel.URL); fieldList.Add(SiteMenuModel.TARGET); fieldList.Add(SiteMenuModel.RELATION); fieldList.Add(SiteMenuModel.RELATIONID); fieldList.Add(SiteMenuModel.HASCHILD); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(SiteMenuModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(SiteMenuModel.FATHERID, SqlWhere.Oper.Equal, 19)); SiteMenuList = bll_siteMenu.GetList(1, 10, fieldList, sqlWhereList, null); }
protected void Page_Load(object sender, EventArgs e) { WebUtility.AdminLoginAuth(); thumSpec = new Filespec().GetModelByCode("thum"); imageSpec = new Filespec().GetModelByCode("image"); if (thumSpec == null || imageSpec == null) { WebUtility.ShowError(WebUtility.ERROR103); } adFixed = bll_adFixed.GetModel(Request.QueryString["pkid"]); if (adFixed == null) { adFixed = new AdFixedModel(); } if (!Page.IsPostBack) { BindInfo(); } }
/// <summary> /// 绑定信息 /// </summary> private void BindInfo() { string words = Request.QueryString["words"]; //Title bll_config.Load(new string[] { "pageTitle" }); if (String.IsNullOrEmpty(words)) { Page.Title = "搜索结果 - " + bll_config["pageTitle"]; } else { Page.Title = "搜索结果 - " + bll_config["pageTitle"]; } //组合查询条件 List <SqlWhere> sqlWhereList = new List <SqlWhere>(); sqlWhereList.Add(new SqlWhere(SearchIndexModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(SearchIndexModel.TITLE, SqlWhere.Oper.Like, words)); //读取分页数据 int iRecordsTotal = bll_searchIndex.DoCount(sqlWhereList); string homePage = "/search/"; if (!String.IsNullOrEmpty(words)) { homePage += "w-" + HttpUtility.UrlEncode(words) + "/"; } QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, homePage + "page-$p/", false); pagination.HomePage = homePage; Paging.InnerHtml = pagination.Show(); List <SearchIndexModel> searchIndexList = bll_searchIndex.GetList(pagination.PageIndex, iPageSize, sqlWhereList); //绑定文章数据 Repeater1.DataSource = searchIndexList; Repeater1.DataBind(); ad6 = bll_adFixed.GetModel(18); }
protected AdFixedModel ad6 = new AdFixedModel(); // protected void Page_Load(object sender, EventArgs e) { ad6 = bll_adFixed.GetModel(kind); }
/// <summary> /// 绑定信息 /// </summary> private void BindInfo() { bll_config.Load(new string[] { "pageTitle", "keywords", "descn", "video" }); //Title Page.Title = bll_config["pageTitle"]; //KeyWord WebUtility.CreateMeta(Page, "keywords", bll_config["keywords"]); //Description WebUtility.CreateMeta(Page, "description", bll_config["descn"]); video = bll_config["video"]; //局部页面 ad4 = bll_adFixed.GetModel(41); ad5 = bll_adFixed.GetModel(42); ad6 = bll_adFixed.GetModel(43); ad7 = bll_adFixed.GetModel(44); ad8 = bll_adFixed.GetModel(49); ad9 = bll_adFixed.GetModel(50); ad10 = bll_adFixed.GetModel(51); ad11 = bll_adFixed.GetModel(52); ad12 = bll_adFixed.GetModel(53); ad13 = bll_adFixed.GetModel(54); pageSection = bll_pageSection.GetModel(2); pageSection1 = bll_pageSection.GetModel(3); //轮播 List <SqlWhere> sqlWhereList = new List <SqlWhere>(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 9)); adFixedList = bll_adFixed.GetList(sqlWhereList); //内训案例 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 10)); adFixedList1 = bll_adFixed.GetList(1, 0, sqlWhereList); //专家 List <string> fieldList = new List <string>(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.ISORT); fieldList.Add(ArticleModel.ISTOP); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); //sqlWhereList.Add(new SqlWhere(ArticleModel.ISTOP, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.Equal, "12")); articleList = bll_article.GetList(1, 6, fieldList, sqlWhereList, null); // 内训 categoryList = bll_category.GetListByFatherId(10); //热门课程 fieldList.Clear(); fieldList.Add(ProductModel.ISORT); fieldList.Add(ProductModel.ISTOP); fieldList.Add(ProductModel.PKID); fieldList.Add(ProductModel.TITLE); fieldList.Add(ProductModel.PUBDATE); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ProductModel.ISHOT, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ProductModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ProductModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds("10"))); productList1 = bll_product.GetList(1, 7, fieldList, sqlWhereList, null); }
/// <summary> /// 绑定信息 /// </summary> private void BindInfo() { bll_config.Load(new string[] { "pageTitle", "keywords", "descn", "video" }); //Title Page.Title = bll_config["pageTitle"]; //KeyWord WebUtility.CreateMeta(Page, "keywords", bll_config["keywords"]); //Description WebUtility.CreateMeta(Page, "description", bll_config["descn"]); video = bll_config["video"]; //局部页面 ad4 = bll_adFixed.GetModel(7); ad5 = bll_adFixed.GetModel(8); ad6 = bll_adFixed.GetModel(9); ad7 = bll_adFixed.GetModel(10); ad8 = bll_adFixed.GetModel(11); ad9 = bll_adFixed.GetModel(12); ad10 = bll_adFixed.GetModel(13); ad11 = bll_adFixed.GetModel(14); ad12 = bll_adFixed.GetModel(1); //ad13 = bll_adFixed.GetModel(18); //pageSection = bll_pageSection.GetModel(2); //pageSection1 = bll_pageSection.GetModel(3); //pageSection2 = bll_pageSection.GetModel(7); //轮播 List <SqlWhere> sqlWhereList = new List <SqlWhere>(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 3)); adFixedList = bll_adFixed.GetList(sqlWhereList); //中部轮播小图 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 5)); adFixedList1 = bll_adFixed.GetList(1, 0, sqlWhereList); //底部轮播小图 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 6)); adFixedList3 = bll_adFixed.GetList(1, 0, sqlWhereList); //合作伙伴 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 7)); adFixedList4 = bll_adFixed.GetList(1, 0, sqlWhereList); //友情链接 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 2)); adFixedList5 = bll_adFixed.GetList(1, 0, sqlWhereList); //首页CMA考试 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 8)); adFixedList6 = bll_adFixed.GetList(1, 0, sqlWhereList); //新闻资讯 List <string> fieldList = new List <string>(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.ISORT); fieldList.Add(ArticleModel.ISTOP); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); //sqlWhereList.Add(new SqlWhere(ArticleModel.ISTOP, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds("3"))); articleList = bll_article.GetList(1, 5, fieldList, sqlWhereList, null); // 装修案例 //categoryList = bll_category.GetListByFatherId(2); // 考试资讯 fieldList.Clear(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.ISHEAD); fieldList.Add(ArticleModel.ISORT); fieldList.Add(ArticleModel.ISTOP); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.Equal, "16")); articleList1 = bll_article.GetList(1, 5, fieldList, sqlWhereList, null); // 考试心得 fieldList.Clear(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.ISORT); fieldList.Add(ArticleModel.ISTOP); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.Equal, "4")); articleList2 = bll_article.GetList(1, 5, fieldList, sqlWhereList, null); // 精彩视频 fieldList.Clear(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.ISORT); fieldList.Add(ArticleModel.ISTOP); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.Equal, "8")); articleList3 = bll_article.GetList(1, 10, fieldList, sqlWhereList, null); //管理会计俱乐部 fieldList.Clear(); fieldList.Add(ArticleModel.PKID); fieldList.Add(ArticleModel.TITLE); fieldList.Add(ArticleModel.PIC); fieldList.Add(ArticleModel.ISORT); fieldList.Add(ArticleModel.ISTOP); fieldList.Add(ArticleModel.FILES); fieldList.Add(ArticleModel.PUBDATE); fieldList.Add(ArticleModel.CREATETIME); sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.Equal, "15")); articleList4 = bll_article.GetList(1, 8, fieldList, sqlWhereList, null); //课程 sqlWhereList.Clear(); sqlWhereList.Add(new SqlWhere(CourseModel.ENABLED, SqlWhere.Oper.Equal, true)); CourseList = bll_course.GetList(1, 5, null, sqlWhereList, null); // 业绩 //fieldList.Clear(); //fieldList.Add(ProductModel.PKID); //fieldList.Add(ProductModel.TITLE); //fieldList.Add(ProductModel.PIC); //sqlWhereList.Clear(); //sqlWhereList.Add(new SqlWhere(ProductModel.ISHOT, SqlWhere.Oper.Equal, true)); //sqlWhereList.Add(new SqlWhere(ProductModel.ENABLED, SqlWhere.Oper.Equal, true)); //sqlWhereList.Add(new SqlWhere(ProductModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds("5"))); //productList1 = bll_product.GetList(1, 5, fieldList, sqlWhereList, null); }