private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;

            if (contractor.GetBusinessName() != BusinessNameTextBox.Text)
            {
                contractor.SetBusinessName(BusinessNameTextBox.Text);
            }
            if (contractor.getFirstName() != FirstNameTextBox.Text)
            {
                contractor.setFirstName(FirstNameTextBox.Text);
            }
            if (contractor.getSurname() != SurnameTextBox.Text)
            {
                contractor.setSurname(SurnameTextBox.Text);
            }
            if (contractor.getAddress() != AddressTextBox.Text)
            {
                contractor.setAddress(AddressTextBox.Text);
            }
            if (contractor.getPhone() != PhoneNumberTextBox.Text)
            {
                contractor.setPhone(PhoneNumberTextBox.Text);
            }
            if (contractor.getEmail() != EmailTextBox.Text)
            {
                contractor.setEmail(EmailTextBox.Text);
            }

            MessageBox.Show("Contractor details have been changed.");
            this.Close();
        }
        public EditContractor(ExternalBusiness contractorToEdit)
        {
            InitializeComponent();
            contractor = contractorToEdit;

            BusinessNameTextBox.Text = contractorToEdit.GetBusinessName();
            FirstNameTextBox.Text    = contractorToEdit.getFirstName();
            SurnameTextBox.Text      = contractorToEdit.getSurname();
            AddressTextBox.Text      = contractorToEdit.getAddress();
            PhoneNumberTextBox.Text  = contractorToEdit.getPhone();
            EmailTextBox.Text        = contractorToEdit.getEmail();
            SaveButton.IsEnabled     = false;
        }