Example #1
0
        private void btnAddStaff_Click(object sender, RoutedEventArgs e)
        {
            txtOutput.Text = "";
            if (!healthSystem.addStaff(1, "James", "Henry", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(2, "Sally", "Wilson", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(3, "Roland", "Smith", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(4, "Mary", "Jones", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(5, "Phillip", "Jones", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(6, "Martha", "Rigg", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(7, "Mike", "Heathcoat", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(8, "Jo", "Shaw", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            txtOutput.Text += healthSystem.getStaffList() + "\n";
        }
Example #2
0
 private void btnAddStaff_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         healthSystem.addStaff(1, "James", "Henry", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164);
         healthSystem.addStaff(2, "Sally", "Wilson", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164);
         healthSystem.addStaff(3, "Roland", "Smith", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164);
         healthSystem.addStaff(4, "Mary", "Jones", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164);
         healthSystem.addStaff(5, "Phillip", "Jones", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164);
         healthSystem.addStaff(6, "Martha", "Rigg", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164);
         healthSystem.addStaff(7, "Mike", "Heathcoat", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164);
         healthSystem.addStaff(8, "Jo", "Shaw", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164);
         dgv1.ItemsSource = healthSystem.getStaffList();
     }
     catch (Exception ex)
     {
         throw;
     }
 }