public void GetFirstMemu() { Chain.BLL.SysGroup bllGroup = new Chain.BLL.SysGroup(); DataTable dt = bllGroup.GetGroupAuthority("GroupID=" + this.UserModel.UserGroupID + " and ActionValue=1 and ModuleVisible=1 and ModuleParentID=0 order by ModuleOrder asc").Tables[0]; this.rptFirstMenu.DataSource = dt; this.rptFirstMenu.DataBind(); }
protected void rptFirstMenu_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView dr = (DataRowView)e.Item.DataItem; Repeater rptItem = (Repeater)e.Item.FindControl("rptSecondMenu"); if (rptItem != null) { Chain.BLL.SysGroup bllGroup = new Chain.BLL.SysGroup(); DataTable dt = bllGroup.GetGroupAuthority(string.Concat(new object[] { "GroupID=", this.UserModel.UserGroupID, " and (ActionControl='module' OR ActionControl='page') and ActionValue=1 and ModuleVisible=1 and ModuleParentID=", dr["ModuleID"], " order by ModuleOrder asc" })).Tables[0]; rptItem.DataSource = dt; rptItem.DataBind(); } } }