コード例 #1
0
 private void Form_ButtonClicked(object sender, CustomerEditEventArgs e)
 {
     selectedCustomer.companyName = e.Name;
     selectedCustomer.phoneNumber = e.Phone;
     selectedCustomer.email       = e.Email;
     selectedCustomer.address     = e.Address;
 }
コード例 #2
0
        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();
        }