コード例 #1
0
 public void Overwrite(string connectionString, int id)
 {
     iD = id;
     this.connectionString = connectionString;
     GreyFoxKeywordManager._update(this);
     isSynced = true;
 }
コード例 #2
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);
        }