private void _back_Click_1(object sender, RoutedEventArgs e) { Lections lections = new Lections(); Close(); lections.Show(); }
private void _logbuttton_Click(object sender, RoutedEventArgs e) { var userLogin = context.Registration.Where(i => i.login == _login.Text && i.password == _password.Password).FirstOrDefault(); EF.Registration userinfo = new EF.Registration(); if (userLogin != null) { UserData1 = userLogin; Lections lections = new Lections(); this.Close(); lections.Show(); } else if (string.IsNullOrWhiteSpace(_login.Text) && string.IsNullOrWhiteSpace(_password.Password)) { MessageBox.Show("Не введены логин или пароль"); _login.Text = "Введите логин"; _password.Clear(); } else { MessageBox.Show("Не верный логин или пароль"); _login.Text = "Введите логин"; _password.Clear(); } }