private void Form_ButtonClicked(object sender, CustomerEditEventArgs e)
 {
     selectedCustomer.companyName = e.Name;
     selectedCustomer.phoneNumber = e.Phone;
     selectedCustomer.email       = e.Email;
     selectedCustomer.address     = e.Address;
 }
        private void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            string customerName    = tbx_CompanyName.Text;
            string customerPhone   = tbx_PhoneNo.Text;
            string customerEmail   = tbx_Email.Text;
            string customerAddress = tbx_Address.Text;

            this.DialogResult = true;

            CustomerEditEventArgs args = new CustomerEditEventArgs
                                             (customerName, customerPhone, customerEmail, customerAddress);

            CustomerUpdated(this, args);
            this.Close();
        }