diff --git a/Desktop/Supermarket/Supermarket/App.xaml b/Desktop/Supermarket/Supermarket/App.xaml
index 71333e8..cdd8952 100644
--- a/Desktop/Supermarket/Supermarket/App.xaml
+++ b/Desktop/Supermarket/Supermarket/App.xaml
@@ -2,8 +2,14 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Supermarket"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="MainWindow.xaml">
-
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Images/andrew-tate-2.jpg b/Desktop/Supermarket/Supermarket/Images/andrew-tate-2.jpg
new file mode 100644
index 0000000..b2fca24
Binary files /dev/null and b/Desktop/Supermarket/Supermarket/Images/andrew-tate-2.jpg differ
diff --git a/Desktop/Supermarket/Supermarket/Images/vecteezy_minimalist_banner_of_dark_and_yellow_horizontal_background.mp4 b/Desktop/Supermarket/Supermarket/Images/vecteezy_minimalist_banner_of_dark_and_yellow_horizontal_background.mp4
new file mode 100644
index 0000000..6021b42
Binary files /dev/null and b/Desktop/Supermarket/Supermarket/Images/vecteezy_minimalist_banner_of_dark_and_yellow_horizontal_background.mp4 differ
diff --git a/Desktop/Supermarket/Supermarket/MainWindow.xaml b/Desktop/Supermarket/Supermarket/MainWindow.xaml
index e1b2f67..254bee7 100644
--- a/Desktop/Supermarket/Supermarket/MainWindow.xaml
+++ b/Desktop/Supermarket/Supermarket/MainWindow.xaml
@@ -1,12 +1,109 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/MainWindow.xaml.cs b/Desktop/Supermarket/Supermarket/MainWindow.xaml.cs
index 720a159..79aa53d 100644
--- a/Desktop/Supermarket/Supermarket/MainWindow.xaml.cs
+++ b/Desktop/Supermarket/Supermarket/MainWindow.xaml.cs
@@ -1,13 +1,6 @@
-using System.Text;
+using Supermarket.Views;
using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
namespace Supermarket
{
@@ -20,5 +13,17 @@ public MainWindow()
{
InitializeComponent();
}
+
+ private void SignUp_Click(object sender, MouseButtonEventArgs e)
+ {
+ LeftGrid.Content = new SignUp();
+ }
+
+ private void Sign_Click(object sender, RoutedEventArgs e)
+ {
+ var signIn = new MarketMainWindow();
+ Window.GetWindow(this).Close();
+ signIn.Show();
+ }
}
}
\ No newline at end of file
diff --git a/Desktop/Supermarket/Supermarket/Models/Customer.cs b/Desktop/Supermarket/Supermarket/Models/Customer.cs
new file mode 100644
index 0000000..e2e7d40
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/Customer.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Supermarket.Models;
+
+public class Customer
+{
+ public int Id { get; set; }
+
+ [Required]
+ public string Password { get; set; }
+
+ public string FirstName { get; set; }
+ public string LastName { get; set; }
+
+ [Required]
+ public string Email { get; set; }
+
+ public string PhoneNumber { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime? ModifiedAt { get; set; }
+
+ public ICollection CustomerAddresses { get; set; }
+ public ICollection OrderDetails { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Models/CustomerAddress.cs b/Desktop/Supermarket/Supermarket/Models/CustomerAddress.cs
new file mode 100644
index 0000000..d0ca46e
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/CustomerAddress.cs
@@ -0,0 +1,15 @@
+namespace Supermarket.Models;
+
+public class CustomerAddress
+{
+ public int Id { get; set; }
+
+ public int CustomerId { get; set; }
+ public Customer Customer { get; set; }
+
+ public string AddressLine1 { get; set; }
+ public string? AddressLine2 { get; set; }
+ public string City { get; set; }
+ public string Country { get; set; }
+ public string PhoneNumber { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Models/OrderDetail.cs b/Desktop/Supermarket/Supermarket/Models/OrderDetail.cs
new file mode 100644
index 0000000..b3aaf4d
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/OrderDetail.cs
@@ -0,0 +1,15 @@
+namespace Supermarket.Models;
+
+public class OrderDetail
+{
+ public int Id { get; set; }
+
+ public int CustomerId { get; set; }
+ public Customer Customer { get; set; }
+
+ public decimal Total { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime? ModifiedAt { get; set; }
+
+ public ICollection OrderItems { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Models/OrderItem.cs b/Desktop/Supermarket/Supermarket/Models/OrderItem.cs
new file mode 100644
index 0000000..a8c32f0
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/OrderItem.cs
@@ -0,0 +1,16 @@
+namespace Supermarket.Models;
+
+public class OrderItem
+{
+ public int Id { get; set; }
+
+ public int OrderId { get; set; }
+ public OrderDetail Order { get; set; }
+
+ public int ProductId { get; set; }
+ public Product Product { get; set; }
+
+ public int Quantity { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime? ModifiedAt { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Models/Product.cs b/Desktop/Supermarket/Supermarket/Models/Product.cs
new file mode 100644
index 0000000..84135b2
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/Product.cs
@@ -0,0 +1,29 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Supermarket.Models;
+
+public class Product
+{
+ public int Id { get; set; }
+
+ [Required]
+ public string Name { get; set; }
+
+ public string? Desc { get; set; }
+
+ [Required]
+ public string SKU { get; set; }
+
+ public int CategoryId { get; set; }
+ public ProductCategory Category { get; set; }
+
+ public int InventoryId { get; set; }
+ public ProductInventory Inventory { get; set; }
+
+ public decimal Price { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime? ModifiedAt { get; set; }
+ public DateTime? DeletedAt { get; set; }
+
+ public ICollection OrderItems { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Models/ProductCategory.cs b/Desktop/Supermarket/Supermarket/Models/ProductCategory.cs
new file mode 100644
index 0000000..4e716d3
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/ProductCategory.cs
@@ -0,0 +1,18 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Supermarket.Models;
+
+public class ProductCategory
+{
+ public int Id { get; set; }
+
+ [Required]
+ public string Name { get; set; }
+
+ public string? Desc { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime? ModifiedAt { get; set; }
+ public DateTime? DeletedAt { get; set; }
+
+ public ICollection Products { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Models/ProductInventory.cs b/Desktop/Supermarket/Supermarket/Models/ProductInventory.cs
new file mode 100644
index 0000000..d0c4dff
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Models/ProductInventory.cs
@@ -0,0 +1,12 @@
+namespace Supermarket.Models;
+
+public class ProductInventory
+{
+ public int Id { get; set; }
+ public int Quantity { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime? ModifiedAt { get; set; }
+ public DateTime? DeletedAt { get; set; }
+
+ public ICollection Products { get; set; }
+}
diff --git a/Desktop/Supermarket/Supermarket/Services/CategoriesService.cs b/Desktop/Supermarket/Supermarket/Services/CategoriesService.cs
new file mode 100644
index 0000000..85af75e
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Services/CategoriesService.cs
@@ -0,0 +1,60 @@
+using Supermarket.Models;
+
+namespace Supermarket.Services;
+
+public class CategoriesService
+{
+ public List Categories =
+ [
+ new ProductCategory()
+ {
+ Id = 1,
+ Name = "Drinks",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ new ProductCategory()
+ {
+ Id = 2,
+ Name = "Meats",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ new ProductCategory()
+ {
+ Id = 3,
+ Name = "Fruits",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ new ProductCategory()
+ {
+ Id = 4,
+ Name = "Bread",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ new ProductCategory()
+ {
+ Id = 5,
+ Name = "Vegetables",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ }
+ ];
+
+ public List GetCategories()
+ {
+ return Categories;
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Services/OrdersService.cs b/Desktop/Supermarket/Supermarket/Services/OrdersService.cs
new file mode 100644
index 0000000..802198e
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Services/OrdersService.cs
@@ -0,0 +1,122 @@
+using Supermarket.Models;
+
+namespace Supermarket.Services;
+
+public class OrdersService
+{
+ public List Orders =
+ [
+ new OrderItem()
+ {
+ Id = 1,
+ Order = new OrderDetail()
+ {
+ Id = 1,
+ Customer = new Customer()
+ {
+ Id = 1,
+ FirstName = "Andrew",
+ LastName = "Tate",
+ Email = "CobraTate@gmail.com",
+ PhoneNumber = "+40 888 088898",
+ Password = "I have a Bugatti",
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null
+ },
+ Total = 30,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null
+ },
+ Product =new Product()
+ {
+ Id = 1,
+ Name = "Coca-Cola",
+ SKU = "25636598",
+ Price = 5,
+ CreatedAt = DateTime.Now,
+ Category = new ProductCategory()
+ {
+ Id = 1,
+ Name = "Drinks",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Inventory = new ProductInventory()
+ {
+ Id= 1,
+ Quantity = 25,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Desc = null,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Quantity = 6,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null
+ },
+
+ new OrderItem()
+ {
+ Id = 2,
+ Order = new OrderDetail()
+ {
+ Id = 2,
+ Customer = new Customer()
+ {
+ Id = 1,
+ FirstName = "Andrew",
+ LastName = "Tate",
+ Email = "CobraTate@gmail.com",
+ PhoneNumber = "+40 888 088898",
+ Password = "I have a Bugatti",
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null
+ },
+ Total = 60,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null
+ },
+ Product = new Product()
+ {
+ Id = 2,
+ Name = "Fanta",
+ SKU = "12345678",
+ Price = 5,
+ CreatedAt = DateTime.Now,
+ Category = new ProductCategory()
+ {
+ Id = 1,
+ Name = "Drinks",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Inventory = new ProductInventory()
+ {
+ Id= 2,
+ Quantity = 35,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Desc = null,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Quantity = 12,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null
+ }
+ ];
+
+ public List GetOrders()
+ {
+ return Orders;
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Services/ProductService.cs b/Desktop/Supermarket/Supermarket/Services/ProductService.cs
new file mode 100644
index 0000000..5603000
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Services/ProductService.cs
@@ -0,0 +1,99 @@
+using Supermarket.Models;
+
+namespace Supermarket.Services;
+
+public class ProductService
+{
+ public List Products =
+ [
+ new Product()
+ {
+ Id = 1,
+ Name = "Coca-Cola",
+ SKU = "25636598",
+ Price = 5,
+ CreatedAt = DateTime.Now,
+ Category = new ProductCategory()
+ {
+ Id = 1,
+ Name = "Drinks",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Inventory = new ProductInventory()
+ {
+ Id= 1,
+ Quantity = 25,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Desc = null,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ new Product()
+ {
+ Id = 2,
+ Name = "Fanta",
+ SKU = "12345678",
+ Price = 5,
+ CreatedAt = DateTime.Now,
+ Category = new ProductCategory()
+ {
+ Id = 1,
+ Name = "Drinks",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Inventory = new ProductInventory()
+ {
+ Id= 2,
+ Quantity = 35,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Desc = null,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ new Product()
+ {
+ Id = 3,
+ Name = "Beef",
+ SKU = "87654321",
+ Price = 12,
+ CreatedAt = DateTime.Now,
+ Category = new ProductCategory()
+ {
+ Id = 2,
+ Name = "Meats",
+ Desc = null,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Inventory = new ProductInventory()
+ {
+ Id= 3,
+ Quantity = 20,
+ CreatedAt = DateTime.Now,
+ ModifiedAt = null,
+ DeletedAt = null
+ },
+ Desc = null,
+ ModifiedAt = null,
+ DeletedAt = null
+ }
+ ];
+
+ public List GetProducts()
+ {
+ return Products;
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Supermarket.csproj b/Desktop/Supermarket/Supermarket/Supermarket.csproj
index e3e33e3..c5a696b 100644
--- a/Desktop/Supermarket/Supermarket/Supermarket.csproj
+++ b/Desktop/Supermarket/Supermarket/Supermarket.csproj
@@ -8,4 +8,12 @@
true
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/AllProductsView.xaml b/Desktop/Supermarket/Supermarket/Views/AllProductsView.xaml
new file mode 100644
index 0000000..491aaf7
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/AllProductsView.xaml
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/AllProductsView.xaml.cs b/Desktop/Supermarket/Supermarket/Views/AllProductsView.xaml.cs
new file mode 100644
index 0000000..7aa8047
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/AllProductsView.xaml.cs
@@ -0,0 +1,37 @@
+using Supermarket.Models;
+using Supermarket.Services;
+using System.Collections.ObjectModel;
+using System.Windows.Controls;
+
+namespace Supermarket.Views
+{
+ ///
+ /// Interaction logic for AllProductsView.xaml
+ ///
+ public partial class AllProductsView : UserControl
+ {
+ private readonly ProductService _productService;
+ public ObservableCollection Products;
+
+ public AllProductsView()
+ {
+ InitializeComponent();
+
+ _productService = new ProductService();
+ Products = new ObservableCollection();
+
+ Load();
+ ProductsDataGrid.ItemsSource = Products;
+ }
+
+ void Load()
+ {
+ var products = _productService.GetProducts();
+ Products.Clear();
+ foreach (var product in products)
+ {
+ Products.Add(product);
+ }
+ }
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Views/CategoriesView.xaml b/Desktop/Supermarket/Supermarket/Views/CategoriesView.xaml
new file mode 100644
index 0000000..4c6aebb
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/CategoriesView.xaml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/CategoriesView.xaml.cs b/Desktop/Supermarket/Supermarket/Views/CategoriesView.xaml.cs
new file mode 100644
index 0000000..f9ade18
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/CategoriesView.xaml.cs
@@ -0,0 +1,37 @@
+using Supermarket.Models;
+using Supermarket.Services;
+using System.Collections.ObjectModel;
+using System.Windows.Controls;
+
+namespace Supermarket.Views
+{
+ ///
+ /// Interaction logic for CategoriesView.xaml
+ ///
+ public partial class CategoriesView : UserControl
+ {
+ private readonly CategoriesService _categoriesService;
+ public ObservableCollection Categories;
+
+ public CategoriesView()
+ {
+ InitializeComponent();
+
+ _categoriesService = new CategoriesService();
+ Categories = new ObservableCollection();
+
+ Load();
+ CategoriesDataGrid.ItemsSource = Categories;
+ }
+
+ void Load()
+ {
+ var categories = _categoriesService.GetCategories();
+ Categories.Clear();
+ foreach (var category in categories)
+ {
+ Categories.Add(category);
+ }
+ }
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Views/DashboardView.xaml b/Desktop/Supermarket/Supermarket/Views/DashboardView.xaml
new file mode 100644
index 0000000..0fe1444
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/DashboardView.xaml
@@ -0,0 +1,277 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/DashboardView.xaml.cs b/Desktop/Supermarket/Supermarket/Views/DashboardView.xaml.cs
new file mode 100644
index 0000000..90c50d9
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/DashboardView.xaml.cs
@@ -0,0 +1,89 @@
+using Supermarket.Models;
+using Supermarket.Services;
+using System.Collections.ObjectModel;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace Supermarket.Views
+{
+ ///
+ /// Interaction logic for DashboardView.xaml
+ ///
+ public partial class DashboardView : UserControl
+ {
+ private readonly CategoriesService _categoriesService;
+ public ObservableCollection Categories;
+
+ private readonly ProductService _productService;
+ public ObservableCollection Products;
+
+ private readonly OrdersService _ordersService;
+ public ObservableCollection Orders;
+
+ public DashboardView()
+ {
+ InitializeComponent();
+
+ _categoriesService = new CategoriesService();
+ Categories = new ObservableCollection();
+ LoadCategoreis();
+ CategoriesDataGrid.ItemsSource = Categories;
+
+ _productService = new ProductService();
+ Products = new ObservableCollection();
+ LoadProducts();
+ ProductsDataGrid.ItemsSource = Products;
+
+ _ordersService = new OrdersService();
+ Orders = new ObservableCollection();
+ LoadOrders();
+ OrdersDataGrid.ItemsSource = Orders;
+ }
+
+ void LoadOrders()
+ {
+ var orders = _ordersService.GetOrders();
+ Orders.Clear();
+
+ foreach (var order in orders)
+ {
+ Orders.Add(order);
+ }
+ }
+
+ void LoadProducts()
+ {
+ var products = _productService.GetProducts();
+ Products.Clear();
+ foreach (var product in products)
+ {
+ Products.Add(product);
+ }
+ }
+
+ void LoadCategoreis()
+ {
+ var categories = _categoriesService.GetCategories();
+ Categories.Clear();
+ foreach (var category in categories)
+ {
+ Categories.Add(category);
+ }
+ }
+
+ private void Categories_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+
+ }
+
+ private void LastOrders_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+
+ }
+
+ private void Products_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Views/MarketMainWindow.xaml b/Desktop/Supermarket/Supermarket/Views/MarketMainWindow.xaml
new file mode 100644
index 0000000..7fe80be
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/MarketMainWindow.xaml
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/MarketMainWindow.xaml.cs b/Desktop/Supermarket/Supermarket/Views/MarketMainWindow.xaml.cs
new file mode 100644
index 0000000..ece01f5
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/MarketMainWindow.xaml.cs
@@ -0,0 +1,42 @@
+using System.Windows;
+
+namespace Supermarket.Views
+{
+ ///
+ /// Interaction logic for MarketMainWindow.xaml
+ ///
+ public partial class MarketMainWindow : Window
+ {
+ public MarketMainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void AllProducts_Click(object sender, RoutedEventArgs e)
+ {
+ MainUserControl.Content = new AllProductsView();
+ }
+
+ private void Categories_Click(object sender, RoutedEventArgs e)
+ {
+ MainUserControl.Content = new CategoriesView();
+ }
+
+ private void Orders_Click(object sender, RoutedEventArgs e)
+ {
+ MainUserControl.Content = new OrdersView();
+ }
+
+ private void Dashboard_Click(object sender, RoutedEventArgs e)
+ {
+ MainUserControl.Content = new DashboardView();
+ }
+
+ private void LogOut_Click(object sender, RoutedEventArgs e)
+ {
+ var logout = new MainWindow();
+ GetWindow(this).Close();
+ logout.Show();
+ }
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Views/OrdersView.xaml b/Desktop/Supermarket/Supermarket/Views/OrdersView.xaml
new file mode 100644
index 0000000..e5ee6e8
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/OrdersView.xaml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/OrdersView.xaml.cs b/Desktop/Supermarket/Supermarket/Views/OrdersView.xaml.cs
new file mode 100644
index 0000000..05e8cfb
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/OrdersView.xaml.cs
@@ -0,0 +1,38 @@
+using Supermarket.Models;
+using Supermarket.Services;
+using System.Collections.ObjectModel;
+using System.Windows.Controls;
+
+namespace Supermarket.Views
+{
+ ///
+ /// Interaction logic for OrdersView.xaml
+ ///
+ public partial class OrdersView : UserControl
+ {
+ private readonly OrdersService _ordersService;
+ public ObservableCollection Orders;
+
+ public OrdersView()
+ {
+ InitializeComponent();
+
+ _ordersService = new OrdersService();
+ Orders = new ObservableCollection();
+
+ Load();
+ OrdersDataGrid.ItemsSource = Orders;
+ }
+
+ void Load()
+ {
+ var orders = _ordersService.GetOrders();
+ Orders.Clear();
+
+ foreach (var order in orders)
+ {
+ Orders.Add(order);
+ }
+ }
+ }
+}
diff --git a/Desktop/Supermarket/Supermarket/Views/SignUp.xaml b/Desktop/Supermarket/Supermarket/Views/SignUp.xaml
new file mode 100644
index 0000000..0b02521
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/SignUp.xaml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Desktop/Supermarket/Supermarket/Views/SignUp.xaml.cs b/Desktop/Supermarket/Supermarket/Views/SignUp.xaml.cs
new file mode 100644
index 0000000..d113caa
--- /dev/null
+++ b/Desktop/Supermarket/Supermarket/Views/SignUp.xaml.cs
@@ -0,0 +1,30 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Supermarket.Views
+{
+ ///
+ /// Interaction logic for SignUp.xaml
+ ///
+ public partial class SignUp : UserControl
+ {
+ public SignUp()
+ {
+ InitializeComponent();
+ }
+
+ private void Back_Click(object sender, RoutedEventArgs e)
+ {
+ var mainWindow = new MainWindow();
+ mainWindow.Show();
+ Window.GetWindow(this).Close();
+ }
+
+ private void SignUp_Click(object sender, RoutedEventArgs e)
+ {
+ var signUp = new MarketMainWindow();
+ Window.GetWindow(this).Close();
+ signUp.Show();
+ }
+ }
+}