1 public int intClassID;
2 public int ParentId = 0;
3 protected void Page_Load(object sender, EventArgs e)
4 {
5 intClassID = basic.Tools.RequestClass.GetQueryInt("ClassID", 0);
6 int intNewsId = basic.Tools.RequestClass.GetQueryInt("id", 0);
7 if (intClassID == 0&&intNewsId>0)
8 {
9 intClassID = Convert.ToInt32(mc.ShowNewsKeyById(intNewsId,"classid"));
10 }
11
12 if (intClassID > 0)
13 {
14 ParentId = intClassID;
15 int ParentId2 = 0;
16 while (ParentId > 0)
17 {
18 ParentId2 = ParentId;
19 ParentId = Convert.ToInt32(mc.ShowColumnKeyById(ParentId, "ParentId"));
20 }
21 ParentId = ParentId2;
22 }
23
24 }