private void CreateAddressControlForBilling() { addressControl = new AddressControl { Dock = DockStyle.Fill, CoName = address.Data.Name, Line1 = address.Data.Line1, Line2 = address.Data.Line2, City = address.Data.City, State = address.Data.State, ZipCode = address.Data.Zip, Country = address.Data.Country, TaxKey = address.SalesTaxKey, Residential = address.Data.Residential, IsGovernment = address.IsGovernment }; addressControl.HideCustId(); addressControl.HideStatus(); addressControl.Done += AddressControl_Done; addressControl.Invalid += AddressControl_Invalid; addressControl.FormCleared += () => chkSameAsPrim.Checked = false; addressControl.EnterPressed += () => EnterPressed(); panelAddress.Controls.Clear(); panelAddress.Controls.Add(addressControl); }
//ADDRESS CONTROL private void SetUpAddressEditorControl() { addressControl = new AddressControl { Dock = DockStyle.Fill }; addressControl.HideStatus(); addressControl.HideCustId(); addressControl.StatusChanged += AddressControl_StatusChanged; addressControl.Done += AddressControl_Done; addressControl.Invalid += AddressControl_Invalid; addressControl.EnterPressed += AddressControl_EnterPressed; addressControl.CustKey = customer.Key; panelAddress.Controls.Add(addressControl); }