/// <summary> /// 一级分类排序 /// </summary> /// <param name="productClassDic"></param> /// <returns></returns> protected Dictionary <string, Dictionary <string, string> > productClassSort(Dictionary <string, Dictionary <string, string> > productClassDic) { List <ProductClassInfo> classList = new List <ProductClassInfo>(); Dictionary <string, Dictionary <string, string> > sortProductClassDic = new Dictionary <string, Dictionary <string, string> >(); foreach (string key in productClassDic.Keys) { classList.Add(ProductClassBLL.ReadProductClassByProductClassList(this.productClassList, int.Parse(key))); } classList.Sort(SortCompare); for (int i = 0; i < classList.Count; i++) { sortProductClassDic.Add(classList[i].ID.ToString(), productClassDic[classList[i].ID.ToString()]); } return(sortProductClassDic); }