public override bool ApplyChanges() { // Make sure that all controls are available EnsureChildControls(); // Get the property from the WebPart CustomerNotesPart part = (CustomerNotesPart)WebPartToEdit; if (part != null) { if (CustomersList.SelectedIndex >= 0) { part.Customer = CustomersList.SelectedValue; } else { part.Customer = string.Empty; } } else { return(false); } return(true); }
public override void SyncChanges() { // Make sure that all controls are available EnsureChildControls(); // Get the property from the WebPart CustomerNotesPart part = (CustomerNotesPart)WebPartToEdit; if (part != null) { CustomersList.SelectedValue = part.Customer; } }