Beispiel #1
0
 public AllCategories(Recipes _Recipes)
 {
     InitializeComponent();
     LoadAllCategories();
     recipe = _Recipes;
 }
 public AllRecipes(Recipes _recipes)
 {
     InitializeComponent();
     LoadToGrid();
     recipes = _recipes;
 }
        private void ListViewMenu_SelectionChanged(object sender, MouseButtonEventArgs e)
        {
            if ((sender as ListView).SelectedItems.Count > 0)
            {
                BackGroundImage.Visibility = Visibility.Hidden;
                UserControl usc = null;
                GridMain.Children.Clear();

                try
                {
                    switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
                    {
                    case "Items":
                        usc = new Food_Cost.NewItems_Food_Cost();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Items";
                        break;

                    case "PurchaseOrder":
                        usc = new PurchaseOrder();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Purchase Orders";
                        break;

                    case "RecieveOrder":
                        usc = new RecieveOrder();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Recieve Orders";
                        break;


                    case "Transfer_Kitchen":
                        usc = new Transfer_Kitchens();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Transfer Kitchen";
                        break;

                    case "Transfer_Resturant":
                        usc = new Transfer_Resturant();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Transfer Restaurant";
                        break;

                    case "Inventory":
                        usc = new Store_Sertup();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Restaurants";
                        break;

                    case "Vendors":
                        usc = new Vendors();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Vendors";
                        break;

                    case "KitcheItemsn":
                        usc = new KitcheItemsn();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Kitchen Items";
                        break;

                    case "Recipes":
                        usc = new Recipes();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Recipes";
                        break;

                    case "GenerateBatch":
                        usc = new GenerateBatch();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Generate Batch";
                        break;


                    case "CategoriesAndSub":
                        usc = new CategoriesAndSub();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Recipe Category And Recipe SUbCategory";
                        break;

                    case "ProcessBulkItems":
                        usc = new ProcessBulkItem();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Process Bulk Items";
                        break;

                    case "Adjustment":
                        usc = new AdjacmentInventory();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "adjustment";
                        break;

                    case "AdjustmentReasons":
                        usc = new AdjacmentsReasons();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "adjustment Reason";
                        break;

                    case "StockInventory":
                        usc = new StockInventory();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Stock Inventory";
                        break;

                    case "PhysicalInventory":
                        usc = new PhysicalInventory();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Physical Inventory";
                        break;

                    case "OutletRecipeSubtraction":
                        usc = new OutletRecipeSubtraction();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "POS Recipe Subtraction";
                        break;

                    case "Users":
                        usc = new Users();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "User";
                        break;

                    case "Units":
                        usc = new Units();
                        GridMain.Children.Add(usc);
                        NameofForm.Text = "Units";
                        break;

                    case "CenterSetup":
                        setup window = new setup();
                        window.Owner = this;
                        window.ShowDialog();
                        NameofForm.Text = "Setup Center";
                        break;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }