Ejemplo n.º 1
0
 public ActionResult Index()
 {
     ViewBag.Message   = TempData["OperStatus"];
     ViewBag.Status    = TempData["Status"];
     cmodel.categories = category.GetAll();
     return(View(cmodel));
 }
Ejemplo n.º 2
0
        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));
        }