Ejemplo n.º 1
0
        /// <summary>
        /// 根据二级分类获取三级分类
        /// </summary>
        protected void GetThirdClass()
        {
            int    classId   = RequestHelper.GetQueryString <int>("secondClassId");
            string classname = RequestHelper.GetQueryString <string>("classname");
            List <ProductClassInfo> childList = new List <ProductClassInfo>();

            if (classId > 0)
            {
                childList = ProductClassBLL.ReadChilds(classId);
                if (!string.IsNullOrEmpty(classname))
                {
                    childList = childList.Where(k => k.Name.Contains(classname)).ToList();
                }
            }
            Response.Clear();
            ResponseHelper.Write(Newtonsoft.Json.JsonConvert.SerializeObject(new { count = childList.Count, dataList = childList }));
            Response.End();
        }