Ejemplo n.º 1
0
 private void ButtonView_Click(object sender, RoutedEventArgs e)
 {
     if (_crudManager.selectedGP == null)
     {
         MessageBox.Show("Please select a GP first!");
     }
     else
     {
         _crudManager.SetSelectedGP(ListBoxGPs.SelectedItem);
         GPPatientView gpPatientView = new GPPatientView(_crudManager);
         this.NavigationService.Navigate(gpPatientView);
     }
 }
Ejemplo n.º 2
0
 private void LoginBtn_Click(object sender, RoutedEventArgs e)
 {
     if (_crudManager.CheckLoginDetails(EmailTextBox.Text, PasswordTextBox.Password))
     {
         _crudManager.SetGP(EmailTextBox.Text);
         GPPatientView gpPatientView = new GPPatientView(_crudManager);
         MessageBox.Show($"Welcome {(_crudManager.selectedGP.FirstName)}");
         this.NavigationService.Navigate(gpPatientView);
     }
     else
     {
         MessageBox.Show("Email or password is incorrect");
     }
 }