public SignUpVM() { _getMembers = new GetItem(); AddNewCustomer = new Customer(); AddItemCommand = new RelayCommand(DoAddItem); Collection = new LoginViewVM(); _frameNavigation = new FrameNavigationClass(); LoadCustomers(); }
public EventViewModel() { EventCatalogSingleton = EventCatalogSingleton.GetInstance(); Events = EventCatalogSingleton.GetCollection(); EventHandler = new EventHandlerClass(this); _selectedEvent = new Event(); AddCommand = new RelayCommand(EventHandler.CreateEvent); DeleteCommand = new RelayCommand(EventHandler.DeleteEvent); SearchCommand = new RelayCommand(DoSearch); BackCommand = new RelayCommand(DoBackToLogin); GoToCreatePageCommand = new RelayCommand(NavigateToCreateEventPage); _frameNavigation = new FrameNavigationClass(); }
public LoginViewModel() { LoginCommand = new RelayCommand(LoginMethod); CurrentUser = new User(); _frameNavigation = new FrameNavigationClass(); Users = new ObservableCollection <User>() { new User("xxx", "pat", "Patrik"), new User("xxx", "bir", "Birendra"), new User("xxx", "ane", "AneMarie"), new User("xxx", "vit", "Vitus"), }; }
public static async void LoginUser(User userToLogIn) { User foundUser = FindUser(userToLogIn); bool succesfullyLogIn = CheckPassword(foundUser, userToLogIn); if (succesfullyLogIn) { CurrentSessioncs.CurrentUser = foundUser; CurrentSessioncs.StartSession(); FrameNavigationClass.ActivateFrameNavigation(typeof(HomeView)); } else { MessageDialog msg = new MessageDialog("Username or Password was incorrect. Please try again.", "No Acces"); await msg.ShowAsync(); } }