private void Button_Click_6(object sender, RoutedEventArgs e) { UserUI u = new UserUI(user); u.Show(); this.Close(); }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (i == 2) { b.AddUser(new UserDTO() { Login = Login.Text, Password = Password.Text, Name = Name.Text, Admin = false }); MessageBox.Show($"User *{Name.Text}* sucsesful added"); Name.IsEnabled = false; Login.IsEnabled = false; Password.IsEnabled = false; Name.Text = "Name"; Login.Text = "Login"; Password.Text = "Password"; } else if (i == 1) { UserDTO u = b.Login(Login.Text, Password.Text); if (u != null) { this.Hide(); UserUI ui = new UserUI(u); ui.Show(); Name.IsEnabled = false; Login.IsEnabled = false; Password.IsEnabled = false; Name.Text = "Name"; Login.Text = "Login"; Password.Text = "Password"; } else { MessageBox.Show("Error"); } } }