public PartialViewResult BrandLeft(int?Category, int?Brand) { ViewBag.CategoryID = Category; ViewBag.brand = Brand; var model = new BrandF().Brands.ToList(); return(PartialView(model)); }
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); }
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()); }
public PartialViewResult Brand() { var brand = new BrandF().Brands.ToList(); return(PartialView(brand)); }