Esempio n. 1
0
        public static List <DropDownList> showlistPagerodule()
        {
            ModeoutleddbContext db = new ModeoutleddbContext();
            var listg = db.Menus.OrderByDescending(m => m.Level).ToList();
            List <DropDownList> list = new List <DropDownList>();

            //list.Add(new DropDownList { value = "", text = "Trang chủ" });
            if (listg.Count > 0)
            {
                for (int i = 0; i < listg.Count; i++)
                {
                    list.Add(new DropDownList {
                        value = listg[i].Link, text = StringClass.ShowNameLevel(listg[i].Name, listg[i].Level)
                    });
                }
            }
            //list.Add(new DropDownList { value = "/thu-vien/", text = "Tài liệu" });
            //list.Add(new DropDownList { value = "/hoc-cung-doanh-nghiep/", text = "Liên hệ" });
            //list.Add(new DropDownList { value = "/dang-ky-online/", text = "Đăng ký Online" });

            return(list);
        }