Example #1
0
        // If valid, writes the Text in the control to the database object. This does
        // NOT commit the object to the disk. Returns false if unsuccessful.
        public bool SaveText()
        {
            if (IsValid())
            {
                DatabaseField.SetValue(DatabaseObject, Text);
                OnFieldChanged();
                return(true);
            }

            return(false);
        }
Example #2
0
        // If valid, writes the Text in the control to the database object. This does
        // NOT commit the object to the disk. Returns false if unsuccessful.
        public bool Save()
        {
            if (IsValid())
            {
                DatabaseField.SetValue(DatabaseObject, SelectedItem);
                OnFieldChanged();
                return(true);
            }

            return(false);
        }