Exemple #1
0
        private void btnAddClients_Click(object sender, RoutedEventArgs e)
        {
            txtOutput.Text = "";
            if (!healthSystem.addClient(1, "Claire", "Wentworth", "1 Low Rd", "Edinburgh", 55.937894, -3.194088))
            {
                txtOutput.Text += " Client member not added \n";
            }
            if (!healthSystem.addClient(2, "Douglas", "Brown", "2 Mid Rd", "Edinburgh", 55.932317, -3.192716))
            {
                txtOutput.Text += " Client member not added \n";
            }
            if (!healthSystem.addClient(3, "Jimmy", "Green", "31 High Rd", "Edinburgh", 55.942605, -3.180533))
            {
                txtOutput.Text += " Client member not added \n";
            }

            txtOutput.Text += healthSystem.getClientList() + "\n";
        }
Exemple #2
0
 private void btnAddClients_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         healthSystem.addClient(1, "Claire", "Wentworth", "1 Low Rd", "Edinburgh", 55.937894, -3.194088);
         healthSystem.addClient(2, "Douglas", "Brown", "2 Mid Rd", "Edinburgh", 55.932317, -3.192716);
         healthSystem.addClient(3, "Jimmy", "Green", "31 High Rd", "Edinburgh", 55.942605, -3.180533);
         dgv1.ItemsSource = healthSystem.getClientList();
     }
     catch (Exception ex)
     {
         throw;
     }
     //if (!healthSystem.addClient(1, "Claire", "Wentworth", "1 Low Rd", "Edinburgh", 55.937894, -3.194088))
     //    txtOutput.Text += " Client member not added \n";
     //if (!healthSystem.addClient(2, "Douglas", "Brown", "2 Mid Rd", "Edinburgh", 55.932317, -3.192716))
     //    txtOutput.Text += " Client member not added \n";
 }