private void ButtonSignin_Click(object sender, RoutedEventArgs e) { UCLogin uCLogin = new UCLogin(); UCSignupSP.Children.Clear(); UCSignupSP.Children.Add(uCLogin); }
private void Signout_Click(object sender, RoutedEventArgs e) { UCLogin uCLogin = new UCLogin(); UCHomeSP.Children.Clear(); UCHomeSP.Children.Add(uCLogin); }
public MainWindow() { InitializeComponent(); UCLogin uCLogin = new UCLogin(); MainWindowSP.Children.Clear(); MainWindowSP.Children.Add(uCLogin); }
private void ButtonRegister_Click(object sender, RoutedEventArgs e) { if (PrivacyCb.IsChecked == true) { if (PasswordTb.Password.Equals(CPasswordTb.Password)) { TblUser tblUser = new TblUser() { Name = NameTb.Text, Email = EmailTb.Text, Password = PasswordTb.Password, Amount = 0, }; try { context.TblUsers.Add(tblUser); context.SaveChanges(); MessageBox.Show("You can signin using " + EmailTb.Text); UCLogin uCLogin = new UCLogin(); UCSignupSP.Children.Clear(); UCSignupSP.Children.Add(uCLogin); } catch (Exception) { throw; } } else { MessageBox.Show("Password are not matching"); } } else { MessageBox.Show("You forget to check privacy policy"); } }