Exemple #1
0
 public void Overwrite(string connectionString, int id)
 {
     iD = id;
     this.connectionString = connectionString;
     GreyFoxKeywordManager._update(this);
     isSynced = true;
 }
Exemple #2
0
        /// <summary>
        /// Ensures that the object's fields and children are
        /// pre-loaded before any updates or reads.
        /// </summary>
        public void EnsurePreLoad()
        {
            if (!isPlaceHolder)
            {
                return;
            }

            GreyFoxKeywordManager._fill(this);
            isPlaceHolder = false;
        }
Exemple #3
0
        public int Save()
        {
            if (synonyms != null)
            {
                foreach (GreyFoxKeyword item in synonyms)
                {
                    item.Save();
                }
            }
            if (antonyms != null)
            {
                foreach (GreyFoxKeyword item in antonyms)
                {
                    item.Save();
                }
            }
            if (references != null)
            {
                foreach (GreyFoxKeyword item in references)
                {
                    item.Save();
                }
            }

            if (isSynced)
            {
                return(iD);
            }

            if (iD == 0)
            {
                iD = Amns.GreyFoxKeywordManager._insert(this);
            }
            else
            {
                GreyFoxKeywordManager._update(this);
            }
            isSynced = true;
            return(iD);
        }
Exemple #4
0
 public void Delete()
 {
     GreyFoxKeywordManager._delete(this.connectionString, this.iD);
 }
Exemple #5
0
 public GreyFoxKeyword(string connectionString, int id)
 {
     this.iD = id;
     this.connectionString = connectionString;
     isSynced = GreyFoxKeywordManager._fill(this);
 }