Example #1
0
        private void Menus_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var menu = Menus.SelectedValue;
            var mdvm = MenuDataVM.GetInstanse();

            mdvm.SetDishes();
            mdvm.SetMenus();

            mdvm.SelectedMenu = (Models.Entities.Menu)menu;
            mdvm.GetDishes();
        }
Example #2
0
        private void Dishes_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var dish = Dishes.SelectedValue;
            var mdvm = MenuDataVM.GetInstanse();

            mdvm.SetDishItems();
            mdvm.SetDishes();

            mdvm.SelectedDish = (Models.Entities.Dish)dish;
            mdvm.GetDishItems();
        }
Example #3
0
        private DataVM()
        {
            #region CreateListOfPages
            MenuItemsData = new ObservableCollection <MenuItemDataVM>()
            {
                new MenuItemDataVM("Дети", ChildrenDataVM.GetInstanse()),
                new MenuItemDataVM("Шаблоны меню", MenuDataVM.GetInstanse()),
                new MenuItemDataVM("Сотрудники", EmployeeDataVM.GetInstanse()),
                new MenuItemDataVM("Пользователи", UserDataVM.GetInstanse()),
                new MenuItemDataVM("Поставщики", SupplierDataVM.GetInstanse()),
                new MenuItemDataVM("Продукты", ProductsDataVM.GetInstanse()),
                new MenuItemDataVM("Накладные", InvoiceDataVM.GetInstanse()),
                new MenuItemDataVM("Партии", PartyDataVM.GetInstanse()),
                new MenuItemDataVM("Документы", DocumentDataVM.GetInstanse())
            };
            #endregion //CreateListOfPages

            #region CreateEventClickButton

            backspaceButton      = () => { };
            BackspaceButtonClick = new MenuItemDataCommand(Backspace_btn_click);

            #endregion //CreateEventClickButton
        }
Example #4
0
 public MenuData()
 {
     InitializeComponent();
     DataContext = MenuDataVM.GetInstanse();
 }