Ejemplo n.º 1
0
        public void Refresh()
        {
            AddedMenuItems.Clear();
            if (CurrentScreenMenu == null)
            {
                CurrentScreenMenu = AppServices.MainDataContext.SelectedDepartment != null
                    ? AppServices.DataAccessService.GetScreenMenu(AppServices.MainDataContext.SelectedDepartment.TerminalScreenMenuId)
                    : null;

                if (CurrentScreenMenu != null)
                {
                    Categories.Clear();
                    Categories.AddRange(CurrentScreenMenu.Categories.OrderBy(x => x.Order)
                                        .Where(x => !x.MostUsedItemsCategory)
                                        .Select(x => new ScreenCategoryButton(x, CategorySelectionCommand)));
                    MostUsedItemsCategory = CurrentScreenMenu.Categories.FirstOrDefault(x => x.MostUsedItemsCategory);

                    if (MostUsedItemsCategory != null)
                    {
                        CreateMenuItemButtons(MostUsedMenuItems, MostUsedItemsCategory, CurrentPageNo, CurrentTag);
                    }

                    if (Categories.Count > 0)
                    {
                        UpdateMenuButtons(Categories[0].Category);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void CloseView()
 {
     AddedMenuItems.Clear();
 }