Ejemplo n.º 1
0
 /// <summary>
 /// Add ne Exclude Word
 /// </summary>
 /// <param name="addWord">
 /// The add Word.
 /// </param>
 /// <returns>
 /// The New Word ID
 /// </returns>
 public static int TagCloudExcludeWordAdd(ExcludeWord addWord)
 {
     return
         (Convert.ToInt32(
              DataProvider.Instance().ExecuteScalar(
                  "TagCloudExcludeWordAdd", addWord.Word, addWord.ExcludeWordType, addWord.ModuleID, addWord.WordID)));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Get Exclude Word by moduleId and wordId
        /// </summary>
        /// <param name="moduleId">
        /// The module id.
        /// </param>
        /// <param name="wordId">
        /// The word id.
        /// </param>
        /// <returns>
        /// Returns a specific Exclude Word
        /// </returns>
        public static ExcludeWord TagCloudExcludeWordsGetWord(int moduleId, int wordId)
        {
            ExcludeWord word = null;

            using (IDataReader dr = DataProvider.Instance().ExecuteReader("TagCloudExcludeWordsGetWord", moduleId, wordId))
            {
                while (dr.Read())
                {
                    word = new ExcludeWord
                    {
                        Word            = Convert.ToString(dr["Word"]),
                        ExcludeWordType =
                            (ExcludeType)Enum.Parse(typeof(ExcludeType), Convert.ToString(dr["ExcludeWordType"])),
                        WordID   = wordId,
                        ModuleID = moduleId
                    };
                }
            }

            return(word);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get All Exclude Words by Module
        /// </summary>
        /// <param name="moduleId">
        /// The module id.
        /// </param>
        /// <returns>
        /// List with Exclude Words
        /// </returns>
        public static List <ExcludeWord> TagCloudExcludeWordsGetByModule(int moduleId)
        {
            var wordList = new List <ExcludeWord>();

            using (IDataReader dr = DataProvider.Instance().ExecuteReader("TagCloudExcludeWordsGetByModule", moduleId))
            {
                while (dr.Read())
                {
                    var word = new ExcludeWord
                    {
                        Word            = Convert.ToString(dr["Word"]),
                        ExcludeWordType =
                            (ExcludeType)Enum.Parse(typeof(ExcludeType), Convert.ToString(dr["ExcludeWordType"])),
                        WordID   = Convert.ToInt32(dr["WordID"]),
                        ModuleID = moduleId
                    };

                    wordList.Add(word);
                }
            }

            return(wordList);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Update the Exclude Word
 /// </summary>
 /// <param name="updateWord">
 /// The update Word.
 /// </param>
 public static void TagCloudExcludeWordUpdate(ExcludeWord updateWord)
 {
     DataProvider.Instance().ExecuteNonQuery(
         "TagCloudExcludeWordUpdate", updateWord.Word, updateWord.ExcludeWordType, updateWord.ModuleID, updateWord.WordID);
 }