private void executeInfo(object obj) { MainFrameNavigator.FrameNavigator("Views/Pages/", "Product"); using (UnitOfWork context = new UnitOfWork()) { ComputerPeripheralsShop.Models.CurrentProduct.currentProduct = context.ProductRepository.GetProductById((int)obj); } }
private void ExecuteAccount() { if (Account.curUser != null) { MainFrameNavigator.FrameNavigator("Views/Pages/", "Account"); } else { Window loginWindow = new LoginWindow(); loginWindow.Show(); } }
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); } }
private void ExecuteBasketCommand() => MainFrameNavigator.FrameNavigator("Views/Pages/", "Basket");
private void executeToContacts() => MainFrameNavigator.FrameNavigator("Views/Pages/MenuPages/", "Contacts");
private void navigateToPage(string SubName) => MainFrameNavigator.FrameNavigator("Views/Pages/MenuPages/", SubName);