12345678910111213141516171819202122232425262728293031 |
- using System.Linq;
- using System.Windows;
- using Cafe.AddWindows;
- namespace Cafe.ElementsWindows
- {
- public partial class DishWindow : Window
- {
- public DishWindow(int id)
- {
- InitializeComponent();
- Dishes dish = Connection.db.Dishes.Where(item => item.ID == id).FirstOrDefault();
- Name.Content = dish.Name;
- Price.Content = dish.Price;
- Description.Content = dish.Description;
- Picture.Source = ImagesManip.NewImage(dish);
- }
- private void BackButtonClick(object sender, RoutedEventArgs e)
- {
- AddOrderWindow addOrderWindow = new AddOrderWindow();
- addOrderWindow.Show();
- this.Close();
- }
- }
- }
|