2 using System
.Collections
.Generic
;
6 using System
.Web
.UI
.WebControls
;
7 using PumpkinHouseDatabase
;
9 namespace PumpkinHouse
.Admin
11 public partial class FilterStat
: System
.Web
.UI
.Page
13 protected void Page_Load(object sender
, EventArgs e
)
17 protected void StartCalc(object sender
, EventArgs e
)
19 Dictionary
<string, int> dictMode
= new Dictionary
<string, int>();
20 Dictionary
<string, int> dictCommodity
= new Dictionary
<string, int>();
21 Dictionary
<string, int> dictTag
= new Dictionary
<string, int>();
23 dictMode
.Add("Default", 0);
24 dictMode
.Add("Hot", 0);
25 dictMode
.Add("Latest", 0);
27 dictCommodity
.Add("True", 0);
28 dictCommodity
.Add("False", 0);
30 using (DataUtils utils
= new DataUtils())
32 List
<DB_User_Action
> actions
= ((Stat
)Master
).FindAction(utils
, UserActionType
.SearchByTag
);
34 foreach (var action
in actions
)
36 string[] split
= action
.Action_Content
.Split(':');
38 dictCommodity
[split
[1]]++;
40 if (!dictTag
.ContainsKey(split
[2]))
42 dictTag
.Add(split
[2], 1);
51 dictMode
.Add("默认", dictMode
["Default"]);
52 dictMode
.Add("最新", dictMode
["Latest"]);
53 dictMode
.Add("热门", dictMode
["Hot"]);
55 dictMode
.Remove("Default");
56 dictMode
.Remove("Latest");
57 dictMode
.Remove("Hot");
59 dictCommodity
.Add("是", dictCommodity
["True"]);
60 dictCommodity
.Add("否", dictCommodity
["False"]);
62 dictCommodity
.Remove("True");
63 dictCommodity
.Remove("False");
65 ModeGridView
.DataSource
= dictMode
;
66 ModeGridView
.DataBind();
68 CommodityGridView
.DataSource
= dictCommodity
;
69 CommodityGridView
.DataBind();
71 TagGridView
.DataSource
= dictTag
;
72 TagGridView
.DataBind();