// GET: ShoppingCart        (int? kindId,int? lang,int page)
        public ActionResult Index(int?kindId, int?lang, int page = 1)
        {
            int currentPage = page < 1 ? 1 : page;

            ProductEntity pe = new ProductEntity();
            IEnumerable <ProductViewModels> vModelList = null;

            //vModelList = pe.QueryByAllKind();

            if (kindId == null)
            {
                vModelList = pe.QueryByAllKind();
            }
            else
            {
                switch (kindId)
                {
                case 0:
                    //全部
                    vModelList = pe.QueryByAllKind();
                    break;

                case 1:
                    //課程
                    if (lang == 0)
                    {
                        vModelList = pe.QueryByKindId(kindId, lang);
                    }
                    else
                    {
                        vModelList = pe.QueryByKindId(kindId, lang);
                    }

                    break;

                case 2:
                    //影片

                    vModelList = pe.QueryByKindId(kindId);
                    break;
                }

                //return Content("the kind id==>" + kindId + "category id " + lang);
            }


            var result = vModelList.ToPagedList(currentPage, pageSize);

            return(View(result));
        }