Beispiel #1
0
 private void executeInfo(object obj)
 {
     MainFrameNavigator.FrameNavigator("Views/Pages/", "Product");
     using (UnitOfWork context = new UnitOfWork())
     {
         ComputerPeripheralsShop.Models.CurrentProduct.currentProduct = context.ProductRepository.GetProductById((int)obj);
     }
 }
Beispiel #2
0
 private void ExecuteAccount()
 {
     if (Account.curUser != null)
     {
         MainFrameNavigator.FrameNavigator("Views/Pages/", "Account");
     }
     else
     {
         Window loginWindow = new LoginWindow();
         loginWindow.Show();
     }
 }
Beispiel #3
0
 public static void LogOut()
 {
     if (curUser != null)
     {
         curUser    = null;
         IsLoggedIn = false;
         NotificationWindowContoller.NewNotification("Success!", "You successfully logged out", ComputerPeripheralsShop.Models.Notification.NotificationType.Success);
         MainFrameNavigator.FrameGoBack();
         return;
     }
     else
     {
         NotificationWindowContoller.NewNotification("Error!", "You are not logged in", ComputerPeripheralsShop.Models.Notification.NotificationType.Danger);
     }
 }
Beispiel #4
0
 private void ExecuteBasketCommand() => MainFrameNavigator.FrameNavigator("Views/Pages/", "Basket");
 private void executeToContacts() => MainFrameNavigator.FrameNavigator("Views/Pages/MenuPages/", "Contacts");
Beispiel #6
0
 private void navigateToPage(string SubName) => MainFrameNavigator.FrameNavigator("Views/Pages/MenuPages/", SubName);