public void addUcMenuGroup(int categoryID, int CurrentPage) { if (categoryID > 0) { if (this.totalPage == 0) { this.totalPage = CatalogeService.GetProductByCategoryID(categoryID).Count(); } var productlist = CatalogeService.GetProductByCategoryID(categoryID, CurrentPage); this.CurrentPage = CurrentPage; if (productlist.Count() > 0) { flpGroup.Controls.Clear(); foreach (var item in productlist) { UCProductIncl ucProductIncl = new UCProductIncl(); ucProductIncl.lblNameGroupIncl.Text = item.ProductNameDesc; ucProductIncl.Tag = item; flpGroup.Controls.Add(ucProductIncl); } addButton(categoryID); backButton(categoryID); nextButton(categoryID); } else { addButton(categoryID); } } }
public void addUcPermission(int departmentid) { if (departmentid > 0) { var submenulist = UserService.GetSubMenuByDepartment(departmentid).ToList(); if (submenulist.Count > 0) { for (int i = 0; i < submenulist.Count; i++) { UCProductIncl subMenuList = new UCProductIncl(); subMenuList.lblNameGroupIncl.Text = submenulist[i].SubMenuName; subMenuList.Tag = submenulist[i]; // ucProductIncl[i].Click += UCGroupList_Click flpPermission.Controls.Add(subMenuList); } } } }