-
Notifications
You must be signed in to change notification settings - Fork 0
/
onepage.aspx.cs
55 lines (47 loc) · 1.61 KB
/
onepage.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using QianZhu.BLL;
using QianZhu.Model;
using QianZhu.Utility;
public partial class onepage : System.Web.UI.Page
{
//建立业务逻辑层实例
private GlobalConfig bll_config = new GlobalConfig();
private OnePage bll_onePage = new OnePage();
private AdFixed bll_adFixed = new AdFixed();
protected AdFixedModel ad6 = new AdFixedModel(); //banner
public OnePageModel model = null;
private SiteMenu bll_siteMenu = new SiteMenu(); //菜单
protected List<SiteMenuModel> SiteMenuList = new List<SiteMenuModel>();
protected List<AdFixedModel> adFixedList = new List<AdFixedModel>(); //轮播
protected void Page_Load(object sender, EventArgs e)
{
model = bll_onePage.GetModel(Request.QueryString["pkid"]);
if (model == null || !model.Enabled) WebUtility.Goto404();
if (!Page.IsPostBack)
{
BindInfo();
}
banner1.kind = 26;
Right1.kind = 2;
Right1.menu =model.Pkid;
Master.Index = 3;
}
/// <summary>
/// 绑定信息
/// </summary>
private void BindInfo()
{
//Title
bll_config.Load(new string[] { "pageTitle" });
if (!String.IsNullOrEmpty(model.PageTitle)) Page.Title = model.PageTitle;
else Page.Title = model.Title + " - " + bll_config["pageTitle"];
//KeyWord
WebUtility.CreateMeta(Page, "keywords", model.Keywords);
//Description
WebUtility.CreateMeta(Page, "description", model.Descn);
}
}