Beispiel #1
0
        public string GetLoadingCategorys(int parentID, string loadingType, string additional)
        {
            var arraylist = new ArrayList();

            var eLoadingType = ECategoryLoadingTypeUtils.GetEnumType(loadingType);

            var categoryIDList         = DataProviderWX.StoreCategoryDAO.GetCategoryIDListByParentID(PublishmentSystemID, parentID);
            var nameValueCollection    = TranslateUtils.ToNameValueCollection(RuntimeUtils.DecryptStringByTranslate(additional));
            var allCategoryIDArrayList = new ArrayList();

            if (!string.IsNullOrEmpty(nameValueCollection["CategoryIDCollection"]))
            {
                allCategoryIDArrayList = TranslateUtils.StringCollectionToIntArrayList(nameValueCollection["CategoryIDCollection"]);
                nameValueCollection.Remove("CategoryIDCollection");
                foreach (var categotyID in categoryIDList)
                {
                    var categoryInfo = DataProviderWX.StoreCategoryDAO.GetCategoryInfo(categotyID);
                    if (categoryInfo.ParentID != 0 || allCategoryIDArrayList.Contains(categotyID))
                    {
                        arraylist.Add(BackgroundStoreCategory.GetCategoryRowHtml(PublishmentSystemID, categoryInfo, eLoadingType, nameValueCollection));
                    }
                }
            }
            else
            {
                foreach (var categotyID in categoryIDList)
                {
                    var categoryInfo = DataProviderWX.StoreCategoryDAO.GetCategoryInfo(categotyID);
                    arraylist.Add(BackgroundStoreCategory.GetCategoryRowHtml(PublishmentSystemID, categoryInfo, eLoadingType, nameValueCollection));
                }
            }

            var builder = new StringBuilder();

            foreach (string html in arraylist)
            {
                builder.Append(html);
            }
            return(builder.ToString());
        }