private void btnGuest_Click(object sender, RoutedEventArgs e) { //Переход на страницу заметок Windows.NotesWindow notesWindow = new Windows.NotesWindow(); this.Hide(); notesWindow.ShowDialog(); this.Show(); }
private void btnGuest_Click(object sender, RoutedEventArgs e) { // переход Windows.NotesWindow notesWindow = new Windows.NotesWindow(); this.Hide(); notesWindow.ShowDialog(); //this.Show(); }
private void btnSignIn_Click(object sender, RoutedEventArgs e) { //Авторизация var userAuth = DB.AppData.context.UserData.ToList().Where(i => i.Login == txtLogin.Text && i.Password == txtPassword.Password).FirstOrDefault(); if (userAuth != null) { Classes.AuthData.userData = userAuth; //Переход на страницу заметок Windows.NotesWindow notesWindow = new Windows.NotesWindow(); this.Hide(); notesWindow.ShowDialog(); //this.Show(); } else { MessageBox.Show("Incorrect username or password.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void btnSignIn_Click(object sender, RoutedEventArgs e) { var userAuth = EF.AppData.context.UserData.ToList(). Where(i => i.Login == txtLogin.Text && i.Password == txtPassword.Password). FirstOrDefault(); if (userAuth != null) { ClassHelper.AuthData.userData = userAuth; // переход Windows.NotesWindow notesWindow = new Windows.NotesWindow(); this.Hide(); notesWindow.ShowDialog(); //this.Show(); } else { MessageBox.Show("User not found", "Error", MessageBoxButton.OK, MessageBoxImage.Information); } }