private void InitializeComponent() { this.EditUser.Click += new EventHandler(this.EditUser_Click); this.EditForum.Click += new EventHandler(this.EditForum_Click); this.EditUserGroup.Click += new EventHandler(this.EditUserGroup_Click); this.UpdateCache.Click += new EventHandler(this.UpdateCache_Click); this.CreateTemplate.Click += new EventHandler(this.CreateTemplate_Click); this.UpdateForumStatistics.Click += new EventHandler(this.UpdateForumStatistics_Click); //装入有效的模板信息项 foreach (DataRow dr in AdminTemplates.GetAllTemplateList(Utils.GetMapPath(@"..\..\templates\")).Rows) { if (dr["valid"].ToString() == "1") { Templatepath.Items.Add(new ListItem(dr["name"].ToString(), dr["directory"].ToString())); } } Username.AddAttributes("onkeydown", "if(event.keyCode==13) return(document.forms(0).EditUser.focus());"); Usergroupid.AddTableData(UserGroups.GetUserGroupForDataTable(), "grouptitle", "groupid"); }
private void InitializeComponent() { this.EditUser.Click += new EventHandler(this.EditUser_Click); this.EditForum.Click += new EventHandler(this.EditForum_Click); this.EditUserGroup.Click += new EventHandler(this.EditUserGroup_Click); this.UpdateCache.Click += new EventHandler(this.UpdateCache_Click); this.CreateTemplate.Click += new EventHandler(this.CreateTemplate_Click); this.UpdateForumStatistics.Click += new EventHandler(this.UpdateForumStatistics_Click); this.Load += new EventHandler(this.Page_Load); //装入有效的模板信息项 foreach (DataRow dr in AdminTemplates.GetAllTemplateList(AppDomain.CurrentDomain.BaseDirectory + "templates/").Rows) { if (dr["valid"].ToString() == "1") { Templatepath.Items.Add(new ListItem(dr["name"].ToString(), dr["directory"].ToString())); } } Username.AddAttributes("onkeydown", "if(event.keyCode==13) return(document.forms(0).EditUser.focus());"); Usergroupid.AddTableData(DatabaseProvider.GetInstance().GetUserGroupsStr()); }