示例#1
0
        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);
        }
示例#2
0
        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;
            }
        }