private void buttonCancel_Click(object sender, RoutedEventArgs e)
 {
     Content = new UserControl_PatientsView();
 }
예제 #2
0
 private void Save(object sender, RoutedEventArgs e)
 {
     Savebtn.Focus();  //This is to lose focus on the last text field as data binding will not grab the last piece of data because textchanged is not fired off until focus is lost
         if (HealthCaretb.Text.Equals("") || FirstNametb.Text.Equals("") || LastNametb.Text.Equals(""))
         {
             MessageBox.Show("HealthCare No, First Name and Last Name are required fields. Make sure that they are not blank.");
         }
         else if ((_isNewPatient && patient.Insert()) || patient.Update())
         {
             Content = new UserControl_PatientsView();
         }
         else
         {
             MessageBox.Show("The HealthCare No entered is already in use.");
         }
 }
 /* Cancel button click event
  *
  */
 private void buttonCancel_Click(object sender, RoutedEventArgs e)
 {
     //When user clicks on X the main tab view is displayed
     Content = new UserControl_PatientsView();
 }
예제 #4
0
 private void Cancel(object sender, RoutedEventArgs e)
 {
     Content = new UserControl_PatientsView();  //This needs to be cleaned up so that rather than creating a new instance of a control
                                                //it should find an old instance that called it.
 }
 private void Close(object sender, RoutedEventArgs e)
 {
     Content = new UserControl_PatientsView();
 }