add msgbox to actions

This commit is contained in:
Strati 2018-08-12 20:33:28 +02:00
parent 21256ee411
commit 1ee524b71f
5 changed files with 52 additions and 35 deletions

View File

@ -65,6 +65,9 @@ namespace WpfWebClient
client.WriteExam(exam);
// Show success msgbox
System.Windows.MessageBox.Show("Success", "INFO", MessageBoxButton.OK, MessageBoxImage.Information);
client.Close();
}
}

View File

@ -51,6 +51,9 @@ namespace WpfWebClient
client.WriteFoodPlace(fp);
// Show success msgbox
System.Windows.MessageBox.Show("Success", "INFO", MessageBoxButton.OK, MessageBoxImage.Information);
client.Close();
}
}

View File

@ -32,6 +32,10 @@ namespace WpfWebClient
// create new client connection
WpfWebClient.ServiceReferenceEHEC.ServiceClient client = new WpfWebClient.ServiceReferenceEHEC.ServiceClient();
// msgbox to confirm action
if (MessageBox.Show("This could take a while, are you sure?", "More strains?",
MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
// Get the number of words and letters per word.
int num_letters = int.Parse(txtNumLetters.Text);
@ -69,8 +73,11 @@ namespace WpfWebClient
s.Name = item;
client.WriteStrain(s);
}
}
}
// Show success msgbox
System.Windows.MessageBox.Show("Success", "INFO", MessageBoxButton.OK, MessageBoxImage.Information);
client.Close();
}

View File

@ -83,6 +83,9 @@ namespace WpfWebClient
client.WritePatient(p);
// Show success msgbox
System.Windows.MessageBox.Show("Success", "INFO", MessageBoxButton.OK, MessageBoxImage.Information);
client.Close();
}

View File

@ -33,6 +33,7 @@ namespace WpfWebClient
DataGridViewStrains.ItemsSource = strainlist;
client.Close();
}