ÎÂܰÌáʾ£º´úÂëÔÚÏßä¯ÀÀ¹¦ÄÜÖ»ÄÜ×öΪԴÂëä¯ÀÀ²Î¿¼£¬Èç¹ûÏë¸ü½øÒ»²½Á˽â¸Ã´úÂëÇëÏÂÔØ£ºSpaceBuilder v1.0Õýʽ°æÔ´Âë
µ±Ç°Îļþ£º
SpaceBuiderV10Source/BasicWebControls/Channel/AreaRepeater.cs£¬´ò¿ª´úÂë½á¹¹Í¼
SpaceBuiderV10Source/BasicWebControls/Channel/AreaRepeater.cs£¬´ò¿ª´úÂë½á¹¹Í¼1//------------------------------------------------------------------------------ 2
// <copyright company="Tunynet"> 3
// Copyright (c) Tunynet Network Technology Co., Ltd. All rights reserved. 4
// </copyright> 5
//------------------------------------------------------------------------------ 6
7
using System; 8
using System.Collections.Generic; 9
using System.Text; 10
using System.Web.UI.WebControls; 11
using System.Collections; 12
using SpaceBuilder.Components; 13
using System.Web.UI; 14
using SpaceBuilder.Events.Components; 15
using SpaceBuilder.Jobs.SiteUrls; 16
using SpaceBuilder.Utils; 17
using SpaceBuilder.Jobs.Components; 18
using SpaceBuilder.Rewards.Components; 19
using TunyNet.Utils; 20
21
namespace SpaceBuilder.Web.Controls 22
{ 23
public class AreaRepeater : Repeater 24
{ 25
private ArrayList areas; 26
private int loadedAreaCount = 0; // ÒѾ¼ÓÔØµÄµØÇøÊýÄ¿ 27
28
public void Bind() 29
{ 30
this.ItemDataBound += new RepeaterItemEventHandler(AreaRepeater_ItemDataBound); 31
32
areas = Statisticss.GetAreaStatisticss(this.AreaCode, this.SortBy, this.SortOrder, this.OnlyShowLeastArea); 33
34
if ((this.DisplayItemCount != -1) && (areas.Count > this.DisplayItemCount)) 35
areas = areas.GetRange(0, this.DisplayItemCount); 36
37
if (areas.Count > 0) 38
{ 39
this.DataSource = this.areas; 40
this.DataBind(); 41
} 42
else 43
{ 44
this.DataSource = null; 45
this.DataBind(); 46
} 47
} 48
49
protected override void Render(HtmlTextWriter writer) 50
{ 51
this.Bind(); 52
if (this.areas.Count > 0) 53
{ 54
base.Render(writer); 55
} 56
} 57
58
ʼþ 136
137
138
ÊôÐÔ 220
221
} 222
223
} 224





}
}