示例#1
0
文件: UCMenu.cs 项目: pcthanh/POS
 public void addUcMenuGroup(int catalogueid, int CurrentPage)
 {
     if (catalogueid > 0)
     {
         if (this.totalPage == 0)
         {
             this.totalPage = CatalogeService.GetCategoryByCatalogueID(catalogueid).Count();
         }
         var data = CatalogeService.GetCategoryByCatalogueID(catalogueid, CurrentPage);
         this.CurrentPage = CurrentPage;
         if (data.Count() > 0)
         {
             flpIncludesGroup.Controls.Clear();
             foreach (var item in data)
             {
                 UCGroup ucGroup = new UCGroup();
                 ucGroup.lblNameGroup.Text = item.CategoryName;
                 ucGroup.Tag = item;
                 flpIncludesGroup.Controls.Add(ucGroup);
             }
             addButton(catalogueid);
             backButton(catalogueid);
             nextButton(catalogueid);
         }
         else
         {
             addButton(catalogueid);
         }
     }
 }
示例#2
0
文件: UCMenu.cs 项目: pcthanh/POSEZ2U
 public void addUcMenuGroup(int catalogueid, int CurrentPage)
 {
     if (catalogueid > 0)
     {
         if (this.totalPage == 0)
         {
             this.totalPage = CatalogeService.GetCategoryByCatalogueID(catalogueid).Count();
         }
         var data = CatalogeService.GetCategoryByCatalogueID(catalogueid, CurrentPage);
         this.CurrentPage = CurrentPage;
         if (data.Count() > 0)
         {
             flpIncludesGroup.Controls.Clear();
             foreach (var item in data)
             {
                 UCGroup ucGroup = new UCGroup();
                 ucGroup.lblNameGroup.Text = item.CategoryName;
                 ucGroup.Tag = item;
                 flpIncludesGroup.Controls.Add(ucGroup);
             }
             addButton(catalogueid);
             backButton(catalogueid);
             nextButton(catalogueid);
         }
         else
         {
             addButton(catalogueid);
         }
     }
 }
示例#3
0
        private void addUcMenuGroup()
        {
            string[] array = { "Coffee", "Smoothie", "Juice" };

            List<string> lst = new List<string>();
            foreach (string str in array)
            {
                lst.Add(str);
            }

            for (int i = 0; i < lst.Count; i++)
            {
                UCGroup ucGroup = new UCGroup();
                ucGroup.lblNameGroup.Text = lst[i].ToString();
                ucGroup.Tag = lst[i];
                ucGroup.Click += ucGroup_Click;
                flpIncludesGroup.Controls.Add(ucGroup);
            }
        }