public ActionResult Index() { ViewBag.Message = TempData["OperStatus"]; ViewBag.Status = TempData["Status"]; cmodel.categories = category.GetAll(); return(View(cmodel)); }
public ActionResult Add() { ProductViewModel Pvm = new ProductViewModel(); Pvm.BrandList = new SelectList(_context.tbl_Brands.ToList(), "ID", "BrandName"); Pvm.CategoryList = new SelectList(cs.GetAll(), "CategoryId", "CategoryName"); ViewBag.Message = TempData["OperStatus"]; ViewBag.Status = TempData["Status"]; return(View(Pvm)); }