Пример #1
0
        private void btnEditContactAddress_Click(object sender, EventArgs e)
        {
            frmAddress newAddressForm = new frmAddress(myContact.Address);

            newAddressForm.ShowDialog();

            myContact.Address = (Address)newAddressForm.myAddress;

            rTextBoxContactAddress.Text = myContact.Address.FullAddress;
        }
Пример #2
0
        private void btnEditAddress_Click(object sender, EventArgs e)
        {
            if (myBroker.Address != null)
            {
                frmAddress newAddressForm = new frmAddress(myBroker.Address);
                newAddressForm.ShowDialog();

                myBroker.Address = (Address)newAddressForm.myAddress;

                rTxtBoxBrokerAddress.Text = myBroker.Address.FullAddress;
            }
        }
Пример #3
0
        private void btnNewContactAddress_Click(object sender, EventArgs e)
        {
            frmAddress newAddressForm = new frmAddress();

            newAddressForm.ShowDialog();

            //If the user has cancelled out of the New Address form, we should not
            //set point to an empty address instance
            if (newAddressForm.myAddress.AddressID != 0)
            {
                //Now set the reference
                myContact.Address = (Address)newAddressForm.myAddress;

                rTextBoxContactAddress.Text = myContact.Address.FullAddress;
            }
        }