Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        WebUtility.AdminLoginAuth();

        pageSection = bll_pageSection.GetModel(Request.QueryString["pkid"]);
        if (pageSection == null)
        {
            pageSection = new PageSectionModel();
        }

        if (!Page.IsPostBack)
        {
            BindInfo();
        }
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        WebUtility.AdminLoginAuth();
        if (!bll_admin.RuleAuth("页面_局部版面"))
        {
            WebUtility.ShowError(WebUtility.ERROR101);
        }

        pageSection = bll_pageSection.GetModel(Request.QueryString["pkid"]);
        if (pageSection == null)
        {
            WebUtility.ShowError(WebUtility.ERROR102);
        }

        if (!Page.IsPostBack)
        {
            BindInfo();
        }
    }
Ejemplo n.º 4
0
    /// <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);
    }
Ejemplo n.º 5
0
    /// <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);
    }