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; }
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(); }
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(); }
public frmAddress() { InitializeComponent(); myAddress = InstanceFactory.Address(); }
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)); }
public static iContact Contact(iName myName, iAddress myAddress) { return(new Contact((Name)myName, (Address)myAddress)); }