コード例 #1
0
        public frmAddress(iAddress myAddressInstance)
        {
            InitializeComponent();

            myAddress = myAddressInstance;
            rTxtBoxAddressBody.Text    = myAddress.BodyText;
            txtBoxAddressCity.Text     = myAddress.City;
            txtBoxAddressRegion.Text   = myAddress.Region;
            txtBoxAddressCountry.Text  = myAddress.Country;
            txtBoxAddressPostcode.Text = myAddress.Postcode;
        }
コード例 #2
0
        public frmContact(iAddress parentAddress)
        {
            InitializeComponent();

            myContact = InstanceFactory.Contact();

            myContact.Address = (Address)parentAddress;

            //It is possible that the address passed is NULL (the parent agency has not been set)
            rTextBoxContactAddress.Text = myContact.Address == null? "" : myContact.Address.FullAddress;

            SetNotesCount();
        }
コード例 #3
0
        private void btnUpdateCloseAddress_Click(object sender, EventArgs e)
        {
            //Update the values
            myAddress.BodyText = rTxtBoxAddressBody.Text;
            myAddress.City     = txtBoxAddressCity.Text;
            myAddress.Region   = txtBoxAddressRegion.Text;
            myAddress.Country  = txtBoxAddressCountry.Text;
            myAddress.Postcode = txtBoxAddressPostcode.Text;

            //Save the address
            myAddress = myAddress.Save();

            CloseAddressForm();
        }
コード例 #4
0
        public frmAddress()
        {
            InitializeComponent();

            myAddress = InstanceFactory.Address();
        }
コード例 #5
0
 public static iContact Contact(iName myName, iAddress myAddress, string myPosition, string myEmail, string myMobileNo, string myLandLineNo)
 {
     return(new Contact((Name)myName, (Address)myAddress, myPosition, myEmail, myMobileNo, myLandLineNo));
 }
コード例 #6
0
 public static iContact Contact(iName myName, iAddress myAddress)
 {
     return(new Contact((Name)myName, (Address)myAddress));
 }