Example #1
0
        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            patientRecord sw = new patientRecord();

            sw.Show();
            this.Close();
        }
Example #2
0
 private void PatientTable_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         SelectedPatient.CurrentPatient = (PatientInformation)PatientTable.SelectedItems[0];
         patientRecord sw = new patientRecord();
         sw.Show();
         this.Close();
     }
     catch (System.ArgumentOutOfRangeException)
     {
     }
 }
Example #3
0
        private void OkButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                string path  = System.Environment.CurrentDirectory;
                string path2 = path.Substring(0, path.LastIndexOf("bin")) + "Data" + "\\diagnosis.txt";
                {
                    List <string> filetext = File.ReadAllLines(path2).ToList();
                    filetext.Add(SelectedPatient.CurrentPatient.IDNumber + "|" + txtDiagnosis.Text + "|" + "Dr. " + LoggedInUser.UserName + "|" + DateTime.Now.ToString("MM/dd/yyyy"));
                    File.WriteAllLines(path2, filetext);
                    patientRecord sw = new patientRecord();
                    sw.Show();
                    this.Close();
                }
            }

            catch (Exception)
            {
                MessageBox.Show("Error adding diagnosis...");
            }
        }
Example #4
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            try
            {
                string path  = System.Environment.CurrentDirectory;
                string path2 = path.Substring(0, path.LastIndexOf("bin")) + "Data" + "\\allergies.txt";
                {
                    List <string> filetext = File.ReadAllLines(path2).ToList();
                    filetext.Add(SelectedPatient.CurrentPatient.IDNumber + "|" + txtAllergy.Text);
                    File.WriteAllLines(path2, filetext);
                    patientRecord sw = new patientRecord();
                    sw.Show();
                    this.Close();
                }
            }

            catch (Exception)
            {
                MessageBox.Show("Error adding allergy...");
            }
        }