示例#1
0
        public PartialViewResult BrandLeft(int?Category, int?Brand)
        {
            ViewBag.CategoryID = Category;
            ViewBag.brand      = Brand;
            var model = new BrandF().Brands.ToList();

            return(PartialView(model));
        }
示例#2
0
        public void SetViewBag(long?selectedID = null)
        {
            var f = new ProductCategoryF();

            ViewBag.CaterogyID = new SelectList(f.ProductCategories, "ID", "Name", selectedID);
            var Brand = new BrandF();

            ViewBag.BrandID = new SelectList(Brand.Brands, "ID", "Name", selectedID);
            var Country = new CountryF();

            ViewBag.CountryID = new SelectList(Country.Countrys, "ID", "Name", selectedID);
        }
示例#3
0
        public ActionResult Detail(long ID)
        {
            var model    = f.FindEntity(ID);
            var category = new ProductCategoryF().FindEntity(model.CaterogyID.GetValueOrDefault(-1));

            ViewBag.CategoryID = category.Name;
            var brand = new BrandF().FindEntity(model.BrandID.GetValueOrDefault(-1));

            ViewBag.BrandID = brand.Name;
            if (model != null)
            {
                return(View(model));
            }
            return(View());
        }
示例#4
0
        public PartialViewResult Brand()
        {
            var brand = new BrandF().Brands.ToList();

            return(PartialView(brand));
        }