Beispiel #1
0
        public ActionResult TypeListByCar(string t, string b, string m, string y)
        {
            string tid = HttpUtility.HtmlEncode(t);
            string bb  = HttpUtility.HtmlEncode(b);
            string mm  = HttpUtility.HtmlEncode(m);
            string yy  = HttpUtility.HtmlEncode(y);

            Cparts_Service.CarBll carBll  = new Cparts_Service.CarBll();
            DAO.CarM carinfo              = carBll.GetModel(bb, mm, yy);
            TypeListByCarViewModel vm     = new TypeListByCarViewModel();
            ProductBll             proBll = new ProductBll();

            if (carinfo != null)
            {
                vm.childenrCate = proBll.GetChildenCateListByType(t, carinfo.id.ToString());
            }
            if (t == "-1")
            {
                CommonModule.CommonBll bll = new CommonModule.CommonBll();
                vm.topCate = bll.GetList();
            }
            vm.parentCate = proBll.GetParentCateListByType(t);
            vm.Carinfo    = carinfo;
            return(View(vm));
        }
Beispiel #2
0
        public ActionResult List(string id, string b, string m, string y)
        {
            // string tid = HttpUtility.HtmlEncode(t);
            string bb     = HttpUtility.HtmlEncode(b);
            string mm     = HttpUtility.HtmlEncode(m);
            string yy     = HttpUtility.HtmlEncode(y);
            string typeId = HttpUtility.HtmlEncode(id);
            string car    = "";

            if (!string.IsNullOrEmpty(b) && !string.IsNullOrEmpty(m) && !string.IsNullOrEmpty(y))
            {
                Cparts_Service.CarBll carBll = new Cparts_Service.CarBll();
                DAO.CarM carinfo             = carBll.GetModel(bb, mm, yy);
                car = carinfo.id.ToString();
            }

            ProductBll  proList = new ProductBll();
            ProductList list    = proList.GetListByType(typeId, car, null);

            return(View(list));
        }
Beispiel #3
0
        public ActionResult TypeListByCar2(string t, string c)
        {
            string tid = HttpUtility.HtmlEncode(t);

            Cparts_Service.CarBll carBll = new Cparts_Service.CarBll();
            DAO.CarM carinfo             = carBll.GetModel(c);
            // select *  FROM  Parts   where tocars like '%,1,%' and  [state]=1
            TypeListByCarViewModel vm     = new TypeListByCarViewModel();
            ProductBll             proBll = new ProductBll();

            vm.childenrCate = proBll.GetChildenCateListByType(t);
            if (vm.childenrCate != null && vm.childenrCate.Count == 1)
            {
                if (vm.childenrCate[0].ID.ToString() == t)
                {
                    vm.childenrCate = null;
                }
            }
            vm.parentCate = proBll.GetParentCateListByType(t);
            vm.Carinfo    = carinfo;
            return(View("TypeListByCar", vm));
        }