/
index.aspx.cs
104 lines (86 loc) · 3.27 KB
/
index.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
public partial class _index : myBase
{
protected int pageVal = 1;
protected int navid = 1;
protected string leftString = string.Empty;
protected PageModel pageModel = new PageModel();
protected string description = string.Empty;
protected string description_title = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
switch (UserState.lng)
{
case "cn":
pageVal = 1;
break;
case "kr":
pageVal = 2;
break;
case "en":
pageVal = 3;
break;
}
pageModel = new myBase().initpage(pageVal);
navid = light.Common.DNTRequest.GetQueryInt("id", 0);
if (navid > 0)
{
leftString = getLeftString(navid);
}
else
{
Response.Redirect("default.aspx");
}
}
private string getLeftString(int navid)
{
StringBuilder sb = new StringBuilder();
string title = string.Empty;
string list = string.Empty;
if (navid == 1)
{
title = pageModel._企业介绍;
list = base.leftnav(pageVal);
description = base.getCompanyInfi(pageVal);
}
else if (navid == 2)
{
title = pageModel._新闻分类;
list = base.newsCategory(pageVal);
description = base.newsAllList(pageVal);
}
else if (navid == 3)
{
title = pageModel._产品分类;
list = base.procategoryList(pageVal);
description = base.prodouctList(pageVal);
}
else
{
title = pageModel._企业介绍;
list = base.leftnav(pageVal);
description = base.leftInfo(pageVal);
}
sb.AppendLine(@" <table style=""z-index: 100"" border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">");
sb.AppendLine(@" <tbody>");
sb.AppendLine(@" <tr>");
sb.AppendLine(@" <td style=""padding-left: 45px; color: #ffffff; font-size: 14px; font-weight: bold""");
sb.AppendLine(@" height=""39"" background=""/images/title.jpg"">" + title);
sb.AppendLine(@" </td>");
sb.AppendLine(@" </tr>");
sb.AppendLine(@" <tr>");
sb.AppendLine(@" <td style=""padding-bottom: 2px; padding-left: 5px; padding-right: 5px; padding-top: 2px""");
sb.AppendLine(@" valign=""top"">");
sb.AppendLine(@" " + list);
sb.AppendLine(@" </td>");
sb.AppendLine(@" </tr>");
sb.AppendLine(@" </tbody>");
sb.AppendLine(@" </table>");
return sb.ToString();
}
}