Example #1
0
    //--------------------------------------------------------
    #endregion

    #region --------------GetCategoryText--------------
    //---------------------------------------------------------
    //GetCategoryText
    //---------------------------------------------------------
    public string GetCategoryText(object catID)
    {
        int categoryID = Convert.ToInt32(catID);

        if (categoryID > 0)
        {
            Languages            langID   = SiteSettings.GetCurrentLanguage();
            ItemCategoriesEntity category = ItemCategoriesFactory.GetObject(categoryID, langID, OwnerID);
            if (category != null)
            {
                ItemCategoriesDetailsEntity pd = null;
                if (category.Details.Contains(Languages.Ar))
                {
                    pd = (ItemCategoriesDetailsEntity)category.Details[Languages.Ar];
                }
                else
                {
                    pd = (ItemCategoriesDetailsEntity)category.Details[Languages.En];
                }
                if (pd != null)
                {
                    return(pd.Title);
                }
            }
        }
        return("");
    }