Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Code_Error.Visibility  = Visibility.Hidden;
            Email_Error.Visibility = Visibility.Hidden;

            String email = EmailTextBox.Text;
            String code  = CodeTextBox.Password.ToString();

            User u = db.loadUser(email, code);

            if (u != null)
            {
                if (u != null)
                {
                    if (u.getCode().Substring(0, 2).Equals("99"))
                    {
                        Profissional next = new Profissional(u);
                        this.NavigationService.Navigate(next);
                    }
                    else
                    {
                        Pacient next = new Pacient(u);
                        this.NavigationService.Navigate(next);
                    }
                }
            }
            else
            {
                Code_Error.Visibility  = Visibility.Visible;
                Email_Error.Visibility = Visibility.Visible;
            }
        }
Beispiel #2
0
        private void GoToProfissional(object sender, MouseButtonEventArgs e)
        {
            Profissional prof = new Profissional(this.user);

            this.NavigationService.Navigate(prof);
        }