Beispiel #1
0
        /// <summary>
        /// Format Text
        /// </summary>
        public string FormatText(object o)
        {
            Utility Util = new Utility();

            string formattxt = Util.FormatText(Convert.ToString(o));
            return formattxt;

            Util = null;
        }
Beispiel #2
0
        /// <summary>
        /// Admin section username and password validation.
        /// </summary>
        public static void IsAdminAuthenticated()
        {
            Utility Util = new Utility();

            if (!CookieLoginHelper.IsLoginAdminSessionExists)
            {
                //Redirect to admin login page.
                Util.PageRedirect(6);
            }

            Util = null;
        }
        /// <summary>
        /// Get Lyric name, author, date, hits, rating, ingredients, instructions and other field from the DB matching the Lyric ID provided.
        /// </summary>
        public override void FillUp(int ID)
        {
            Utility Util = new Utility();

            try
            {
                IDataReader dr = Blogic.ActionProcedureDataProvider.GetLyricDetail(ID, Approved);

                dr.Read();

                if (dr["ID"] != DBNull.Value)
                {
                    this._ID = (int)dr["ID"];
                }
                if (dr["Name"] != DBNull.Value)
                {
                    this._LyricName = (string)dr["Name"];
                }
                if (dr["Author"] != DBNull.Value)
                {
                    this._Author = (string)dr["Author"];
                }
                if (dr["CAT_ID"] != DBNull.Value)
                {
                    this._CatID = (int)dr["CAT_ID"];
                }
                if (dr["NO_RATES"] != DBNull.Value)
                {
                    this._NoRates = dr["NO_RATES"].ToString();
                }
                if (dr["HITS"] != DBNull.Value)
                {
                    this._Hits = (int)dr["HITS"];
                }
                if (dr["Rates"] != DBNull.Value)
                {
                    this._Rating = dr["Rates"].ToString();
                }
                if (dr["Category"] != DBNull.Value)
                {
                    this._Category = (string)dr["Category"];
                }
                if (dr["Ingredients"] != DBNull.Value)
                {
                    this._Ingredients = (string)dr["Ingredients"];
                }
                if (dr["Instructions"] != DBNull.Value)
                {
                    this._Instructions = (string)dr["Instructions"];
                }
                if (dr["Date"] != DBNull.Value)
                {
                    this._Date = (DateTime)(dr["Date"]);
                }
                if (dr["TOTAL_COMMENTS"] != DBNull.Value)
                {
                    this._CountComments = (int)dr["TOTAL_COMMENTS"];
                }
                if (dr["LINK_APPROVED"] != DBNull.Value)
                {
                    this._Approved = (int)dr["LINK_APPROVED"];
                }
                if (dr["LyricImage"] != DBNull.Value)
                {
                    this._LyricImage = (string)dr["LyricImage"];
                }
                if (dr["UID"] != DBNull.Value)
                {
                    this._UID = (int)dr["UID"];
                }
                if (dr["HIT_DATE"] != DBNull.Value)
                {
                    this._HitDate = (DateTime)dr["HIT_DATE"];
                }
                if (dr["CreateBy"] != DBNull.Value)
                {
                    this._CreateBy = (string)dr["CreateBy"];
                }
                if (dr["UrlMusic"] != DBNull.Value)
                {
                    this._UrlMusic = (string)dr["UrlMusic"];
                }
                if (dr["UrlVideo"] != DBNull.Value)
                {
                    this._UrlVideo = (string)dr["UrlVideo"];
                }

                if (dr["UrlChacha"] != DBNull.Value)
                {
                    this._UrlChacha = (string)dr["UrlChacha"];
                }

                if (dr["UrlZing"] != DBNull.Value)
                {
                    this._UrlZing = (string)dr["UrlZing"];
                }

                if (dr["UrlYoutube"] != DBNull.Value)
                {
                    this._UrlYoutube = (string)dr["UrlYoutube"];
                }

                dr.Close();
                dr = null;
            }
            catch
            {
                Util.PageRedirect(1);
            }
        }