Example #1
0
        private void MenuItemsControl_Load(object sender, EventArgs e)
        {
            menuList = new ChattersLib.ChattersDBLists.MenuList();
            menuList.GetAll();

            menuListFilter = new ChattersLib.ChattersDBLists.MenuList();
            menuListFilter.Insert(0, new ChattersLib.ChattersDBBusiness.Menu() { ID = 0, Title = "All" });

            menuList.ForEach(x =>
            {
                menuListFilter.Add(x);
            });

            menuList.Insert(0, new ChattersLib.ChattersDBBusiness.Menu() { ID = 0, Title = "None" });

            menuListBindingSource.DataSource = menuList;
            menuListBindingSourceFilter.DataSource = menuListFilter;

            menuItemList = new ChattersLib.ChattersDBLists.MenuItemList();
            menuItemList.GetAll();
            ConvertToView();

            menuItemListBindingSource.DataSource = menuItemList;

            refresh();
        }
Example #2
0
        public MenuItemsControl()
        {
            InitializeComponent();

            menuList = new ChattersLib.ChattersDBLists.MenuList();
            menuList.GetAll();

            menuListFilter = new ChattersLib.ChattersDBLists.MenuList();
            menuListFilter.Insert(0, new ChattersLib.ChattersDBBusiness.Menu() { ID = 0, Title = "All" });

            menuList.ForEach(x =>
                {
                    menuListFilter.Add(x);
                });

            menuList.Insert(0, new ChattersLib.ChattersDBBusiness.Menu() { ID = 0, Title = "None" });

            menuListBindingSource.DataSource = menuList;
            menuListBindingSourceFilter.DataSource = menuListFilter;

            menuItemList = new ChattersLib.ChattersDBLists.MenuItemList();
            menuItemList.GetAll();
            ConvertToView();

            menuItemListBindingSource.DataSource = menuItemList;
        }
Example #3
0
        internal void ResetMenus()
        {
            menuList = new ChattersLib.ChattersDBLists.MenuList();
            menuList.GetAll();
            menuList.Insert(0, new ChattersLib.ChattersDBBusiness.Menu() { ID = 0, Title = "None" });

            menuListBindingSource.DataSource = menuList;
        }