コード例 #1
0
 /// <summary>
 /// Creator: Ethan Murphy
 /// Created: 2/21/2020
 /// Approver: Zach Behrensmeyer
 ///
 /// Sets the appointment list to null, then
 /// repopulates it with the most recent data
 /// </summary>
 /// <remarks>
 /// Updater:
 /// Updated:
 /// Update:
 /// </remarks>
 private void RefreshList()
 {
     dgAppointments.ItemsSource = null;
     try
     {
         _vetAppointments = _vetAppointmentManager.RetrieveVetAppointmentsByActive((bool)chkActive.IsChecked);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + " " + ex.InnerException.Message);
     }
     dgAppointments.ItemsSource = _vetAppointments;
 }
コード例 #2
0
 /// <summary>
 /// Creator: Ethan Murphy
 /// Created: 2/22/2020
 /// Approver: Zach Behrensmeyer
 ///
 /// Opens the prescription creation page
 /// </summary>
 /// <remarks>
 /// Updater:
 /// Updated:
 /// Update:
 /// </remarks>
 private void BtnCreate_Click(object sender, RoutedEventArgs e)
 {
     canViewPrescription.Visibility = Visibility.Visible;
     canView.Visibility             = Visibility.Hidden;
     _vetAppointmentManager         = new VetAppointmentManager();
     try
     {
         dgAppointmentList.ItemsSource = _vetAppointmentManager.RetrieveVetAppointmentsByActive(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex + " " + ex.InnerException.Message);
     }
     EnableAddMode();
 }
コード例 #3
0
 /// <summary>
 /// Creator: Ethan Murphy
 /// Created: 3/15/2020
 /// Approver: Carl Davis 3/19/2020
 ///
 /// Searches for vet appointments by animal name
 /// as the user is typing it. Only begins searching
 /// when the character count is greater than two. Resets
 /// to the default list when the textbox is empty
 /// </summary>
 /// <remarks>
 /// Updater:
 /// Updated:
 /// Update:
 /// </remarks>
 private void TxtAnimalName_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (txtAnimalName.Text.Length < 3 &&
         txtAnimalName.Text.Length > 0 ||
         txtAnimalName.Text == "Animal Name")
     {
         return;
     }
     dgAppointmentList.ItemsSource = null;
     try
     {
         if (txtAnimalName.Text.Equals(""))
         {
             dgAppointmentList.ItemsSource = _vetAppointmentManager.RetrieveVetAppointmentsByActive(true);
         }
         else
         {
             dgAppointmentList.ItemsSource = _vetAppointmentManager.RetrieveAppointmentsByPartialAnimalName(
                 txtAnimalName.Text);
         }
     }
     catch (Exception)
     { }
 }